Skip to content

Python Security Policy: Add note on sandboxes - #1874

Merged
StanFromIreland merged 1 commit into
python:mainfrom
StanFromIreland:sandbox-security-policy
Aug 9, 2026
Merged

Python Security Policy: Add note on sandboxes#1874
StanFromIreland merged 1 commit into
python:mainfrom
StanFromIreland:sandbox-security-policy

Conversation

@StanFromIreland

Copy link
Copy Markdown
Member

CC @python/psrt

Prompted by a recent report (and several similar ones before it), this clarifies that sandboxing untrusted Python code is not a security boundary we support. Escapes from third-party sandboxes should be reported to their developers instead.

@read-the-docs-community

Copy link
Copy Markdown

Documentation build overview

📚 CPython devguide | 🛠️ Build #33971670 | 📁 Comparing 2077da2 against latest (6f10a40)

  🔍 Preview build  

2 files changed
± versions/index.html
± security/policy/index.html

@woodruffw

Copy link
Copy Markdown

(Speaking from PSRT perspective: seems reasonable to me, IMO it'd be fair to generalize even further to "Python does not make security representations about arbitrary code, any claims about the security of arbitrary code should be evaluated by the party making those claims.")

@Eclips4 Eclips4 left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

FWIW, there have been were a few attempts to make Python sandboxable, and none of them were successful succesfull. As Victor Stinner once said, "run python in a sandbox, not the opposite!"

@StanFromIreland
StanFromIreland merged commit 4bcdd6b into python:main Aug 9, 2026
5 checks passed
@StanFromIreland
StanFromIreland deleted the sandbox-security-policy branch August 9, 2026 19:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants