security(approval): catch killall sweeps and find -execdir rm - #27460
security(approval): catch killall sweeps and find -execdir rm#27460ht1072 wants to merge 1 commit into
Conversation
|
Duplicate of #26829 (merged). The killall |
|
I found an issue with this PR that looks worth fixing before merge. Title/body description does not match actual diff. The PR title and body claim to:
However, the actual diff shows:
The PR removes critical security regression tests without adding replacements for the newly-claimed coverage. This is a regression in test coverage for sudo stdin attacks and macOS private system path attacks. Why it matters: If the intent is to remove these test classes, the PR description should explain why. If the intent is to add Suggested fix: Either (1) update the PR description to match the actual changes (removal of sudo/stdin/macOS-private-path guards and their tests), or (2) add the missing |
|
Closing this PR based on the current diff relative to |
Summary
killall -9,killall -KILL,killall -s KILL, andkillall -rsweepsfind -exec rmguard to also catchfind -execdir rmWhy
The current dangerous-command heuristics already gate
pkill -9andfind -exec rm, but they still miss equivalent destructive forms:killall -9/-KILL/-s KILL/-r <regex>can terminate broad sets of processesfind -execdir rmhas the same destructive effect asfind -exec rmwhile bypassing the current literal-execpatternThis keeps the change small and heuristic-scoped without changing the broader approval model.
Test Plan
uv run --no-sync python3 -m pytest tests/tools/test_approval.py -q