Skip to content

Avoid recursive-delete approval for literal rm filenames - #1481

Open
SamuelChien wants to merge 1 commit into
yc-software:mainfrom
SamuelChien:fix/recursive-rm-option-boundaries-20260921
Open

SamuelChien wants to merge 1 commit into
yc-software:mainfrom
SamuelChien:fix/recursive-rm-option-boundaries-20260921

Conversation

@SamuelChien

Copy link
Copy Markdown

Single-file cleanup such as rm -f controls/evidence/valid-rec-grand-meridian-dev-a-drained/answer.json incorrectly requests recursive-delete approval because the policy regex reads -r inside an operand. A bounded argument check now clears that existing match only for provably non-recursive literal commands, honoring command boundaries and --.

The serialized rule, matched text, approval key, ordering and scope/layer precedence remain unchanged. Expansions, redirections, unsupported shell invocations and uncertain wrappers retain the existing gate. Shared shell parsing and heredoc behavior are unchanged.

Validation: 137 affected policy, route, layer, broker, session and scratch tests pass on Node 24; full TypeScript and changed-file ESLint pass. Independent security and compatibility reviews passed, including 630 wrapper/quoting combinations against baseline decision, matched text and approval identity. No live endpoint is needed for this pure policy change.

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.

1 participant