improvement(chat): secrets mounting / exposure improvements and controls - #6191
Conversation
…tion-secret-results
…tion-secret-results
…tion-secret-results
|
The latest updates on your projects. Learn more about Vercel for GitHub. |
PR SummaryHigh Risk Overview Exposure controls tighten elsewhere: workspace env GET masks other users’ personal secrets unless the viewer is a credential admin; credential list treats owned personal secrets as admin for raw view; Sim Chat secret policy stays in runtime inputs but is stripped from block logs and traces via Copilot Workflow execute can bind Reviewed by Cursor Bugbot for commit ea06a77. Configure here. |
|
@cursor review |
Greptile SummaryThis PR introduces explicit authorization, scoping, propagation, and output-projection controls for secrets used by Copilot code execution.
Confidence Score: 5/5The PR appears safe to merge because no blocking failure remains from the available follow-up review context. No blocking failure remains.
|
| Filename | Overview |
|---|---|
| apps/sim/lib/copilot/tools/secret-mount-materializer.server.ts | Adds actor-, workspace-, and credential-aware plaintext secret materialization with bounded, atomic decryption. |
| apps/sim/lib/copilot/tools/handlers/function-execute.ts | Extracts explicit secret references, applies mount policy, materializes authorized values, and propagates provenance. |
| apps/sim/executor/utils/resolved-secret-content-projection.ts | Adds non-mutating, fail-closed projection of activated secret values from supported result content. |
| apps/sim/app/api/copilot/confirm/route.ts | Seals generic client completions and validates workflow confirmations against durable claims and trusted execution state. |
| apps/sim/lib/workflows/schedules/orchestration.ts | Normalizes and persists scheduled-task secret access policy. |
| apps/sim/lib/mothership/inbox/executor.ts | Propagates Inbox secret policy while disabling plaintext mounting for external senders. |
| packages/db/schema.ts | Adds backward-compatible persisted secret-scope and mounted-secret fields for schedules and Inbox configuration. |
Sequence Diagram
sequenceDiagram
participant Surface as Chat / Schedule / Inbox
participant Policy as Secret policy
participant Copilot as Copilot lifecycle
participant Tool as Function execution
participant Auth as Secret materializer
participant Exec as Code runtime
participant Projection as Result projection
Surface->>Policy: all or selected secret configuration
Policy->>Copilot: normalized policy and secret actor
Copilot->>Tool: "execute code containing explicit {{KEY}} references"
Tool->>Policy: filter referenced names
Tool->>Auth: authorize actor and requested names
Auth-->>Tool: permitted plaintext values
Tool->>Exec: mount authorized values
Exec-->>Tool: runtime result
Tool->>Projection: result plus activated-secret provenance
Projection-->>Copilot: Copilot-safe projected result
Reviews (6): Last reviewed commit: "fix(copilot): trust compacted workflow c..." | Re-trigger Greptile
|
@cursor review |
|
@cursor review |
|
@cursor review |
|
@cursor review |
There was a problem hiding this comment.
✅ Bugbot reviewed your changes and found no new issues!
Comment @cursor review or bugbot run to trigger another review on this PR
Reviewed by Cursor Bugbot for commit ea06a77. Configure here.
Summary
Exposure and scoping of secrets usage for chat agent.
Type of Change
Testing
Tested manually
Checklist