Skip to content

Add security warning to mailbox docs - #149295

Merged
StanFromIreland merged 4 commits into
python:mainfrom
StanFromIreland:mailbox-security
Oct 18, 2026
Merged

StanFromIreland merged 4 commits into
python:mainfrom
StanFromIreland:mailbox-security

Conversation

@StanFromIreland

@StanFromIreland StanFromIreland commented May 2, 2026 •

Copy link
Copy Markdown
Member

CC @bitdancer, you should have gotten a series of notifications just there. I suggest adding a security warning, they collectively are the motivation for this change.

@StanFromIreland
StanFromIreland requested a review from a team as a code owner May 2, 2026 17:26
@bedevere-app bedevere-app Bot added docs Documentation in the Doc dir skip news labels May 2, 2026
@github-project-automation github-project-automation Bot moved this to Todo in Docs PRs May 2, 2026
@read-the-docs-community

read-the-docs-community Bot commented May 2, 2026 •

Copy link
Copy Markdown

Comment thread Doc/library/mailbox.rst Outdated
@bedevere-app

bedevere-app Bot commented May 2, 2026

Copy link
Copy Markdown

When you're done making the requested changes, leave the comment: I have made the requested changes; please review again.

@StanFromIreland

Copy link
Copy Markdown
Member Author

I'll defer to RDM, closing.

@StanFromIreland
StanFromIreland deleted the mailbox-security branch May 3, 2026 10:35
@StanFromIreland
StanFromIreland restored the mailbox-security branch June 7, 2026 16:30
Co-authored-by: R. David Murray <rdmurray@bitdance.com>
@StanFromIreland

Copy link
Copy Markdown
Member Author

I have made the requested changes; please review again

I slightly modified your suggestion @bitdancer to smooth it out a little and to use the standard terminology.

@bedevere-app

bedevere-app Bot commented Jun 10, 2026

Copy link
Copy Markdown

Thanks for making the requested changes!

@bitdancer: please review the changes made to this pull request.

@StanFromIreland

Copy link
Copy Markdown
Member Author

Friendly little ping @bitdancer, I'd like to clear up our backlog a little. :-)

@serhiy-storchaka

Copy link
Copy Markdown
Member

This warning is too loud (I think a note or even a plain text would be enough), and too vague.v What "all inputs are provided by the local user" does mean? That you cannot use it to read emails sent by non-local users? That you cannot open a mailbox created on other computer? This is obviously not so, otherwise this module would be useless. What "the underlying mailbox storage is accessible only to that user" does mean? I think that you can safely concurrently read a mailbox, until it is not concurrently modified. Then you have the same limitations as for any shared file.

I know this is to answer the security report, but the surface of thet report was not clear.

@StanFromIreland

Copy link
Copy Markdown
Member Author

This warning is too loud

Every other security warning is in a .. warning:: box, because it's important for users to know.

What "all inputs are provided by the local user" does mean?

The user choses where mailboxes are created, what emails are added, removed etc. If someone else has access to the application and can do so we don't consider it a mailbox vulnerability.

What "the underlying mailbox storage is accessible only to that user" does mean?

The user is the only person with access to the mailbox. If someone else can it or its contents it we don't consider it a mailbox vulnerability.

@serhiy-storchaka, I'm afraid I don't quite see how to improve this without turning it into an essay. Maybe you have a suggestion?

@bitdancer

Copy link
Copy Markdown
Member

Hmm. Would it be clearer if we said "data from untrusted sources is never passed to the module API calls"? And perhaps "only trusted users have access to the filesystems accessible to the module"? That doesn't quite capture the problem, though. Can we talk about the file system trust boundary being the responsibility of the hosting environment? That's seems pretty opaque to a non-security professional, though (assuming I even worded it right, since I'm not one ;)

I'd be happier if it wasn't a warning box, but I think I lost that argument already ;)

Co-authored-by: R. David Murray <rdmurray@bitdance.com>
@StanFromIreland

Copy link
Copy Markdown
Member Author

Sorry for the delay, this slipped of my list. I've applied your suggestion @bitdancer.

@StanFromIreland

Copy link
Copy Markdown
Member Author

If there are no objections, I'll merge this later this week.

@StanFromIreland
StanFromIreland merged commit c5cbe31 into python:main Oct 18, 2026
31 of 32 checks passed
@StanFromIreland
StanFromIreland deleted the mailbox-security branch October 18, 2026 10:44
@github-project-automation github-project-automation Bot moved this from Todo to Done in Docs PRs Oct 18, 2026
@StanFromIreland

Copy link
Copy Markdown
Member Author

I've merged this, this will hopefully put an end to these reports.

@StanFromIreland StanFromIreland added needs backport to 3.14 bugs and security fixes needs backport to 3.15 bugs and security fixes labels Oct 18, 2026
@miss-islington-app

Copy link
Copy Markdown

Thanks @StanFromIreland for the PR 🌮🎉.. I'm working now to backport this PR to: 3.14.
🐍🍒⛏🤖

@miss-islington-app

Copy link
Copy Markdown

Thanks @StanFromIreland for the PR 🌮🎉.. I'm working now to backport this PR to: 3.15.
🐍🍒⛏🤖

@bedevere-app

bedevere-app Bot commented Oct 18, 2026

Copy link
Copy Markdown

GH-159666 is a backport of this pull request to the 3.14 branch.

@bedevere-app bedevere-app Bot removed the needs backport to 3.14 bugs and security fixes label Oct 18, 2026
@bedevere-app

bedevere-app Bot commented Oct 18, 2026

Copy link
Copy Markdown

GH-159667 is a backport of this pull request to the 3.15 branch.

@bedevere-app bedevere-app Bot removed the needs backport to 3.15 bugs and security fixes label Oct 18, 2026
StanFromIreland added a commit that referenced this pull request Oct 18, 2026
)

(cherry picked from commit c5cbe31)

Co-authored-by: Stan Ulbrych <stan@python.org>
Co-authored-by: R. David Murray <rdmurray@bitdance.com>
StanFromIreland added a commit that referenced this pull request Oct 18, 2026
)

(cherry picked from commit c5cbe31)

Co-authored-by: Stan Ulbrych <stan@python.org>
Co-authored-by: R. David Murray <rdmurray@bitdance.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

docs Documentation in the Doc dir skip issue skip news

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

6 participants