feat(security): capability policy foundation (#690) - #744
Merged
Conversation
Introduce a versioned default-deny capability policy, shell-substitution and path-scope checks, and local capability audit logging on configured command execution. Refs #690. Co-authored-by: Cursor <cursoragent@cursor.com>
CodeDecay PR CheckLead catch: Config area changed — judge-lab/package.json touches a config area and should be reviewed for regression impact. Risk: Medium · Merge 69/100 · Decay 54/100 · Security 0/100 Full CodeDecay reportCodeDecay ReportOverall risk: Medium
Changed Files
Likely Impacted Areas
Normalized Impact GraphGraph artifact:
Symbol Impact EvidenceGraph artifact:
Language And Parser Coverage
Merge Risk Breakdown
Top contributors:
Notes:
Decay Risk Breakdown
Top contributors:
Dampeners:
Notes:
Security Risk Breakdown
Security Matcher Coverage
Test Evidence
Changed Path Test Proof
Untrusted Memory Context
High Risk Findings
Medium Risk Findings
Low Risk Findings
Recommended Checks
NotesCodeDecay is deterministic and local-first. This report was generated without telemetry, API keys, LLMs, or model calls. Found by CodeDecay - deterministic, local-first, no telemetry. |
Override fast-uri and undici to patched releases so the judge-lab CI audit gate passes for the capability-policy PR. Co-authored-by: Cursor <cursoragent@cursor.com>
Add allowlisted network destination checks, block credentials and metadata endpoints, and stop product health fetches from following off-allowlist redirects. Refs #690. Co-authored-by: Cursor <cursoragent@cursor.com>
kunaldhongade
added a commit
that referenced
this pull request
Aug 6, 2026
* feat(security): add capability policy foundation for agent workflows Introduce a versioned default-deny capability policy, shell-substitution and path-scope checks, and local capability audit logging on configured command execution. Refs #690. * fix(ci): clear judge-lab high npm audit findings Override fast-uri and undici to patched releases so the judge-lab CI audit gate passes for the capability-policy PR. * feat(security): validate network destinations and redirect hops Add allowlisted network destination checks, block credentials and metadata endpoints, and stop product health fetches from following off-allowlist redirects. Refs #690.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
safety.capabilityPolicyplus threat model docs (docs/security/threat-model.md).authorizeCapability, shell-substitution rejection, path-scope checks, and append-only.codedecay/local/capability-audit.jsonlintorunConfiguredCommand.allowCommandsas trusted user intent forcommand.execute; untrusted agent/memory/MCP/generated-experiment intents cannot elevate.Test plan
tsc -p tsconfig.base.json --noEmitvitest run packages/execution/test packages/config/testvitest run packages/harness/test packages/cli/test/config.test.ts packages/cli/test/execute.test.tspnpm --filter @submuxhq/codedecay pack --dry-runRefs #690 (foundation slice only — does not close the issue).