feat(secrets): let workspace secrets opt out of redaction - #7045
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub. |
PR SummaryHigh Risk Overview Configuration & API: Secret details get a Visibility toggle (same save flow as description). The flag is stored on Runtime: Environment snapshots carry Docs add a Visibility section describing scope and risk. Reviewed by Cursor Bugbot for commit f6711ea. Configure here. |
Greptile SummaryAdds an opt-in plaintext visibility setting for workspace secrets and carries that setting through persistence, execution redaction, provenance, APIs, generated clients, UI, and documentation.
Confidence Score: 5/5The PR appears safe to merge. No blocking failure remains.
|
| Filename | Overview |
|---|---|
| apps/sim/executor/utils/resolved-secret-trace-registry.ts | Adds catalog-derived exemptions while retaining collision, incompleteness, fork, and cross-workspace protections. |
| apps/sim/app/api/function/execute/route.ts | Applies certified exemption names when classifying sandbox exports and preserves resolved-name usage reporting. |
| apps/sim/lib/secrets/application/use-cases.ts | Extends secret operations with workspace-only visibility semantics and authorization enforcement. |
| apps/sim/app/api/v2/secrets/route.ts | Includes stored values only for list rows marked visible, with own-property-safe value lookup. |
| apps/sim/app/workspace/[workspaceId]/settings/secrets/[credentialId]/secret-detail.tsx | Adds the documented Label and Switch boolean-toggle pattern for workspace-secret visibility. |
| packages/db/migrations/0304_slippery_carmella_unuscione.sql | Adds the visibility column with a false default for existing and newly created credentials. |
Flowchart
%%{init: {'theme': 'neutral'}}%%
flowchart LR
Admin[Credential admin] --> Toggle[Enable workspace-secret visibility]
Toggle --> DB[(credential.unredacted)]
DB --> Resolve[Resolve execution environment]
Resolve --> Registry[Resolved-secret registry]
Registry --> Logs[Run logs and Chat]
Registry --> Sandbox[Sandbox output and exported files]
DB --> API[v2 secrets list]
API --> Visible{Secret marked visible?}
Visible -->|Yes| Value[Return metadata and value]
Visible -->|No| Metadata[Return metadata only]
Reviews (3): Last reviewed commit: "fix(secrets): read visible values by own..." | Re-trigger Greptile
|
@cursor review |
…secrets cannot poison the list
|
@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 f6711ea. Configure here.
Summary
unredactedflag on workspace secrets (secret details page → Visibility, saved through the page's Save/Discard flow) that shows the value in plaintext across surfaces instead of{{NAME}}: run logs, Chat/model-visible content, sandbox output, and exported-file provenancevaluefor visible rows — the only read response that ever includes one — so external agents can read declared-visible values directly instead of scraping logs; personal-scope writes of the flag are rejected at every layerdescription(credential admins); the copilotset_environment_variablespath is pinned so Sim can never flip the flag itself; flips are audited on both surfaces with the new valuecredential.unredactedcolumn (default false) + regenerated OpenAPI and CLI API artifactsType of Change
Testing
check:audits(33 audits),check:api-validation:strict,check:migrations origin/staging,check:openapiall passChecklist