TDD: Inline-code sandbox exposes __import__, letting code bypass the Restricted Built-ins set entirely (e.g. import os) #108
Labels
No labels
auto/blocked-by-deps
auto/ci-timeout
auto/claimed-implementer
auto/claimed-merge
auto/claimed-reviewer
auto/driver-down
auto/invariant-violation
auto/last-attempt-tier-0
auto/last-attempt-tier-1
auto/last-attempt-tier-2
auto/last-attempt-tier-min
Automation Tracking
auto/needs-conflict-resolution
auto/needs-implementer
auto/postmortem
auto/ready-to-merge
auto/restart-throttled
auto/revert
auto/sentinel
auto/stale-inactivity
auto/unstable
Blocked
Bounty
$100
Bounty
$1000
Bounty
$10000
Bounty
$20
Bounty
$2000
Bounty
$250
Bounty
$50
Bounty
$500
Bounty
$5000
Bounty
$750
MoSCoW
Could have
MoSCoW
Must have
MoSCoW
Should have
Needs Feedback
Points
1
Points
13
Points
2
Points
21
Points
3
Points
34
Points
5
Points
55
Points
8
Points
88
Priority
Backlog
Priority
CI Blocker
Priority
Critical
Priority
High
Priority
Low
Priority
Medium
Signed-off: Owner
Signed-off: Scrum Master
Signed-off: Tech Lead
Spike
State
Completed
State
Duplicate
State
In Progress
State
In Review
State
Paused
State
Unverified
State
Verified
State
Wont Do
Type
Automation
Type
Bug
Type
Discussion
Type
Documentation
Type
Epic
Type
Feature
Type
Legendary
Type
Refactor
Type
Support
Type
Task
Type
Testing
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Blocks
Depends on
#77 Epic: LLM Agent Runtime Stabilization — reliability, resource enforcement & correctness hardening
cleveragents/cleveractors-core
#107 Inline-code sandbox exposes __import__, letting code bypass the Restricted Built-ins set entirely (e.g. import os)
cleveragents/cleveractors-core
#110 test(agents): capture inline sandbox __import__ escape regression (#107)
cleveragents/cleveractors-core
Reference
cleveragents/cleveractors-core#108
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Metadata
test(agents): capture inline sandbox __import__ escape regression (#107)tdd/m1-inline-sandbox-import-restrictionBackground and context
Companion TDD issue for #107 ("Inline-code sandbox exposes
__import__, letting code bypass the Restricted Built-ins set entirely"). Per this project's mandatory bug-fix TDD workflow, this issue's job is to add a failing (currently bug-present) Behave scenario proving the sandbox escape exists, tagged@tdd_issue @tdd_issue_107 @tdd_expected_fail, before any fix is written on abugfix/branch.Current behavior
ToolAgent._execute_python_code's__builtins__includes a working__import__, so an inline-code body can executeimport os(or any other module) and use it freely. See #107 for the full technical analysis and spec references.Expected behavior
A Behave scenario exists that executes inline code containing
import osand asserts that this MUST fail with a restricted-import error. While the bug is present, that assertion itself fails (sinceimport oscurrently succeeds) — the@tdd_expected_failtag inverts this so CI passes on the proof of the bug, not on the underlying (currently insecure) behavior. The failing step usesassert/AssertionErroronly — neverImportError,ValueError, or any other non-assertion exception — so the TDD CI hook inverts it correctly.Acceptance criteria
@tdd_issue,@tdd_issue_107,@tdd_expected_fail.AssertionErroronly.@tdd_expected_failremoved locally demonstrably fails today (proving the bug is real), confirmed before merge.mastervia its own PR before work begins on #107's fix.Supporting information
docs/index.md§13.2.1, §13.2.3).Subtasks
features/tool_agent.featureor a dedicated file) that executes inline code containingimport os, tagged@tdd_issue @tdd_issue_107 @tdd_expected_fail.@tdd_expected_failis temporarily removed locally.nox(all default sessions) to confirm the scenario integrates cleanly (passes via the tdd-expected-fail inversion).Definition of Done
This issue is complete when:
master, reviewed, and merged.