fix(provenance): feature flagged, inexact sidecars - #6491
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub. |
PR SummaryHigh Risk Overview Table and memory reads change behavior: one unrecorded row in a page no longer voids the whole Secret matching and provenance treat Provenance narrowing when a value cannot be fully scanned (large payloads, opaque refs, traversal limits) now over-approximates with all candidate entries instead of marking provenance incomplete and breaking downstream model boundaries. Reviewed by Cursor Bugbot for commit d26394b. Configure here. |
Greptile SummaryThe PR makes durable secret-provenance enforcement configurable per memory, table-row, and knowledge surface, defaulting unknown provenance to logging rather than execution failure. It also treats JSON boolean/null literals as non-identifying and preserves all candidate provenance when bounded value scanning cannot narrow the set.
Confidence Score: 5/5The PR appears safe to merge because the security trade-offs exposed by the new fail-open behavior are explicitly intentional, configurable, logged, and covered by targeted tests. The reviewed paths consistently apply the new per-surface policy, retain fail-closed handling for malformed provenance, and test both enforcement modes and the revised matcher behavior; no unacknowledged actionable defect remains.
|
| Filename | Overview |
|---|---|
| apps/sim/lib/execution/durable-secret-provenance-enforcement.ts | Introduces cached parsing and reporting for surface-specific durable provenance enforcement. |
| apps/sim/lib/execution/durable-secret-provenance.ts | Makes unknown provenance fail open for explicitly named, unenforced durable surfaces while malformed sidecars remain fail closed. |
| apps/sim/lib/table/rows/secret-provenance.ts | Skips and reports unrecorded rows when table enforcement is disabled instead of invalidating an entire result page. |
| apps/sim/lib/knowledge/secret-provenance.ts | Routes knowledge provenance imports through the new surface-specific enforcement policy. |
| apps/sim/executor/handlers/agent/memory.ts | Applies the memory enforcement policy to stored and per-message provenance imports. |
| apps/sim/executor/utils/resolved-secret-trace-registry.ts | Excludes non-identifying literals and falls back to unnarrowed candidate provenance for values that cannot be fully scanned. |
| apps/sim/executor/utils/resolved-secret-match-policy.ts | Defines exact lowercase JSON boolean/null renderings as non-identifying secret literals. |
| apps/sim/lib/core/config/env.ts | Registers the new optional durable provenance enforcement environment variable. |
Flowchart
%%{init: {'theme': 'neutral'}}%%
flowchart TD
A[Read durable content] --> B{Provenance exact?}
B -- Yes --> C[Import recorded entries]
B -- No --> D{Surface enforced?}
D -- Yes --> E[Mark registry incomplete and refuse]
D -- No --> F[Log unrecorded provenance and continue]
C --> G[Project content at model boundary]
F --> G
G --> H{Registry complete?}
H -- No --> E
H -- Yes --> I[Replace known secret matches]
Reviews (1): Last reviewed commit: "update test" | Re-trigger Greptile
Summary
Feature flag durable surface provenance to log and not fail.
Type of Change
Testing
N/A
Checklist