Skip to content

feat(security): capability policy foundation (#690) - #744

Merged
kunaldhongade merged 3 commits into
mainfrom
feature/690-capability-policy-foundation
Aug 6, 2026
Merged

feat(security): capability policy foundation (#690)#744
kunaldhongade merged 3 commits into
mainfrom
feature/690-capability-policy-foundation

Conversation

@kunaldhongade

@kunaldhongade kunaldhongade commented Aug 6, 2026

Copy link
Copy Markdown
Member

Summary

  • Adds a versioned default-deny safety.capabilityPolicy plus threat model docs (docs/security/threat-model.md).
  • Wires authorizeCapability, shell-substitution rejection, path-scope checks, and append-only .codedecay/local/capability-audit.jsonl into runConfiguredCommand.
  • Keeps allowCommands as trusted user intent for command.execute; untrusted agent/memory/MCP/generated-experiment intents cannot elevate.

Test plan

  • tsc -p tsconfig.base.json --noEmit
  • vitest run packages/execution/test packages/config/test
  • vitest run packages/harness/test packages/cli/test/config.test.ts packages/cli/test/execute.test.ts
  • build execution/config/cli + pnpm --filter @submuxhq/codedecay pack --dry-run
  • CI green

Refs #690 (foundation slice only — does not close the issue).

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>
@github-actions github-actions Bot added documentation Improvements or additions to documentation type: test Test coverage, fixtures, or verification improvements area: docs README, community files, or documentation area: config CodeDecay project configuration area: adapters External tool adapter orchestration area: execution Safe command and behavior probe execution area: dev-experience Contributor local setup and agent workflow area: redteam Redteam orchestration and PR safety harness labels Aug 6, 2026
@github-actions

github-actions Bot commented Aug 6, 2026

Copy link
Copy Markdown

CodeDecay PR Check

Lead catch: Config area changed — judge-lab/package.json:43

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 report

CodeDecay Report

Overall risk: Medium

Score Value
Merge risk 69/100
Decay risk 54/100
Security risk 0/100
Findings Count
High 7
Medium 12
Low 32

Changed Files

  • .codedecay/config.example.yml modified (+2/-0)
  • .gitignore modified (+1/-0)
  • docs/.vitepress/config.mts modified (+1/-0)
  • docs/configuration.md modified (+21/-0)
  • docs/security/threat-model.md added (+109/-0)
  • judge-lab/package-lock.json modified (+6/-6)
  • judge-lab/package.json modified (+3/-1)
  • packages/adapters/test/adapters.test.ts modified (+5/-1)
  • packages/cli/src/product/runtime/health.ts modified (+15/-3)
  • packages/config/src/clone.ts modified (+5/-1)
  • packages/config/src/defaults/config.ts modified (+6/-1)
  • packages/config/src/index.ts modified (+7/-0)
  • packages/config/src/normalize/capability-policy.ts added (+112/-0)
  • packages/config/src/normalize/safety.ts modified (+13/-2)
  • packages/config/src/types.ts modified (+9/-0)
  • packages/config/src/types/capability-policy.ts added (+40/-0)
  • packages/config/src/types/safety.ts modified (+7/-0)
  • packages/config/test/capability-policy.test.ts added (+71/-0)
  • packages/config/test/config-defaults-loading.test.ts modified (+5/-1)
  • packages/config/test/fixtures/full-config.ts modified (+5/-1)
  • ...and 13 more file(s)

Likely Impacted Areas

  • Medium Build and runtime configuration (config): judge-lab/package.json
  • Low Dependency lockfile (config): judge-lab/package-lock.json
  • Low Documentation (docs): docs/.vitepress/config.mts, docs/configuration.md, docs/security/threat-model.md
  • Low Source code (source): packages/cli/src/product/runtime/health.ts, packages/config/src/clone.ts, packages/config/src/defaults/config.ts, packages/config/src/index.ts, packages/config/src/normalize/capability-policy.ts, packages/config/src/normalize/safety.ts, packages/config/src/types.ts, packages/config/src/types/capability-policy.ts, packages/config/src/types/safety.ts, packages/execution/src/capability/audit.ts, packages/execution/src/capability/authorize.ts, packages/execution/src/capability/index.ts, packages/execution/src/capability/network.ts, packages/execution/src/capability/paths.ts, packages/execution/src/capability/shell.ts, packages/execution/src/capability/types.ts, packages/execution/src/command.ts, packages/execution/src/index.ts, packages/execution/src/types.ts
  • Low Tests (test): packages/adapters/test/adapters.test.ts, packages/config/test/capability-policy.test.ts, packages/config/test/config-defaults-loading.test.ts, packages/config/test/fixtures/full-config.ts, packages/execution/test/capability-policy.test.ts, packages/redteam/test/helpers/redteam.ts, packages/tool-adapters/test/helpers.ts

Normalized Impact Graph

Graph artifact: .codedecay/local/impact-graph.json (4365 node(s), 8860 edge(s))

  • Confidence: Direct: 8860, inferred: 0, heuristic: 0
  • codedecay-js-babel-symbols via @babel/parser (available, adapter 1.0.0)
    • Limitation: Call expressions are not connected to target symbols in this adapter version.
    • Limitation: Only JavaScript and TypeScript files parsed by @babel/parser are represented.
    • Limitation: Static import resolution does not resolve runtime dependency injection or dynamic imports.
  • codedecay-python-lezer via @lezer/python (available, adapter 1.0.0)
    • Limitation: Dynamic imports, dependency injection, decorators without literal routes, and framework route registries are not resolved.
    • Limitation: Python impact evidence uses the @lezer/python grammar and conservative module-to-file resolution.
    • Limitation: Static test imports do not prove execution or assertion quality.
  • Graph limitation: A static test import does not prove the symbol executed or that assertions cover its behavior.

Symbol Impact Evidence

Graph artifact: .codedecay/local/symbol-impact-graph.json (927 file(s), 5500 edge(s))

  • packages/cli/src/product/runtime/health.ts#pollProductHealth -> packages/cli/src/product/runtime/target.ts
  • packages/config/src/clone.ts#cloneConfig -> packages/config/src/load.ts
  • packages/config/src/defaults/config.ts#DEFAULT_CODEDECAY_CONFIG -> packages/config/src/defaults.ts, packages/config/src/index.ts, packages/config/src/load.ts, packages/config/src/normalize/commands.ts, packages/config/src/normalize/llm.ts, packages/config/src/normalize/memory-providers.ts, packages/config/src/normalize/plugins.ts, packages/config/src/normalize/product.ts, packages/config/src/normalize/safety.ts
  • packages/config/src/index.ts#CodeDecayAgentBundleFormat -> packages/tool-adapters/src/agent-process/bundle.ts, packages/tool-adapters/src/agent-process/constants.ts, packages/tool-adapters/src/agent-process/evidence.ts, packages/tool-adapters/src/agent-process/types.ts, packages/tool-adapters/src/agent-process/validation.ts, packages/tool-adapters/src/types.ts
  • packages/config/src/index.ts#CodeDecayAgentProcessToolAdapter -> packages/tool-adapters/src/agent-process/configured.ts, packages/tool-adapters/src/types.ts
  • packages/config/src/index.ts#CodeDecayAgentProfile -> packages/tool-adapters/src/agent-process/bundle.ts, packages/tool-adapters/src/agent-process/constants.ts, packages/tool-adapters/src/agent-process/evidence.ts, packages/tool-adapters/src/agent-process/validation.ts, packages/tool-adapters/src/types.ts
  • packages/config/src/index.ts#CodeDecayCommandToolAdapter -> packages/tool-adapters/src/pact/configured.ts, packages/tool-adapters/src/playwright/configured.ts, packages/tool-adapters/src/types.ts
  • packages/config/src/index.ts#CodeDecayConfig -> packages/adapters/src/configured-commands.ts, packages/adapters/src/types.ts, packages/adapters/test/adapters.test.ts, packages/cli/src/commands/differential/api-contracts.ts, packages/cli/src/commands/loop.ts, packages/config/test/fixtures/full-config.ts, packages/redteam/src/checks.ts, packages/redteam/src/experiments.ts, packages/redteam/src/types.ts, packages/redteam/test/helpers/redteam.ts, packages/tool-adapters/src/index.ts, packages/tool-adapters/src/types.ts, packages/tool-adapters/test/helpers.ts
    • Likely tests: packages/adapters/test/adapters.test.ts, packages/config/test/fixtures/full-config.ts, packages/redteam/test/helpers/redteam.ts, packages/tool-adapters/test/helpers.ts
  • packages/config/src/index.ts#CodeDecayCoverageFailOn -> packages/tool-adapters/src/types.ts
  • packages/config/src/index.ts#CodeDecayCoverageToolAdapter -> packages/tool-adapters/src/types.ts
  • packages/config/src/index.ts#CodeDecayExternalMemoryProviderConfig -> packages/cli/src/memory/configured-providers.ts
  • packages/config/src/index.ts#CodeDecayLlmConfig -> packages/cli/src/commands/redteam-investigation.ts, packages/llm/src/providers/factory.ts
  • ...and 78 more symbol impact(s)

Language And Parser Coverage

  • Source files classified: 26
  • Fully supported parser files: 26
  • Limited files: 0
  • Unsupported files: 0

Merge Risk Breakdown

  • Score: 69/100
  • Raw score before dampeners: 100/100
  • Adjusted score before severity cap: 100/100
  • Highest contributing severity: Medium

Top contributors:

  • +18 Change size (structural): Changed lines amplify review cost across 33 file(s).
  • +16 Config area changed (direct): judge-lab/package.json touches a config area and should be reviewed for regression impact.
  • +12 File spread (structural): Change breadth spans 33 file(s).
  • +6 Config area changed (direct): judge-lab/package-lock.json touches a config area and should be reviewed for regression impact.
  • +4 Docs area changed (heuristic): docs/.vitepress/config.mts touches a docs area and should be reviewed for regression impact.

Notes:

  • Untrusted memory context is visible but contributes 0 score until trusted evidence corroborates it.

Decay Risk Breakdown

  • Score: 54/100
  • Raw score before dampeners: 100/100
  • Adjusted score before severity cap: 84/100
  • Highest contributing severity: High
  • Evidence mode: heuristic-only

Top contributors:

  • +18 Broad unrelated change set (heuristic): This PR changes 29 files across 4 top-level areas and 3 risk categories.
  • +10 Duplicated added logic (heuristic): A similar block of added logic appears 2 times across 2 file(s).
  • +10 Duplicated added logic (heuristic): A similar block of added logic appears 2 times across 2 file(s).
  • +10 Duplicated added logic (heuristic): A similar block of added logic appears 2 times across 2 file(s).
  • +10 Duplicated added logic (heuristic): A similar block of added logic appears 2 times across 2 file(s).

Dampeners:

  • -16 Heuristic-only dampener: Decay stays conservative until direct evidence exists.

Notes:

  • Heuristic-only decay is capped at 54/100 until direct evidence exists.

Security Risk Breakdown

  • Score: 0/100
  • Raw score before dampeners: 0/100
  • Adjusted score before severity cap: 0/100

Security Matcher Coverage

  • Changed source files scanned: 19
  • Security candidates found: 0
  • Skipped files: 0

Test Evidence

  • Mode: heuristic-only
  • Sources: none
  • Changed source coverage:
  • packages/cli/src/product/runtime/health.ts: not measured (no measurable changed lines)
  • packages/config/src/clone.ts: not measured (no measurable changed lines)
  • packages/config/src/defaults/config.ts: not measured (no measurable changed lines)
  • packages/config/src/index.ts: not measured (no measurable changed lines)
  • packages/config/src/normalize/capability-policy.ts: not measured (no measurable changed lines)
  • packages/config/src/normalize/safety.ts: not measured (no measurable changed lines)
  • packages/config/src/types.ts: not measured (no measurable changed lines)
  • packages/config/src/types/capability-policy.ts: not measured (no measurable changed lines)
  • Notes:
  • No runtime coverage artifact was found. Test audit remains heuristic-only.

Changed Path Test Proof

Status Count
Runtime-proven 0
Static-only 31
Weakened by mocks 0
Unproven 59
  • Static-only packages/cli/src/product/runtime/health.ts#pollProductHealth (static-reference, deterministic)
    • Evidence: Referenced by packages/adapters/test/adapters.test.ts, packages/config/test/fixtures/full-config.ts, packages/execution/test/capability-policy.test.ts, but no runtime coverage artifact proves changed lines executed.
    • Static references: packages/adapters/test/adapters.test.ts, packages/config/test/fixtures/full-config.ts, packages/execution/test/capability-policy.test.ts
    • Repair task: Strengthen packages/adapters/test/adapters.test.ts so it executes packages/cli/src/product/runtime/health.ts#pollProductHealth with assertions; static import alone is not proof.
  • Unproven packages/config/src/clone.ts#cloneConfig (missing-proof, heuristic)
    • Evidence: No runtime coverage or static test reference was found for this changed path.
    • Repair task: Add an integration test that reaches packages/config/src/clone.ts#cloneConfig without mocking the changed boundary.
  • Unproven packages/config/src/defaults/config.ts#DEFAULT_CODEDECAY_CONFIG (missing-proof, heuristic)
    • Evidence: No runtime coverage or static test reference was found for this changed path.
    • Repair task: Add an integration test that reaches packages/config/src/defaults/config.ts#DEFAULT_CODEDECAY_CONFIG without mocking the changed boundary.
  • Unproven packages/config/src/index.ts#CodeDecayAgentBundleFormat (missing-proof, heuristic)
    • Evidence: No runtime coverage or static test reference was found for this changed path.
    • Repair task: Add an integration test that reaches packages/config/src/index.ts#CodeDecayAgentBundleFormat without mocking the changed boundary.
  • Unproven packages/config/src/index.ts#CodeDecayAgentProcessToolAdapter (missing-proof, heuristic)
    • Evidence: No runtime coverage or static test reference was found for this changed path.
    • Repair task: Add an integration test that reaches packages/config/src/index.ts#CodeDecayAgentProcessToolAdapter without mocking the changed boundary.
  • Unproven packages/config/src/index.ts#CodeDecayAgentProfile (missing-proof, heuristic)
    • Evidence: No runtime coverage or static test reference was found for this changed path.
    • Repair task: Add an integration test that reaches packages/config/src/index.ts#CodeDecayAgentProfile without mocking the changed boundary.
  • Unproven packages/config/src/index.ts#CodeDecayCommandToolAdapter (missing-proof, heuristic)
    • Evidence: No runtime coverage or static test reference was found for this changed path.
    • Repair task: Add an integration test that reaches packages/config/src/index.ts#CodeDecayCommandToolAdapter without mocking the changed boundary.
  • Static-only packages/config/src/index.ts#CodeDecayConfig (static-reference, deterministic)
    • Evidence: Referenced by packages/adapters/test/adapters.test.ts, packages/config/test/fixtures/full-config.ts, packages/redteam/test/helpers/redteam.ts, packages/tool-adapters/test/helpers.ts, but no runtime coverage artifact proves changed lines executed.
    • Static references: packages/adapters/test/adapters.test.ts, packages/config/test/fixtures/full-config.ts, packages/redteam/test/helpers/redteam.ts, packages/tool-adapters/test/helpers.ts
    • Repair task: Strengthen packages/adapters/test/adapters.test.ts so it executes packages/config/src/index.ts#CodeDecayConfig with assertions; static import alone is not proof.
  • ...and 82 more changed path proof entries

Untrusted Memory Context

  • Project invariant may be impacted (judge-lab/package-lock.json:3285): Untrusted memory context: invariant "No hidden cloud or model call" applies to this change. The OSS CLI must remain useful without telemetry, API keys, hosted services, required LLM calls, or CodeDecayCloud.
  • Project invariant may be impacted (judge-lab/package-lock.json:3285): Untrusted memory context: invariant "Commands are explicit" applies to this change. CodeDecay must not run project commands unless they are configured and safety.allowCommands is true.
  • Project invariant may be impacted (docs/.vitepress/config.mts:77): Untrusted memory context: invariant "Tool evidence is separate from AI suggestions" applies to this change. Reports must not present agent/model suggestions as verified evidence unless backed by deterministic checks or command output.
  • Project invariant may be impacted (judge-lab/package.json:43): Untrusted memory context: invariant "Package remains installable from npm" applies to this change. The published package must include README, LICENSE, package.json, dist/index.js, and dist/index.d.ts without workspace-only dependency leaks.
  • Past regression area changed (packages/redteam/test/helpers/redteam.ts:173): Untrusted memory context: past regression "Redteam output had non-actionable edge cases" may be relevant. Edge-case output previously included bare file paths and repeated generic fix-task titles, which made agent handoff less useful.
  • Past regression area changed (judge-lab/package.json:43): Untrusted memory context: past regression "Published npm package leaked workspace protocol" may be relevant. Published package installation failed when workspace protocol dependencies leaked into the npm package.
  • Project invariant may be impacted (docs/.vitepress/config.mts:77): Untrusted memory context: invariant "Output must be actionable" applies to this change. Redteam reports and agent bundles should say what behavior to verify, which test proof is weak or missing, and what task a coding agent should perform.
  • Architecture note applies (judge-lab/package.json:43): Untrusted architecture context: CLI is the published surface: The public npm package is @submuxhq/codedecay and the binary is codedecay. Internal workspace packages are implementation details.
  • Architecture note applies (packages/execution/src/capability/audit.ts:1): Untrusted architecture context: Local-first redteam workflow: codedecay redteam is deterministic and report-only by default. Command execution and LLM/provider use require explicit user configuration.

High Risk Findings

  • Broad unrelated change set: This PR changes 29 files across 4 top-level areas and 3 risk categories.

Medium Risk Findings

  • Duplicated added logic (packages/config/src/index.ts:3): A similar block of added logic appears 2 times across 2 file(s).
  • Duplicated added logic (packages/execution/src/capability/audit.ts:10): A similar block of added logic appears 2 times across 2 file(s).
  • Duplicated added logic (packages/execution/src/capability/audit.ts:11): A similar block of added logic appears 2 times across 2 file(s).
  • Duplicated added logic (packages/execution/src/capability/audit.ts:12): A similar block of added logic appears 2 times across 2 file(s).
  • Duplicated added logic (packages/execution/src/capability/audit.ts:13): A similar block of added logic appears 2 times across 2 file(s).
  • High complexity in changed function (packages/execution/src/capability/network.ts:38): validateNetworkDestination has estimated cyclomatic complexity 12.
  • High complexity in changed function (packages/execution/src/capability/network.ts:232): isPrivateOrLinkLocalAddress has estimated cyclomatic complexity 18.
  • High complexity in changed function (packages/execution/src/capability/paths.ts:14): checkPathWithinAllowedRoots has estimated cyclomatic complexity 12.
  • High complexity in changed function (packages/execution/src/command.ts:12): runConfiguredCommand has estimated cyclomatic complexity 18.
  • Large changed function (packages/execution/src/command.ts:12): runConfiguredCommand spans 178 lines, which increases review and regression risk.
  • Config area changed (judge-lab/package.json:43): judge-lab/package.json touches a config area and should be reviewed for regression impact.

Low Risk Findings

  • Config area changed (judge-lab/package-lock.json:3285): judge-lab/package-lock.json touches a config area and should be reviewed for regression impact.
  • Docs area changed (docs/.vitepress/config.mts:77): docs/.vitepress/config.mts touches a docs area and should be reviewed for regression impact.
  • Docs area changed (docs/configuration.md:119): docs/configuration.md touches a docs area and should be reviewed for regression impact.
  • Docs area changed (docs/security/threat-model.md:1): docs/security/threat-model.md touches a docs area and should be reviewed for regression impact.
  • Source area changed (packages/cli/src/product/runtime/health.ts:2): packages/cli/src/product/runtime/health.ts touches a source area and should be reviewed for regression impact.
  • Source area changed (packages/config/src/clone.ts:10): packages/config/src/clone.ts touches a source area and should be reviewed for regression impact.
  • Source area changed (packages/config/src/defaults/config.ts:2): packages/config/src/defaults/config.ts touches a source area and should be reviewed for regression impact.
  • Source area changed (packages/config/src/index.ts:3): packages/config/src/index.ts touches a source area and should be reviewed for regression impact.
  • Source area changed (packages/config/src/normalize/capability-policy.ts:1): packages/config/src/normalize/capability-policy.ts touches a source area and should be reviewed for regression impact.
  • Source area changed (packages/config/src/normalize/safety.ts:3): packages/config/src/normalize/safety.ts touches a source area and should be reviewed for regression impact.
  • Source area changed (packages/config/src/types.ts:22): packages/config/src/types.ts touches a source area and should be reviewed for regression impact.
  • Source area changed (packages/config/src/types/capability-policy.ts:1): packages/config/src/types/capability-policy.ts touches a source area and should be reviewed for regression impact.
  • Source area changed (packages/config/src/types/safety.ts:1): packages/config/src/types/safety.ts touches a source area and should be reviewed for regression impact.
  • Source area changed (packages/execution/src/capability/audit.ts:1): packages/execution/src/capability/audit.ts touches a source area and should be reviewed for regression impact.
  • Source area changed (packages/execution/src/capability/authorize.ts:1): packages/execution/src/capability/authorize.ts touches a source area and should be reviewed for regression impact.
  • Source area changed (packages/execution/src/capability/index.ts:1): packages/execution/src/capability/index.ts touches a source area and should be reviewed for regression impact.
  • Source area changed (packages/execution/src/capability/network.ts:1): packages/execution/src/capability/network.ts touches a source area and should be reviewed for regression impact.
  • Source area changed (packages/execution/src/capability/paths.ts:1): packages/execution/src/capability/paths.ts touches a source area and should be reviewed for regression impact.
  • Source area changed (packages/execution/src/capability/shell.ts:1): packages/execution/src/capability/shell.ts touches a source area and should be reviewed for regression impact.
  • Source area changed (packages/execution/src/capability/types.ts:1): packages/execution/src/capability/types.ts touches a source area and should be reviewed for regression impact.
  • Source area changed (packages/execution/src/command.ts:1): packages/execution/src/command.ts touches a source area and should be reviewed for regression impact.
  • Source area changed (packages/execution/src/index.ts:3): packages/execution/src/index.ts touches a source area and should be reviewed for regression impact.
  • Source area changed (packages/execution/src/types.ts:1): packages/execution/src/types.ts touches a source area and should be reviewed for regression impact.
  • Test area changed (packages/adapters/test/adapters.test.ts:188): packages/adapters/test/adapters.test.ts touches a test area and should be reviewed for regression impact.
  • Test area changed (packages/config/test/capability-policy.test.ts:1): packages/config/test/capability-policy.test.ts touches a test area and should be reviewed for regression impact.
  • Test area changed (packages/config/test/config-defaults-loading.test.ts:23): packages/config/test/config-defaults-loading.test.ts touches a test area and should be reviewed for regression impact.
  • Test area changed (packages/config/test/fixtures/full-config.ts:112): packages/config/test/fixtures/full-config.ts touches a test area and should be reviewed for regression impact.
  • Test area changed (packages/execution/test/capability-policy.test.ts:1): packages/execution/test/capability-policy.test.ts touches a test area and should be reviewed for regression impact.
  • Test area changed (packages/redteam/test/helpers/redteam.ts:173): packages/redteam/test/helpers/redteam.ts touches a test area and should be reviewed for regression impact.
  • Test area changed (packages/tool-adapters/test/helpers.ts:63): packages/tool-adapters/test/helpers.ts touches a test area and should be reviewed for regression impact.

Recommended Checks

  • Add an integration test that reaches packages/config/src/clone.ts#cloneConfig without mocking the changed boundary.
  • Add an integration test that reaches packages/config/src/defaults/config.ts#DEFAULT_CODEDECAY_CONFIG without mocking the changed boundary.
  • Add an integration test that reaches packages/config/src/index.ts#CodeDecayAgentBundleFormat without mocking the changed boundary.
  • Add an integration test that reaches packages/config/src/index.ts#CodeDecayAgentProcessToolAdapter without mocking the changed boundary.
  • Add an integration test that reaches packages/config/src/index.ts#CodeDecayAgentProfile without mocking the changed boundary.
  • Add an integration test that reaches packages/config/src/index.ts#CodeDecayCommandToolAdapter without mocking the changed boundary.
  • Add an integration test that reaches packages/config/src/index.ts#CodeDecayCoverageFailOn without mocking the changed boundary.
  • Add an integration test that reaches packages/config/src/index.ts#CodeDecayCoverageToolAdapter without mocking the changed boundary.
  • Add an integration test that reaches packages/config/src/index.ts#CodeDecayExternalMemoryProviderConfig without mocking the changed boundary.
  • Add an integration test that reaches packages/config/src/index.ts#CodeDecayLlmConfig without mocking the changed boundary.
  • Add an integration test that reaches packages/config/src/index.ts#CodeDecayMemoryProvidersConfig without mocking the changed boundary.
  • Add an integration test that reaches packages/config/src/index.ts#CodeDecayProductApiEndpoint without mocking the changed boundary.

Notes

CodeDecay 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.

kunaldhongade and others added 2 commits August 6, 2026 16:59
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>
@github-actions github-actions Bot added the area: cli CLI package or command behavior label Aug 6, 2026
@kunaldhongade
kunaldhongade merged commit 6428400 into main Aug 6, 2026
10 checks passed
@kunaldhongade
kunaldhongade deleted the feature/690-capability-policy-foundation branch August 6, 2026 12:16
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.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area: adapters External tool adapter orchestration area: cli CLI package or command behavior area: config CodeDecay project configuration area: dev-experience Contributor local setup and agent workflow area: docs README, community files, or documentation area: execution Safe command and behavior probe execution area: redteam Redteam orchestration and PR safety harness documentation Improvements or additions to documentation type: test Test coverage, fixtures, or verification improvements

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant