Skip to content

Restore Scorecard SARIF upload permission - #16

Merged
Liang-Chun Tsai (ltsai-dev) merged 2 commits into
mainfrom
ltsai-microsoft-fix-scorecard-github-token
Aug 17, 2026
Merged

Restore Scorecard SARIF upload permission#16
Liang-Chun Tsai (ltsai-dev) merged 2 commits into
mainfrom
ltsai-microsoft-fix-scorecard-github-token

Conversation

@ltsai-dev

Copy link
Copy Markdown
Contributor

Summary

The Scorecard analysis now authenticates successfully, but the merged workflow cannot upload its SARIF report because upload-sarif@v4 needs read access to the current workflow run. Restore the missing least-privilege permission.

Changes

  • Add actions: read to the Scorecard analysis job permissions.

Test plan

Reproduced the merged failure in https://github.com/microsoft/thinkingbox/actions/runs/32049510801: Scorecard analysis succeeded, then SARIF upload failed with Resource not accessible by integration while reading the workflow run.

Ran github/codeql-action/upload-sarif@v4 in a branch-only validation workflow with security-events: write, contents: read, and actions: read. The upload completed successfully: https://github.com/microsoft/thinkingbox/actions/runs/32049815977

The temporary validation workflow was removed before this PR.

Related issues

N/A

Liang-Chun Tsai added 2 commits August 17, 2026 10:21
Grant upload-sarif read access to workflow runs and add a temporary branch-only validation for the upload path.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>

Copilot-Session: 22274a22-19ba-4b95-be2e-cbd4ea21f65e
The branch-only workflow confirmed upload-sarif succeeds with actions read access, so retain only the production permission fix.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>

Copilot-Session: 22274a22-19ba-4b95-be2e-cbd4ea21f65e
@ltsai-dev
Liang-Chun Tsai (ltsai-dev) merged commit 0a81b35 into main Aug 17, 2026
4 of 5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant