Skip to content

fix(copilot): hold app tools to the turn secret authority - #10320

Merged
waleedlatif1 merged 1 commit into
stagingfrom
fix/app-tool-secret-authority
Nov 22, 2026
Merged

waleedlatif1 merged 1 commit into
stagingfrom
fix/app-tool-secret-authority

Conversation

@waleedlatif1

Copy link
Copy Markdown
Collaborator

Summary

  • Copilot app-tool lane now honors the turn's secret authority when resolving {{VAR}} references in user-only tool params
  • A run with no secret actor (secretActorUserId === null, e.g. an unattributed inbox message) resolves no environment reference, matching function_execute's mount refusal
  • The turn's secretMountPolicy is forwarded into the tool scope; names outside a selected policy are refused (explicit {{NAME}}) or left literal (bare name)
  • Both _context keys are always written, so a model-supplied _context cannot set them

Type of Change

  • Bug fix

Testing

  • New regression tests in executor.test.ts (actorless off + policy forwarding over a hostile _context) and tools/index.test.ts (refused / bare / allowed under a selected policy); each guard reverted separately and its test shown red
  • executor.test.ts + tools/index.test.ts pass (318 tests)
  • check:boundaries, check:comment-hygiene, check:tool-registry-boundary, biome on changed files; full gate in CI

Checklist

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

Integration tools on the Copilot app-tool lane resolved {{VAR}} references in
user-only params from the acting user's environment without consulting the
turn's secret authority. A run with no secret actor now resolves no reference,
and the turn's secret mount policy bounds which names may resolve, matching
what function_execute already enforces for sandbox mounts.
@vercel

vercel Bot commented Nov 22, 2026

Copy link
Copy Markdown

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

1 Skipped Deployment
Project Deployment Actions Updated
docs Skipped Skipped Nov 22, 2026 10:50pm UTC

Request Review

@cubic-dev-ai cubic-dev-ai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

No issues found across 4 files

Confidence score: 5/5

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

Turn on auto-fix | Re-trigger cubic

@greptile-apps

greptile-apps Bot commented Nov 22, 2026 •

Copy link
Copy Markdown
Contributor

RetriggerView in GreptileConfidence Score: 5/5

[Medium impact] The PR appears safe to merge; no actionable issues were found.

Summary

App tools now follow the turn’s secret permissions when resolving environment references.

  • Copilot app tools resolve only environment values allowed for the current turn.

No actionable issues were found. Tests were inspected but not run.

Reviews (2) · Last reviewed commit: "fix(copilot): hold app tools to the turn..." · Reviewed by Greptile

@waleedlatif1
waleedlatif1 merged commit 461d49c into staging Nov 22, 2026
153 of 155 checks passed
@waleedlatif1
waleedlatif1 deleted the fix/app-tool-secret-authority branch November 23, 2026 00:04

This branch was previously deployed

1 inactive deployment
Preview — aad31525 Deployed Nov 22, 2026 by vercel[bot]
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