fix(ci): add actions:read to detection job permissions#961
Closed
fix(ci): add actions:read to detection job permissions#961
Conversation
Co-authored-by: Mossaka <5447827+Mossaka@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Fix CI failure in detection job due to 403 error downloading artifacts
fix(ci): add actions:read to detection job permissions
Feb 18, 2026
Contributor
✅ Smoke Test: PASSLast 2 merged PRs:
Test Results:
cc
|
This was referenced Feb 19, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The
detectionjob in all agentic workflow.lock.ymlfiles haspermissions: {}, which causesdownload-artifact@v7to fail with 403 Forbidden when fetchingagent-artifactsfrom the precedingagentjob. Theagent-outputartifact (476B) sometimes succeeds while the largeragent-artifacts(71KB) fails, but the root cause is the missingactions: readpermission on the GITHUB_TOKEN.Postprocess script (
scripts/ci/postprocess-smoke-workflows.ts): Added a regex-based replacement that targets thedetection:job'spermissions: {}and replaces it withpermissions:\n actions: read, without touching the workflow-levelpermissions: {}. The regex is anchored to thedetection:job block to avoid false matches. Idempotent — no-ops on already-fixed files.All 28
.lock.ymlfiles: Applied the fix. The change per file is:This lives in the postprocess script so the fix survives future
gh aw compileruns, which always regeneratepermissions: {}on the detection job.Original prompt
💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.