Skip to content

fix(#7029): scrub ANTHROPIC_OAUTH_TOKEN for the anthropic-vertex provider - #7033

Open
fullsend-ai-coder[bot] wants to merge 1 commit into
mainfrom
agent/7029-scrub-anthropic-oauth-token
Open

fix(#7029): scrub ANTHROPIC_OAUTH_TOKEN for the anthropic-vertex provider#7033
fullsend-ai-coder[bot] wants to merge 1 commit into
mainfrom
agent/7029-scrub-anthropic-oauth-token

Conversation

@fullsend-ai-coder

Copy link
Copy Markdown
Contributor

Summary

Add ANTHROPIC_OAUTH_TOKEN to the credential scrub list for the anthropic-vertex provider in both the parent run command (pi_run.go) and sub-agent dispatch (fullsend-agent.js), closing a gap where pi's built-in anthropic provider could authenticate via the third credential name it resolves from the environment.

Related Issue

Fixes #7029

Changes

  • Add ANTHROPIC_OAUTH_TOKEN to the unset string in buildPiRunCommand (internal/runtime/pi_run.go)
  • Add delete env.ANTHROPIC_OAUTH_TOKEN to childEnv in internal/runtime/pi_extension/fullsend-agent.js
  • Update test assertions in pi_run_test.go (2 places) and fullsend-agent.test.mjs to cover all three credential names pi's built-in anthropic provider resolves
  • Update docs/contributing/runtime-implementation.md to remove the known-gap note and document the complete scrub list

Testing

  • All Go tests in internal/runtime/ pass (go test ./internal/runtime/ -count=1)
  • All JS tests in fullsend-agent.test.mjs pass (32/32, 1 skipped for missing pi binary)
  • go vet ./internal/runtime/... passes
  • gofmt clean

Checklist

  • PR title follows Conventional Commits (correct type, ! for breaking changes)
  • Commits are signed off (DCO) -- human and human-directed agent sessions only
  • I wrote this contribution myself and can explain all changes in it

Closes #7029

Post-script verification

  • Branch is not main/master (agent/7029-scrub-anthropic-oauth-token)
  • Secret scan passed (gitleaks — 5d199943b4df75d067967aaf474d5422e9ad3939..HEAD)
  • PR body secret scan passed (gitleaks — no-git)

…ider

pi's built-in anthropic provider resolves three credential names from
the environment: ANTHROPIC_AUTH_TOKEN, ANTHROPIC_OAUTH_TOKEN and
ANTHROPIC_API_KEY. The anthropic-vertex credential scrub in
buildPiRunCommand (pi_run.go) and childEnv (fullsend-agent.js) only
cleared two of the three, leaving ANTHROPIC_OAUTH_TOKEN unscrubbed.
A .env or repository variable that sets it would authenticate pi's
built-in anthropic provider on a run that was supposed to be
Vertex-only, for both the parent and every sub-agent.

Add ANTHROPIC_OAUTH_TOKEN to the unset string in pi_run.go and the
delete block in fullsend-agent.js. Update the test assertions in
pi_run_test.go and fullsend-agent.test.mjs to cover all three
credential names. Remove the known-gap note from
runtime-implementation.md.

Note: pre-commit hooks were not run in-sandbox. pre-commit could not
complete (infrastructure failure: remote hook repos unreachable in
sandbox). Direct execution of local hooks (gofmt, go vet) passed.

Closes #7029
@fullsend-ai-coder
fullsend-ai-coder Bot requested a review from a team as a code owner September 4, 2026 23:03
@fullsend-ai-coder fullsend-ai-coder Bot added the ready-for-review Triggers review agent dispatch label Sep 4, 2026
@fullsend-ai-review

fullsend-ai-review Bot commented Sep 4, 2026

Copy link
Copy Markdown

🤖 Finished Review · ✅ Success · Started 11:05 PM UTC · Completed 11:16 PM UTC

Commit: 8542544 · View workflow run →

Runtime: claude · Model: opus → claude-opus-4-6 · Effort: high · Cost: $2.66

@github-actions

github-actions Bot commented Sep 4, 2026

Copy link
Copy Markdown

Site preview

Preview: https://63915fdb-site.fullsend-ai.workers.dev

Commit: 8542544ca6f32a5d83dd6ce50960792b11ce9e3d

@codecov

codecov Bot commented Sep 4, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

@fullsend-ai-review

Copy link
Copy Markdown

Looks good to me

@fullsend-ai-review fullsend-ai-review Bot added the ready-for-merge All reviewers approved — ready to merge label Sep 4, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ready-for-merge All reviewers approved — ready to merge ready-for-review Triggers review agent dispatch

Projects

None yet

Development

Successfully merging this pull request may close these issues.

pi: the anthropic-vertex credential scrub misses ANTHROPIC_OAUTH_TOKEN, one of the three names pi's built-in anthropic provider resolves

1 participant