You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
AWF install: mandatory attestation check (AWF >= 0.29.5) fails with 401 on GitHub Enterprise (ghe.com) (gh attestation verify --hostname github.com with the ghe.com token) #77117
gh-aw v1.2.2 bumped the default AWF from v0.29.0 to v0.29.11. On GitHub Enterprise Cloud with data residency (<org>.ghe.com) the agent job now fails in "Install AWF binary":
bash "${RUNNER_TEMP}/gh-aw/actions/install_awf_binary.sh" v0.29.11
Error: HTTP 401: Bad credentials (https://api.github.com/repos/github/gh-aw-firewall/attestations/sha256:aa9d64e6...?per_page=30&predicate_type=https%3A%2F%2Fslsa.dev%2Fprovenance%2Fv1)
##[error]Process completed with exit code 1.
Root cause:
actions/setup/sh/install_awf_binary.sh (lines 100-104) sets REQUIRE_ATTESTATION=true for every AWF >= 0.29.5. There is no flag or setting to turn it off.
actions/setup/sh/release_integrity.sh, verify_release_attestation (lines 266-275) runs gh attestation verify ... --hostname github.com, and the quota probe (line 209) runs gh api --hostname github.com.
On ghe.com the job's token was issued by the ghe.com instance, which github.com rejects with HTTP 401: Bad credentials.
This is the same class of failure as the Copilot CLI --cooldown-days check on ghe.com. v1.0.1 locks used AWF v0.29.0 (below 0.29.5, no attestation check) and worked.
Workaround: pin sandbox.agent.version: v0.29.0 in the workflow frontmatter.
Possible fix
Options, not a settled design:
Let gh attestation verify and the gh api probe use a token that is valid for github.com (for example a dedicated env var, falling back to GITHUB_TOKEN), passed only to those calls. On ghe.com this means a github.com token has to be provided as a secret.
When no such token is available, fall back to the independently reviewed manifest pin with a warning, as is done for releases before 0.29.5.
Or fail with a clear message that names the missing token and the sandbox.agent.version workaround, instead of a bare 401.
Plan
In actions/setup/sh/release_integrity.sh, verify_release_attestation and the gh api probe at line 209: use a token that is valid for github.com (for example a dedicated env var such as GH_AW_RELEASE_VERIFY_TOKEN, falling back to GITHUB_TOKEN), and pass it as GH_TOKEN only to these gh calls.
In actions/setup/sh/install_awf_binary.sh (lines 100-104): on ghe.com, when no github.com-valid token is available, fall back to the independently reviewed manifest pin (as for releases before 0.29.5) and print a warning, instead of failing. Alternatively, fail with a message that names the missing token and the sandbox.agent.version workaround.
Tests: add a case to the installer script tests where gh attestation verify returns 401, and assert the chosen behaviour (fallback with warning, or the actionable error).
Docs: in docs/src/content/docs/reference/frontmatter.md (sandbox.agent.version), note the attestation requirement from 0.29.5 and the ghe.com behaviour.
Acceptance criterion
On GitHub Enterprise (ghe.com), a workflow with the default sandbox.agent settings just works: AWF installs with no extra setup (no extra secrets, no sandbox.agent.version pin). Running on ghe.com is a supported setup and must not need additional configuration.
Environment
gh-aw v1.2.2, engine: copilot, AWF v0.29.11, host <org>.ghe.com, ubuntu-24.04. Earlier steps run with GH_HOST=<org>.ghe.com (set by configure_gh_for_ghe.sh), but the "Install AWF binary" step runs with GH_HOST: github.com and a ghe.com-issued GITHUB_TOKEN.
Activity
pelikhan commentedon Nov 17, 2026
@copilot remove release integrity and rely on checksum