Skip to content

Fix family Quillin host: the Python sandbox no longer reaches sys through its modules (#2400) - #3897

Merged
accesswatch merged 1 commit into
mainfrom
fix/family-quillin-host
Nov 30, 2026
Merged

accesswatch merged 1 commit into
mainfrom
fix/family-quillin-host

Conversation

@accesswatch

Copy link
Copy Markdown
Contributor

Fixes #2400

Part of #3849 (segment A). #2658 and #2661 were already fixed by #3888 and are closed.

  • Imported modules are handed over as namespaces of their public, non-module members, so dataclasses.sys.modules['os'], collections._sys and datetime.sys no longer exist.
  • getattr and hasattr are removed (they built dunder names at run time); operator.attrgetter/methodcaller, string.Formatter and the typing forward-reference evaluators are withheld for the same reason.
  • Windows job object now also sets a per-process CPU limit (POSIX already had RLIMIT_CPU).
  • Docstring now says plainly this is a speed bump, not a security boundary.

Tests: escapes via module objects, runtime-built dunders, withheld names, and an ordinary-use regression.

🤖 Generated with Claude Code

…tr, caps CPU on Windows

Part of #3849.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
@accesswatch
accesswatch merged commit 306a96f into main Nov 30, 2026
22 checks passed
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.

Review: Python sandbox is escapable (sys via allowed modules; getattr with built dunder name)

1 participant