Skip to content

GHES 400 bad request: Authorization header is badly formatted #5871

Description

@jaroslawgajewski

Following up here since this is where the original diagnosis happened (thanks again for
the fast turnaround back in June, @lpcox).

We finally got a clean live re-test of #5415 / AWF v0.27.9+ on a GHES +
Copilot Business setup with the same configuration as before, and the bug is still
present
.

What we tested

For several days we ran one workflow as a live canary on native, unpinned AWF (v0.27.13,
then v0.27.16 after a compiler bump) specifically to re-validate this fix — everything
else stayed pinned to the old AWF v0.25.55 that predates the bug. Config is unchanged
from what was described in this issue in June: COPILOT_API_TARGET set to the Copilot
Business endpoint (not the Enterprise one), GITHUB_SERVER_URL pointing at a *.ghe.com
instance, no BYOK/custom provider.

Result

Over dozens of pull_request-triggered runs of the canary across several days:

So copilotTargetRequiresGitHubTokenPrefix()'s handling of the Business API target on
*.ghe.com doesn't appear to be taking effect here, or there's some other path that
still sends the malformed header for this target. We've retired the canary and gone back
to pinning AWF to v0.25.55 (which has no auth-header issue)

Version info:

  • gh-aw-firewall: v0.27.13 and v0.27.16 (both reproduce)
  • gh-aw compiler: v0.82.0 / v0.82.1
  • Copilot CLI: 1.0.65

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions