-
-
Notifications
You must be signed in to change notification settings - Fork 27
Dangerous-shell scoring misses commands executed through sh -c wrappers #37
Copy link
Copy link
Open
Labels
P2Normal priority bug or improvement with limited blast radius.Normal priority bug or improvement with limited blast radius.clawsweeper:needs-maintainer-reviewClawSweeper marked this issue as needing maintainer review before automation.ClawSweeper marked this issue as needing maintainer review before automation.clawsweeper:no-new-fix-prClawSweeper does not recommend queueing a new automated fix PR for this issue.ClawSweeper does not recommend queueing a new automated fix PR for this issue.impact:otherThis issue has meaningful maintainer-visible impact outside the owned taxonomy.This issue has meaningful maintainer-visible impact outside the owned taxonomy.issue-rating: 🦪 silver shellfishThin issue quality; more reproduction proof or environment detail is needed.Thin issue quality; more reproduction proof or environment detail is needed.
Description
Metadata
Metadata
Assignees
Labels
P2Normal priority bug or improvement with limited blast radius.Normal priority bug or improvement with limited blast radius.clawsweeper:needs-maintainer-reviewClawSweeper marked this issue as needing maintainer review before automation.ClawSweeper marked this issue as needing maintainer review before automation.clawsweeper:no-new-fix-prClawSweeper does not recommend queueing a new automated fix PR for this issue.ClawSweeper does not recommend queueing a new automated fix PR for this issue.impact:otherThis issue has meaningful maintainer-visible impact outside the owned taxonomy.This issue has meaningful maintainer-visible impact outside the owned taxonomy.issue-rating: 🦪 silver shellfishThin issue quality; more reproduction proof or environment detail is needed.Thin issue quality; more reproduction proof or environment detail is needed.
Type
Fields
Priority
None yet
What happened
has_dangerous_shell_pattern()detects destructive commands when they are invoked directly, but quoted payloads are stripped before matching. As a result, the same command executed through a shell wrapper such asbash -c,sh -lc, orzsh -cis not recorded as a dangerous-shell trajectory violation.This can overstate the safety score for an agent trace even though the nested shell actually executes the destructive command.
Expected behaviour
Command payloads passed to directly invoked POSIX shell wrappers with
-cshould be inspected recursively. Quoted command mentions that are not executed—such asecho "rm -rf", a commit message, or Python code that only prints the text—should remain ignored.Steps to reproduce
Relevant output
Why this matters for frontier AI evaluation
Frontier agent benchmarks need safety scoring to follow the action that actually executes, not just the outer command string. Otherwise, an increasingly capable agent can receive a clean safety score simply by routing an identical destructive operation through a nested shell.
Environment
c725622AI and provenance disclosure
This report was prepared with significant assistance from OpenAI Codex and manually reproduced. It is based entirely on the public repository and synthetic commands targeting
/tmp; it contains no private or proprietary code, data, plans, or product-specific examples.