fix(ci): add missing ANTHROPIC_API_KEY to detection job#827
Merged
lpcox merged 2 commits intoclaude/enable-api-proxy-by-defaultfrom Feb 13, 2026
Merged
Conversation
The detection job was failing with "Not logged in · Please run /login" because ANTHROPIC_API_KEY was not being passed to the Claude Code CLI execution step. The job validates that ANTHROPIC_API_KEY exists (line 1091) but was not passing it to the claude CLI command execution (line 1124+). This fix adds ANTHROPIC_API_KEY to the env block of the "Execute Claude Code CLI" step in the detection job, matching the configuration in the agent job. Co-authored-by: lpcox <15877973+lpcox@users.noreply.github.com>
Contributor
There was a problem hiding this comment.
Pull request overview
Fixes the smoke-test GitHub Actions workflow so the threat detection (“detection”) job can authenticate Claude Code CLI using ANTHROPIC_API_KEY when CLAUDE_CODE_OAUTH_TOKEN is unset, matching the already-working agent job configuration.
Changes:
- Adds
ANTHROPIC_API_KEYto the detection job’s “Execute Claude Code CLI” stepenv:block. - Aligns detection job runtime env propagation with the agent job (which already passes the key).
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
This was referenced Feb 13, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The detection job was failing with "Not logged in · Please run /login" because the Claude Code CLI execution step was missing the
ANTHROPIC_API_KEYenvironment variable.Root Cause
The detection job validates that
ANTHROPIC_API_KEYexists (line 1091) but was not passing it to the Claude CLI execution environment. WhenCLAUDE_CODE_OAUTH_TOKENis empty, Claude Code CLI falls back toANTHROPIC_API_KEYfor authentication, but the variable was unavailable in the execution context.Changes
ANTHROPIC_API_KEY: ${{ secrets.ANTHROPIC_API_KEY }}to the detection job's "Execute Claude Code CLI" step environment block (line 1125)