Skip to content

v0.7.61: private provenance alignment - #6326

Merged
icecrasher321 merged 1 commit into
mainfrom
staging
Aug 6, 2026
Merged

v0.7.61: private provenance alignment#6326
icecrasher321 merged 1 commit into
mainfrom
staging

Conversation

@icecrasher321

Copy link
Copy Markdown
Collaborator

fix(tools): align private provenance with wire payloads (#6325)

* fix(tools): align private provenance with wire payloads
* fix(execution): separate provenance source from actor
@vercel

vercelBot commented Aug 6, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

1 Skipped Deployment
ProjectDeploymentActionsUpdated (UTC)
docsSkippedSkippedAug 6, 2026 10:56am

Request Review

@cursor

cursorBot commented Aug 6, 2026

Copy link
Copy Markdown

PR Summary

Medium Risk
Changes secret provenance admission and internal tool error surfacing in security-sensitive execution paths; rules are tightened with broad test coverage but cross-user same-workspace acceptance is a deliberate authorization boundary shift.

Overview
Private secret provenance no longer requires the provenance scope.userId to match the authenticated actor when the write targets a workspace. New isPrivateSecretProvenanceScopeCompatible admits any source in the same workspaceId while still rejecting other workspaces and blocking workspace-scoped provenance on personal (workspace-less) destinations. Table row validation and durableSecretProvenanceFromPrivateBundle use this rule so workflow-owner traces can persist under a billing actor in the same workspace, with source user/workspace preserved on stored entries.

Table batch writes align provenance selection keys with what actually ships on the wire: selectTableRowSecretProvenance skips undefined cell values (same as JSON.stringify on row objects) and tests lock keys to the serialized batch_insert_rows body.

Internal tool transport hardens failure handling: unverified or non-error HTTP responses are rebuilt with safe JSON errors—real 4xx–5xx keep their status with a generic message so route bodies/headers are not leaked; other cases become 502 metadata verification failures. Added tests for table/memory error paths and registry behavior when provenance crosses from another user in the same workspace (anonymous trace labels).

Reviewed by Cursor Bugbot for commit 71d7d8d. Configure here.

@icecrasher321
icecrasher321 merged commit e1ab24c into mainAug 6, 2026
44 checks passed
@greptile-apps

Copy link
Copy Markdown
Contributor

Greptile Summary

The PR aligns private secret provenance with serialized tool payloads and permits provenance to cross user identities only within an already-authorized workspace.

  • Introduces a shared scope-compatibility check that preserves personal and cross-workspace isolation.
  • Omits undefined table fields from provenance selections to match JSON serialization.
  • Sanitizes unverifiable internal-tool responses while retaining valid HTTP error statuses.
  • Adds coverage across knowledge, memory, table, file, executor, and tool-response flows.

Confidence Score: 5/5

The PR appears safe to merge, with workspace and personal provenance boundaries preserved across the changed paths.

The changed scope checks reject cross-workspace and mismatched personal provenance, table selections remain aligned with serialized request bodies, and unverifiable tool responses expose only sanitized failures.

Important Files Changed

FilenameOverview
apps/sim/lib/execution/durable-secret-provenance.tsCentralizes scope admission so workspace resources accept same-workspace sources while personal resources retain exact-user isolation.
apps/sim/app/api/table/row-secret-provenance.tsApplies the shared scope-compatibility policy to table writes without weakening cross-workspace rejection.
apps/sim/lib/table/secret-provenance-selection.tsFilters undefined top-level fields so provenance selections match the JSON-serialized row payload.
apps/sim/tools/index.tsRebuilds unverifiable private-metadata responses with sanitized bodies and headers while preserving legitimate HTTP error statuses.
apps/sim/app/api/tools/file/manage/route.tsRenames the expected scope concept to destination scope, reflecting the shared same-workspace provenance policy.

Flowchart

%%{init: {'theme': 'neutral'}}%%
flowchart LR
A[Tool input and secret trace] --> B[Serialize wire payload]
B --> C[Attach private provenance bundle]
C --> D[Authenticated internal route]
D --> E{Scope compatible?}
E -->|Same destination workspace| F[Accept source provenance]
E -->|Personal resource and same user| F
E -->|Cross-workspace or mismatched personal user| G[Reject request]
F --> H[Persist or propagate durable provenance]
Loading

Reviews (1): Last reviewed commit: "fix(tools): align private provenance wit..." | Re-trigger Greptile

Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant

@icecrasher321