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
safe-outputs.github-app: conclusion job cannot open failure/detection issues (token minted without issues scope) #73291
When safe-outputs.github-app is configured, the conclusion job's reporting steps get the safe-outputs App token. That token is minted with only the permissions the configured safe outputs need. If none of those safe outputs write issues, these steps cannot open or comment on issues:
Handle agent failure (report-failure-as-issue)
Report failed jobs
Log detection run
Record incomplete
Process no-op messages
So a workflow that only writes pull requests, for example a PR reviewer, loses its failure, failed-job and threat-detection reporting as soon as it switches from a PAT to an App.
We found this by reading the compiled lock and the scripts. We did not observe a 403 live, because we turned the reports off before a failure ran.
Expected
Turning on safe-outputs.github-app should not silently disable failure and threat-detection reporting. Any of these would fix it:
Add permission-issues: write to the conclusion mint whenever an issue-writing report is enabled (report-failure-as-issue, failed jobs, detection runs, incomplete or noop as issue).
Run those reporting steps with the job's GITHUB_TOKEN, which already has issues: write.
Allow standard scopes such as issues: write in safe-outputs.github-app.permissions.
Our workaround
report-failure-as-issue: false and report-failed-jobs: false.
A custom job with detection-gate: status-only and the default token, which reports on the PR instead.
Activity