Repository navigation
fix: backport #30824 to 0.12.1 (self-management command check) - #33030
Conversation
The tool gate refuses an agent's attempt to run certain self-management commands on its own. One shell spelling of those commands, which the shell runs exactly like the plain form, was allowed. The gate now refuses it, and every command it refused before is still refused. (cherry picked from commit f09c835) On release/0.12.0 the security package line budget is raised by 3 to fit this pick, as earlier backports did. Originally authored on main by Bolin Chen (bolichen97); authored here with the public identity because the commit guard refuses the original address on a hand-edited pick.
Sensitive Change ReviewSensitive files changed:
How to clear this check:
Only the author's comment counts this way. A reviewer can instead |
UX Review (Opus 5.5) — ⏭️ skippedRevision |
Design Review (Opus 5.5) — ✅ PASSDesign-level review of Design-Verdict: PASS This is a clean cherry-pick of a fix already merged on main, and its tests pin both the newly refused and the still-allowed spellings, so nothing blocks. Notes
[DESIGN-REVIEWED] 2f2a740 Description read[DESCRIPTION-READ] a54d06afa8eced00ce8537832acc0f1c4bd8b1b748574349c3c7ece264804350 That sha256 names everything this verdict read: the PR description, plus the 1 evidence file(s) the workflow collected from it and handed this review. It covers that evidence because the media strip replaces every attachment URL with the same placeholder, so an edit swapping one attachment for another would leave the description's captured text identical while what this review judged changed. Recompute it with |
First Principles Review (Opus 5.5) — ✅ PASSPremise-level review of First-Principles-Verdict: PASS This is a clean backport of a fix already merged on What this change shipsInventory (4 items) — 4 justifiedIntent: give 0.12.x users the main fix that stops a self-management command (
[FIRST-PRINCIPLES-REVIEWED] 2f2a740 Description read[DESCRIPTION-READ] 47ab2d512acdf45da717c289436d7fdc9833a8765f969d8cf77ae4f4720c1946 That sha256 names the PR description this verdict read. Recompute it with |
Opus 5.5 Review — ✅ no blocking findingsReviewed Verdict parsed from the review's SHA-scoped output markers for commit False positive or not applicable? A repository writer can comment: |
GPT 6.1 Review — ✅ no blocking findingsGPT 6.1 completed its review of This comment is updated in place on each push. Review detailsNo findings. False positive or not applicable? A repository writer can comment: |
Security Scope Review -- ✅ PASSWhich legitimate operations does Verdict basis: adjudicated, zero confirmed regressions. Security scope review -- adjudicated candidates
No candidate flipped from allowed to refused. Scope-Verdict: PASS Reason: The change adds one more reading to the self-management argv floor. When a redirection is glued to a word, the floor now also keeps that word as an operand, so it refuses only when the stripped word is itself a self-management verb in leading position. I wrote 21 boundary candidates (glued redirects on read-only subcommands, data consumers that quote the new shape, and posix and windows spellings) for the classifier. No regression is confirmed in this review because no verdict has been handed back for those rows. TIGHTENING: ADJUDICATED: 21 candidates, 0 confirmed newly-refused (no classifier verdict for these rows has been handed back to this review) PLATFORM COVERAGE: The diff assumes that
[SCOPE-REVIEWED] 2f2a740 |
Problem / Motivation
Goal: Bring the last value-2 fix, #30824, merged on
mainafterv0.12.0, ontorelease/0.12.0as one commit in a PR of its own.Why it matters
security/argv_floor_self.pyNot a goal
main; nothing is changed only here.CHANGELOG.mdchange.What changed (motivation → approach → change)
The main squash commit
f09c835400was cherry-picked with-xontorelease/0.12.0@a0b61daa99as2f2a740184. The code, spec and test hunks applied cleanly.One hand edit, in a test:
test/test_security_gate_liveness.py. On release this pick takes thesecuritypackage to 34,697 lines, 3 over its budget there, so_PACKAGE_LINE_BUDGETis raised by 3 with a comment saying why. This is the same thing earlier backports did on release, for example #27257's +107. Main has more headroom, so main's commit did not need it.The commit is authored with the public identity because the commit guard refuses the original address on a hand-edited pick; its message names Bolin Chen.
Backwards compatibility
Breaking: the tool gate refuses one more spelling of a self-management command it already refuses in its plain form. Only a command that actually runs a refused self-management subcommand is newly refused; ordinary commands, including other subcommands written the same way, stay allowed. This is a tool-gate rule for agent shell commands only; no credential, token or client outside this repository is involved.
Removes nothing: no setting, key or caller is removed.
Tests
Proof: not provable -- other: a backport of a main commit whose proof ran on its own PR
release/*, so the related set was run here:test_denied_commands_security.pyplus every test file that imports the argv floor or the denied-command catalog, 76 files, 6,165 passed. The one failure was the line budget above, now fixed;test_security_gate_liveness.pypasses.mypy src/kiro_crew, the comment-history and brand gates pass.Manual verification
N/A - the fix was verified on its own main PR. The 0.12.1 RC soak is the end-to-end check.
Screenshots / video
N/A - no frontend file changes.
Related Issues
Backport to the 0.12 line for 0.12.1 of #30824.
Sibling sweep
Siblings: none -- the source PR carried its own sibling sweep; this PR only carries that fix.
Pattern harvest
Not generalizable: this PR only carries a fix already on
main. The source PR has its own harvest.Checklist
feat|fix|docs|style|refactor|perf|test|chore|ci|build|revert: ...)Contribution License Agreement
Contributions are accepted under the project's Apache-2.0 license; see the Licensing section of CONTRIBUTING.md.