Skip to content

fix(ci): add missing ANTHROPIC_API_KEY to detection job#827

Merged
lpcox merged 2 commits intoclaude/enable-api-proxy-by-defaultfrom
claude/fix-github-actions-workflow-one-more-time
Feb 13, 2026
Merged

fix(ci): add missing ANTHROPIC_API_KEY to detection job#827
lpcox merged 2 commits intoclaude/enable-api-proxy-by-defaultfrom
claude/fix-github-actions-workflow-one-more-time

Conversation

@Claude
Copy link
Contributor

@Claude Claude AI commented Feb 13, 2026

The detection job was failing with "Not logged in · Please run /login" because the Claude Code CLI execution step was missing the ANTHROPIC_API_KEY environment variable.

Root Cause

The detection job validates that ANTHROPIC_API_KEY exists (line 1091) but was not passing it to the Claude CLI execution environment. When CLAUDE_CODE_OAUTH_TOKEN is empty, Claude Code CLI falls back to ANTHROPIC_API_KEY for authentication, but the variable was unavailable in the execution context.

Changes

  • Added ANTHROPIC_API_KEY: ${{ secrets.ANTHROPIC_API_KEY }} to the detection job's "Execute Claude Code CLI" step environment block (line 1125)
  • Matches the existing configuration in the agent job (line 791)
- name: Execute Claude Code CLI
  run: |
    claude --print --disable-slash-commands ...
  env:
    ANTHROPIC_API_KEY: ${{ secrets.ANTHROPIC_API_KEY }}  # Added
    CLAUDE_CODE_OAUTH_TOKEN: ${{ secrets.CLAUDE_CODE_OAUTH_TOKEN }}
    # ... other env vars

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>
@Claude Claude AI changed the title [WIP] Fix failing GitHub Actions workflow detection fix(ci): add missing ANTHROPIC_API_KEY to detection job Feb 13, 2026
@Claude Claude AI requested a review from lpcox February 13, 2026 09:46
@lpcox lpcox marked this pull request as ready for review February 13, 2026 09:46
Copilot AI review requested due to automatic review settings February 13, 2026 09:46
@lpcox lpcox merged commit 67d85bb into claude/enable-api-proxy-by-default Feb 13, 2026
2 checks passed
@lpcox lpcox deleted the claude/fix-github-actions-workflow-one-more-time branch February 13, 2026 09:46
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

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_KEY to the detection job’s “Execute Claude Code CLI” step env: 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.

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.

2 participants