Skip to content

[WIP] Fix failing GitHub Actions workflow agent#1530

Closed
Copilot wants to merge 2 commits intomainfrom
copilot/fix-github-actions-workflow-agent
Closed

[WIP] Fix failing GitHub Actions workflow agent#1530
Copilot wants to merge 2 commits intomainfrom
copilot/fix-github-actions-workflow-agent

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented Mar 31, 2026

Thanks for asking me to work on this. I will get started on it and keep this PR's description up to date as I form a plan and make progress.

Original prompt

Fix the failing GitHub Actions workflow agent
Analyze the workflow logs, identify the root cause of the failure, and implement a fix.
Job ID: 69427783347
Job URL: https://github.com/github/gh-aw-firewall/actions/runs/23819484659/job/69427783347

lpcox and others added 2 commits March 31, 2026 14:07
…diagnostics

Three fixes for the Anthropic API proxy auth chain failure (#1527):

1. Trim API keys read from env vars in api-proxy (server.js)
   CI secrets and docker-compose YAML may include trailing whitespace
   or newlines. Untrimmed keys produce malformed HTTP headers (the
   newline terminates the header prematurely), causing silent auth
   failures with error_status: null.

2. Align ANTHROPIC_AUTH_TOKEN placeholder with sk-ant- key format
   Claude Code validates key format before making API calls. The old
   placeholder 'placeholder-token-for-credential-isolation' lacks the
   sk-ant- prefix and may fail format validation. Now uses the same
   value as apiKeyHelper: 'sk-ant-placeholder-key-for-credential-isolation'.

3. Add auth header injection + upstream error logging in api-proxy
   - 'auth_inject' debug log confirms key injection (length, preview)
   - 'upstream_auth_error' warning on 401/403 from upstream API

Closes #1527

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot AI requested a review from lpcox March 31, 2026 21:27
Base automatically changed from copilot/fix-api-proxy-auth-chain to main March 31, 2026 23:23
@lpcox lpcox closed this Apr 1, 2026
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