-
-
Notifications
You must be signed in to change notification settings - Fork 79.2k
Feature: Add denylist support for exec-approvals #6615
Copy link
Copy link
Open
Labels
P2Normal backlog priority with limited blast radius.Normal backlog priority 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:needs-product-decisionClawSweeper marked this issue as needing a product or behavior decision.ClawSweeper marked this issue as needing a product or behavior decision.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.clawsweeper:source-reproClawSweeper found a high-confidence source-level issue reproduction.ClawSweeper found a high-confidence source-level issue reproduction.enhancementNew feature or requestNew feature or requestimpact:securitySecurity boundary, credential, authz, sandbox, or sensitive-data risk.Security boundary, credential, authz, sandbox, or sensitive-data risk.issue-rating: 🦞 diamond lobsterVery strong issue quality with high-confidence source-level or clear reproduction.Very strong issue quality with high-confidence source-level or clear reproduction.
Metadata
Metadata
Assignees
Labels
P2Normal backlog priority with limited blast radius.Normal backlog priority 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:needs-product-decisionClawSweeper marked this issue as needing a product or behavior decision.ClawSweeper marked this issue as needing a product or behavior decision.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.clawsweeper:source-reproClawSweeper found a high-confidence source-level issue reproduction.ClawSweeper found a high-confidence source-level issue reproduction.enhancementNew feature or requestNew feature or requestimpact:securitySecurity boundary, credential, authz, sandbox, or sensitive-data risk.Security boundary, credential, authz, sandbox, or sensitive-data risk.issue-rating: 🦞 diamond lobsterVery strong issue quality with high-confidence source-level or clear reproduction.Very strong issue quality with high-confidence source-level or clear reproduction.
Type
Fields
Give feedbackNo fields configured for issues without a type.
Summary
Add denylist support to exec-approvals, complementing the existing allowlist. This enables "allow everything except X" policies.
Use Case
I want to:
gog gmail send(sending emails)gog gmail delete(deleting emails)beeper-send.sh(sending messages)Currently, exec-approvals only supports:
security: "deny"- block allsecurity: "allowlist"- allow only listed commandssecurity: "full"- allow everythingThere's no way to say "allow everything except these specific patterns."
Proposed Solution
Add a
denylistarray to exec-approvals config:{ "defaults": { "security": "denylist", "ask": "on-match", "denylist": [ { "id": "DENY-EMAIL-SEND", "pattern": "/opt/homebrew/bin/gog", "argsMatch": "gmail send", "reason": "Sending emails requires approval" }, { "id": "DENY-EMAIL-DELETE", "pattern": "/opt/homebrew/bin/gog", "argsMatch": "gmail delete", "reason": "Use 'gmail archive' instead" }, { "id": "DENY-BEEPER-SEND", "pattern": "*/beeper-send.sh", "reason": "Sending messages requires approval" } ] } }Key additions:
security: "denylist"mode - allow everything except matchesargsMatchfield - match against command arguments, not just binary pathask: "on-match"- prompt when denylist matches (vs blocking outright)Current Workarounds
security: "full"and hope agent guardrails work (unreliable)security: "allowlist"with a massive list of safe commands (tedious)Environment