Skip to content

fix(security): require explicit trust for internal tool routes - #7089

Merged
icecrasher321 merged 4 commits into
stagingfrom
codex/fix-http-relative-url-ssrf
Aug 26, 2026
Merged

fix(security): require explicit trust for internal tool routes#7089
icecrasher321 merged 4 commits into
stagingfrom
codex/fix-http-relative-url-ssrf

Conversation

@icecrasher321

Copy link
Copy Markdown
Collaborator

Summary

  • require explicit trust policies for dynamic internal tool routes
  • reject relative and non-HTTP(S) URLs on the external tool transport before credentials are generated
  • enforce registry coverage with a static audit and runtime branch probes

Type of Change

  • Bug fix

Testing

  • bunx vitest run tools (4,743 passed)
  • bunx vitest run executor/handlers/api/api-handler.test.ts executor/utils/http.test.ts providers/utils.test.ts (184 passed)
  • bun run type-check
  • bun run lint
  • bun run check:audits
  • bun run apps/sim/scripts/check-block-registry.ts origin/staging

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)

@icecrasher321
icecrasher321 requested a review from a team as a code owner August 26, 2026 01:08
@vercel

vercel Bot commented Aug 26, 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 26, 2026 2:32am

Request Review

@icecrasher321 icecrasher321 changed the title fix: require explicit trust for internal tool routes fix(security): require explicit trust for internal tool routes Aug 26, 2026

@cubic-dev-ai cubic-dev-ai 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.

All reported issues were addressed across 118 files

Reply with feedback, questions, or to request a fix.

Re-trigger cubic

Comment thread apps/sim/tools/table/delete_rows_by_filter.ts
Comment thread apps/sim/tools/knowledge/delete_document.ts
Comment thread apps/sim/tools/request-transport.ts
Comment thread apps/sim/tools/table/delete_row.ts
Comment thread apps/sim/tools/google_drive/upload.ts Outdated
Comment thread apps/sim/tools/request-transport.ts
Comment thread apps/sim/tools/table/get_schema.ts
Comment thread apps/sim/tools/request-transport.test.ts Outdated
Comment thread apps/sim/tools/onedrive/upload.ts Outdated
Comment thread apps/sim/tools/google_drive/upload.ts Outdated
@icecrasher321
icecrasher321 force-pushed the codex/fix-http-relative-url-ssrf branch from 05abbbb to 80abba3 Compare August 26, 2026 01:51
@icecrasher321

Copy link
Copy Markdown
Collaborator Author

@cubic-dev-ai review this PR

@icecrasher321

Copy link
Copy Markdown
Collaborator Author

@greptile-apps review this PR

@cubic-dev-ai

cubic-dev-ai Bot commented Aug 26, 2026

Copy link
Copy Markdown

@cubic-dev-ai review this PR

@icecrasher321 I have started the AI code review. It will take a few minutes to complete.

@greptile-apps

greptile-apps Bot commented Aug 26, 2026

Copy link
Copy Markdown
Contributor

Greptile Summary

The PR replaces inferred trust for dynamic tool URLs with explicit internal-route policies and validates resolved URLs before request credentials are generated.

  • Marks trusted dynamic Sim API routes as internal and encodes interpolated path segments.
  • Rejects relative and non-HTTP(S) URLs on the external transport.
  • Adds static auditing and runtime probes for registry-wide request-boundary coverage.

Confidence Score: 5/5

The PR appears safe to merge.

No blocking failure remains.

Important Files Changed

Filename Overview
apps/sim/tools/request-transport.ts Introduces definition-owned route trust and validates internal and external URLs before preparing requests.
apps/sim/tools/types.ts Extends tool request definitions with an explicit static or parameter-dependent internal trust policy.
scripts/check-tool-request-boundary.ts Adds a static audit for missing trust policies and unsafe interpolation in dynamic internal tool routes.
apps/sim/tools/request-transport.test.ts Adds registry-wide probes and focused tests for internal-route canonicalization and external URL restrictions.

Reviews (4): Last reviewed commit: "fix(tools): validate request trust polic..." | Re-trigger Greptile

Comment thread scripts/check-tool-request-boundary.ts
@icecrasher321

Copy link
Copy Markdown
Collaborator Author

@greptile-apps review this PR

@cubic-dev-ai cubic-dev-ai 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.

All reported issues were addressed across 118 files

Reply with feedback, questions, or to request a fix.

Re-trigger cubic

Comment thread apps/sim/tools/request-transport.test.ts Outdated
Comment thread scripts/check-tool-request-boundary.ts Outdated
Comment thread scripts/check-tool-request-boundary.ts Outdated
@icecrasher321

Copy link
Copy Markdown
Collaborator Author

@cubic-dev-ai review this PR

@cubic-dev-ai

cubic-dev-ai Bot commented Aug 26, 2026

Copy link
Copy Markdown

@cubic-dev-ai review this PR

@icecrasher321 I have started the AI code review. It will take a few minutes to complete.

@icecrasher321

Copy link
Copy Markdown
Collaborator Author

@greptile-apps review this PR

@cubic-dev-ai cubic-dev-ai 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.

All reported issues were addressed across 118 files

Reply with feedback, questions, or to request a fix.

Re-trigger cubic

Comment thread scripts/check-tool-request-boundary.ts
Comment thread scripts/check-tool-request-boundary.ts Outdated
@icecrasher321
icecrasher321 force-pushed the codex/fix-http-relative-url-ssrf branch from 3326eb2 to d6654a5 Compare August 26, 2026 02:26
@icecrasher321

Copy link
Copy Markdown
Collaborator Author

@greptile-apps review this PR

@icecrasher321

Copy link
Copy Markdown
Collaborator Author

@cubic-dev-ai review this PR

@cubic-dev-ai

cubic-dev-ai Bot commented Aug 26, 2026

Copy link
Copy Markdown

@cubic-dev-ai review this PR

@icecrasher321 I have started the AI code review. It will take a few minutes to complete.

@cubic-dev-ai cubic-dev-ai 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.

No issues found across 118 files

Confidence score: 5/5

  • Automated review surfaced no issues in the provided summaries.
  • No files require special attention.

Re-trigger cubic

@icecrasher321
icecrasher321 merged commit 77b5ae3 into staging Aug 26, 2026
30 checks passed
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