Summary
After updating a consumer workflow to a gh-aw release compiled with v0.71.1, the shared APM job now fails in a private caller repository before the agent starts.
The failure happens in the shared APM job's new checkout step:
Checkout workflow lock files
The token in that job only has metadata: read, so actions/checkout cannot fetch a private caller repo and fails with:
fatal: repository 'https://github.com/elastic/docs-content-internal/' not found
Repro context
Caller repo:
- private repo
elastic/docs-content-internal
Reusable workflow:
elastic/docs-actions/.github/workflows/gh-aw-docs-review.lock.yml@v1
Observed failing run:
Latest released docs-actions version used by the caller:
Actual failure
The failing job is Run docs-review / apm.
The log shows:
GITHUB_TOKEN Permissions
Metadata: read
Then in Checkout workflow lock files:
fatal: repository 'https://github.com/elastic/docs-content-internal/' not found
The process '/usr/bin/git' failed with exit code 128
This repeats across retries and the workflow stops before the agent job can run.
Why this seems new
This failure appears after moving to a gh-aw release line that includes the newer shared APM behavior.
In the Run docs-review / apm job, the shared workflow now includes a checkout step before packing APM packages. That step requires actual repository content access, but the job permissions are still effectively too weak for a private repo checkout.
Expected behavior
If the shared APM job needs to checkout workflow lock files from the caller repository, it should run with sufficient read permission to do so in private repos.
At minimum, private callers should not fail with a misleading repository not found when the actual problem is insufficient token scope for checkout.
Suspected fix direction
The shared APM job likely needs contents: read when Checkout workflow lock files is present.
If there is a reason to keep the job permissions narrow, another option would be to avoid the checkout entirely when it is not strictly required, or use a different mechanism that does not depend on repository contents access.
Notes
This is separate from the earlier PR-context skill-availability investigation. In this case, the workflow fails before the agent can even attempt to invoke any imported skill.
Summary
After updating a consumer workflow to a
gh-awrelease compiled withv0.71.1, the shared APM job now fails in a private caller repository before the agent starts.The failure happens in the shared APM job's new checkout step:
Checkout workflow lock filesThe token in that job only has
metadata: read, soactions/checkoutcannot fetch a private caller repo and fails with:Repro context
Caller repo:
elastic/docs-content-internalReusable workflow:
elastic/docs-actions/.github/workflows/gh-aw-docs-review.lock.yml@v1Observed failing run:
Latest released
docs-actionsversion used by the caller:1.12.2Actual failure
The failing job is
Run docs-review / apm.The log shows:
Then in
Checkout workflow lock files:This repeats across retries and the workflow stops before the agent job can run.
Why this seems new
This failure appears after moving to a
gh-awrelease line that includes the newer shared APM behavior.In the
Run docs-review / apmjob, the shared workflow now includes a checkout step before packing APM packages. That step requires actual repository content access, but the job permissions are still effectively too weak for a private repo checkout.Expected behavior
If the shared APM job needs to checkout workflow lock files from the caller repository, it should run with sufficient read permission to do so in private repos.
At minimum, private callers should not fail with a misleading
repository not foundwhen the actual problem is insufficient token scope for checkout.Suspected fix direction
The shared APM job likely needs
contents: readwhenCheckout workflow lock filesis present.If there is a reason to keep the job permissions narrow, another option would be to avoid the checkout entirely when it is not strictly required, or use a different mechanism that does not depend on repository contents access.
Notes
This is separate from the earlier PR-context skill-availability investigation. In this case, the workflow fails before the agent can even attempt to invoke any imported skill.