Repository navigation
ci(pr): InspectCode builds PR code with no write scope; SARIF upload moves to a no-checkout job - #360
Merged
Conversation
…moves to a no-checkout job Template sync of Chris-Wolfgang/repo-template#594. The inspectcode job holds contents: read only and hands inspect.sarif off as a 1-day artifact; a new inspectcode-upload job — which checks out the trusted base ref, never PR code — is the only job with security-events: write. The upload still runs when the error-severity gate fails and ends quietly when no SARIF was produced. Same-repo guard on the build job lifted (nothing left to protect). Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Chris-Wolfgang
force-pushed
the
ci/inspectcode-sarif-upload-split
branch
from
September 21, 2026 00:43
23a24fe to
1978e75
Compare
This was referenced Sep 26, 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.
Summary
Template sync of Chris-Wolfgang/repo-template#594 — closes the one real gap behind the Scorecard Dangerous-Workflow / CodeQL untrusted-checkout alerts on
pr.yaml.inspectcode("ReSharper InspectCode")jb inspectcode→ upload-sarif → gate;security-events: writejb inspectcode→ artifact hand-off (runs even when the gate fails) → gate;contents: readonlyinspectcode-upload(new)security-events: writeNet: no job that executes PR code holds any write scope, so a PR's MSBuild targets / tests / analyzers cannot forge or dismiss Code Scanning alerts through the job token. The required-check name
ReSharper InspectCodeis unchanged. Scorecard / CodeQL keep flagging thepull_request_target+ PR-head-checkout shape (they cannot see the scope split); those alerts are dismissed per repo with this reason.Configuration-only PR (passes the protected-file guard); bypass merge.
🤖 Generated with Claude Code