Skip to content

fix(agent): overly broad check for secrets protection - #6399

Merged
icecrasher321 merged 5 commits into
stagingfrom
fix/agent-handler-broad-check
Aug 8, 2026
Merged

fix(agent): overly broad check for secrets protection#6399
icecrasher321 merged 5 commits into
stagingfrom
fix/agent-handler-broad-check

Conversation

@icecrasher321

@icecrasher321 icecrasher321 commented Aug 8, 2026

Copy link
Copy Markdown
Collaborator

Summary

Remove overly broad check for secrets for agent handler. And opaque input clearing.

Type of Change

  • Bug fix

Testing

Tested manually

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 8, 2026

Copy link
Copy Markdown

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

1 Skipped Deployment
Project Deployment Actions Updated (UTC)
docs Skipped Skipped Aug 8, 2026 3:22am

Request Review

@cursor

cursor Bot commented Aug 8, 2026

Copy link
Copy Markdown

PR Summary

High Risk
Changes core secret provenance, logging, and provider egress boundaries across the block executor, Agent, and Mothership handlers; incorrect registry forking could leak secrets into logs or drop required tracking on errors.

Overview
Narrows resolved-secret handling so URLs, resource IDs, and control fields keep normal request semantics unless a field is proven model-visible. Integration docs and commands drop the centralized opaqueModelInput hard-rejection path and instead describe request.modelInput projection for serialized external model content and authenticated internal routes for raw bytes.

Block executor splits provenance registries: log-facing inputs use resolver projections only, successful outputs use a handler-narrowed registry, and failures/stream errors can use errorResolvedSecretTraceRegistry so echoed credentials in provider errors are tracked without reactivating projected prompts or selectors in block output provenance. Streaming uses a separate diagnostic registry for client onStream error projection.

Agent handler stops treating customToolId, skillId, and response-format names as broad structural secret violations; private selectors are settled for display while lookup still uses resolved values, response-format names are aliased for the provider, and tool-result provenance can persist without reactivating private selectors. Mothership applies similar skill-selector display settlement and separates error vs result provenance; conversation IDs are not treated as secret-bearing output content.

Generic tool handler no longer folds opaqueModelInput into its provenance path collection. Pi Babysit reduces blanket scrubPiSecrets on round prompts, diagnostics, and changed-file lists (scrubbing remains on selected error paths).

Reviewed by Cursor Bugbot for commit f09556c. Configure here.

@greptile-apps

greptile-apps Bot commented Aug 8, 2026

Copy link
Copy Markdown
Contributor

Greptile Summary

The PR narrows resolved-secret protection to fields that actually cross model, persistence, or diagnostic boundaries while preserving ordinary opaque inputs and internal lookup identifiers.

  • Refactors Agent and Mothership input projection and provenance handling.
  • Updates executor display/error projection and streaming provenance propagation.
  • Removes broad opaque-input rejection from ordinary tool inputs and adds focused regression coverage.
  • Synchronizes integration authoring and validation guidance with the revised boundary model.

Confidence Score: 5/5

The PR appears safe to merge.

No blocking failure remains; the previously reported Mothership identifier disclosure was invalidated because the authenticated internal route resolves the identifier for lookup and excludes it from the external model payload.

Important Files Changed

Filename Overview
apps/sim/executor/handlers/agent/agent-handler.ts Refines model-visible projection, private selector settlement, provider diagnostics, tool provenance, and memory persistence boundaries.
apps/sim/executor/handlers/mothership/mothership-handler.ts Preserves private skill IDs for authenticated internal lookup while projecting only model-visible labels and metadata.
apps/sim/executor/execution/block-executor.ts Projects resolver-recorded secrets from displayed inputs and carries dedicated provenance through streaming and error paths.
apps/sim/lib/uploads/utils/model-input.ts Revises upload model-input classification and projection behavior for inline content versus ordinary resource locators.
apps/sim/tools/index.ts Removes centralized opaque-input rejection behavior that was applied too broadly to ordinary tool request values.

Reviews (2): Last reviewed commit: "address comments" | Re-trigger Greptile

Comment thread apps/sim/executor/handlers/agent/agent-handler.ts
Comment thread apps/sim/executor/handlers/mothership/mothership-handler.ts
@icecrasher321

Copy link
Copy Markdown
Collaborator Author

bugbot run

Comment thread apps/sim/executor/execution/block-executor.ts
@icecrasher321

Copy link
Copy Markdown
Collaborator Author

bugbot run

@icecrasher321

Copy link
Copy Markdown
Collaborator Author

@greptile

Comment thread apps/sim/executor/handlers/mothership/mothership-handler.ts Outdated
@icecrasher321

Copy link
Copy Markdown
Collaborator Author

bugbot run

@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 f09556c. Configure here.

@icecrasher321
icecrasher321 merged commit 457170b into staging Aug 8, 2026
23 checks passed
@icecrasher321
icecrasher321 deleted the fix/agent-handler-broad-check branch August 8, 2026 03:25
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