Repository navigation
test(security): pin the rm floor force requirement - #24949
Conversation
Sensitive change reviewHead: 0060980
|
Sensitive Change ReviewSensitive files changed:
|
UX Review (Opus 5.5) — ⏭️ skippedRevision |
Design Review (Opus 5.5) — ✅ PASSDesign-level review of Design-Verdict: PASS Nothing blocks: this adds two test cases and fixes one comment, with no runtime change. Without them, dropping the floor's force check left every test green. [DESIGN-REVIEWED] 0060980 Description read[DESCRIPTION-READ] 9b26f638ac80f108615712e3ddef9f5e4e9124486f6244f3dd735f7dfc8d7b03 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 Nothing to check. What this change shipsInventory (2 items) — 2 justifiedIntent: make the test suite catch a regression that drops the force requirement from the recursive-force
[FIRST-PRINCIPLES-REVIEWED] 0060980 Description read[DESCRIPTION-READ] 33bca9045f2d9052101b6e8e9f872ab3fa276bad42a45f820fdb2aa30c9eb5e1 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: Nothing in the patch makes a rule stricter. In TIGHTENING: None. The only changes are the comment edit ADJUDICATED: 13 candidates, 0 confirmed newly-refused PLATFORM COVERAGE: The diff makes no new assumption about paths, separators, argv shapes or interpreters. Candidates still probe both host spellings around the rm floor:
No assumed platform went unprobed. [SCOPE-REVIEWED] 0060980 |
buluoray
left a comment
There was a problem hiding this comment.
🤖 Kiro Crew Auto-Pipeline [operator: buluoray]:
Approving at 006098072c. On main, weakening if recursive and force: to if recursive: reddens no test; with this PR's tests [RM -r /] and [RM -r ~] go red, so the force requirement is now pinned. The depth-cap comment correction matches rm_floor.py (there is no depth cap). 191 related tests pass.
Problem / Motivation
Goal: make a regression that drops the force-flag check in the recursive-force
rmfloor turn a test red.The rm floor's allow cases had no recursive-only command against root or home. Removing
and forcefromrm_floor._rm_wipe_targetsleft every test green. The fail-closed comment in the floor's caller also named a depth cap that does not exist (rm_floor.pyhas no depth or cap).Supersedes #21900 by @devansh1401. That fork PR touches
src/kiro_crew/security/, which the Sensitive Change Review gate refuses for forks, so this carries the same patch on a branch of this repository. Author credit is kept withCo-authored-by:.Why it matters
If the force check were dropped, the floor would refuse
rm -r /andrm -r ~, which it is meant to allow (no force flag), and no test would notice.Not a goal
What changed (motivation → approach → change)
test/test_denied_commands_security_rows.py: addrm -r /andrm -r ~toTestRecursiveForceRmFloor::test_descendants_and_partial_flags_stay_allowed. (The class moved here fromtest_denied_commands_security.pyin test: split test_denied_commands_security.py by behaviour (1 of 2) #21858 / test: split test_denied_commands_security.py by behaviour (2 of 2) #21968.)src/kiro_crew/security/deny_gate.py: comment only,# incl. RecursionError and the depth cap-># incl. RecursionError. (The code moved here fromsecurity/__init__.pyin refactor(security): split the facade and shell reader under the cap #21650.)docs/system-specs/modules/security.mdalready documents it.Backwards compatibility
No runtime or public API change.
Tests
TestRecursiveForceRmFloor: 121 passed.if recursive and force:patched in memory toif recursive:, exactly the two new cases fail (2 failed, 119 passed).test/test_denied_commands_security_rows.py: 191 passed.Manual verification
N/A: test and comment changes only; the mutation ran in memory through a pytest plugin.
Screenshots / video
N/A: no user-facing surface.
Related Issues
Closes #21759
Supersedes #21900
Checklist
Contribution License Agreement
Submitted under the project's Apache-2.0 license.