Skip to content

fix(security): redact workflow snapshot secrets - #6581

Merged
TheodoreSpeaks merged 5 commits into
stagingfrom
fix/workflow-snapshot-secret-sanitization
Aug 12, 2026
Merged

fix(security): redact workflow snapshot secrets#6581
TheodoreSpeaks merged 5 commits into
stagingfrom
fix/workflow-snapshot-secret-sanitization

Conversation

@TheodoreSpeaks

@TheodoreSpeaks TheodoreSpeaks commented Aug 12, 2026

Copy link
Copy Markdown
Collaborator

Summary

  • reuse the workflow search/replace codecs to classify nested built-in tool parameters
  • keep custom, MCP, and unknown tool schemas non-authoritative even when their IDs collide with built-ins
  • redact password, OAuth, advanced credential-reference, malformed, opaque-table, and unclassified values fail-closed
  • apply the shared hardened projection to v1/v2 execution logs and v2 workflow versions
  • preserve codec-classified safe built-in tool configuration and portable export behavior

Type of Change

  • Bug fix
  • Security fix

Testing

  • 99 focused sanitizer, codec, workflow-version, and v1/v2 public-log tests
  • Sim app typecheck
  • Full lint
  • Strict API validation
  • OpenAPI generation and validation
  • Tool-registry boundary audit
  • All 25 repository audits

Checklist

  • Code follows project style guidelines
  • Self-reviewed my changes
  • Tests added/updated and passing
  • No new warnings introduced
  • I confirm that I have read and agree to the terms outlined in the Contributor License Agreement (CLA)

@vercel

vercel Bot commented Aug 12, 2026

Copy link
Copy Markdown

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

Project Deployment Actions Updated (UTC)
docs Ready Ready Preview Aug 12, 2026 3:01am

Request Review

@cursor

cursor Bot commented Aug 12, 2026

Copy link
Copy Markdown

PR Summary

High Risk
Changes security-critical credential redaction on public API surfaces that expose workflow graphs. Incorrect classification could either leak secrets or over-redact legitimate configuration.

Overview
Closes credential leaks in public workflow snapshots by fail-closed redaction of opaque and nested secret-bearing fields.

sanitizeWorkflowForSharing now supports redactOpaqueCredentialInputs, which nulls entire table values and walks nested tool-input params through the search-replace codecs. Only authoritative built-in tool params keep non-sensitive values; custom, MCP, unknown, and malformed params are withheld. Safe {{VAR}} references remain preserved.

This hardened projection is applied to v1/v2 execution logs and v2 workflow version reads, with OpenAPI/contract descriptions updated to match.

Reviewed by Cursor Bugbot for commit ff82280. Bugbot is set up for automated code reviews on this repo. Configure here.

@greptile-apps

greptile-apps Bot commented Aug 12, 2026

Copy link
Copy Markdown
Contributor

Greptile Summary

The PR hardens public workflow snapshots by using shared tool-parameter codecs and withholding values whose safety cannot be authoritatively classified.

  • Redacts credential-bearing tables, nested sensitive tool parameters, and malformed or unclassified tool values.
  • Prevents custom and MCP tool IDs from resolving against colliding built-in registry definitions.
  • Applies the hardened projection to public execution logs and workflow-version responses.
  • Updates public API descriptions and focused sanitizer, indexer, log, and route tests.

Confidence Score: 5/5

The PR appears safe to merge.

No blocking failure remains.

Important Files Changed

Filename Overview
apps/sim/lib/workflows/credentials/credential-extractor.ts Adds fail-closed recursive sanitization for tool inputs, opaque tables, credential references, and malformed parameter shapes.
apps/sim/lib/workflows/search-replace/indexer.ts Exposes parameter-authority metadata and prevents custom or MCP tool identifiers from resolving as registered built-ins.
apps/sim/lib/logs/snapshot-sanitizer.ts Enables opaque credential-input redaction for retained execution snapshots.
apps/sim/lib/workflows/application/read-workflow-version.ts Applies the same hardened workflow projection to version-detail responses.
apps/sim/lib/workflows/search-replace/indexer.test.ts Verifies generic and colliding custom/MCP parameters remain non-authoritative.
apps/sim/lib/workflows/credentials/credential-extractor.test.ts Covers sensitive, safe, opaque, malformed, and unclassified sanitizer behavior.

Reviews (5): Last reviewed commit: "fix(security): isolate opaque tool schem..." | Re-trigger Greptile

Comment thread apps/sim/lib/workflows/credentials/credential-extractor.ts
Comment thread apps/sim/lib/workflows/credentials/credential-extractor.ts
@TheodoreSpeaks

Copy link
Copy Markdown
Collaborator Author

@greptile

@TheodoreSpeaks

Copy link
Copy Markdown
Collaborator Author

@cursor review

Comment thread apps/sim/lib/workflows/credentials/credential-extractor.ts
@TheodoreSpeaks
TheodoreSpeaks force-pushed the fix/workflow-snapshot-secret-sanitization branch from dde3fb8 to e2842f6 Compare August 12, 2026 02:28
@TheodoreSpeaks

Copy link
Copy Markdown
Collaborator Author

@greptile

@TheodoreSpeaks

Copy link
Copy Markdown
Collaborator Author

@cursor review

@cursor cursor Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

✅ Bugbot reviewed your changes and found no new issues!

1 issue from previous review remains unresolved.

Fix All in Cursor

Comment @cursor review or bugbot run to trigger another review on this PR

Reviewed by Cursor Bugbot for commit e2842f6. Configure here.

@TheodoreSpeaks
TheodoreSpeaks force-pushed the fix/workflow-snapshot-secret-sanitization branch from e2842f6 to 56ab7d0 Compare August 12, 2026 02:42
@TheodoreSpeaks

Copy link
Copy Markdown
Collaborator Author

@greptile

@TheodoreSpeaks

Copy link
Copy Markdown
Collaborator Author

@cursor review

@cursor cursor Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

✅ 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 56ab7d0. Configure here.

@TheodoreSpeaks
TheodoreSpeaks force-pushed the fix/workflow-snapshot-secret-sanitization branch from 56ab7d0 to ff82280 Compare August 12, 2026 02:56
@TheodoreSpeaks

Copy link
Copy Markdown
Collaborator Author

@greptile

@TheodoreSpeaks

Copy link
Copy Markdown
Collaborator Author

@cursor review

@cursor cursor Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

✅ 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 ff82280. Configure here.

@TheodoreSpeaks
TheodoreSpeaks merged commit 23318a1 into staging Aug 12, 2026
31 checks passed
@TheodoreSpeaks
TheodoreSpeaks deleted the fix/workflow-snapshot-secret-sanitization branch August 12, 2026 03:14
Sign up for free to 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