Follow-up from #1 (PR fixing the SonarCloud authentication bug).
While fixing #1 the action references in this repository were reviewed. None are pinned to a commit SHA, which SonarCloud flags as githubactions:S7637 ("Using a mutable reference for a third-party GitHub Action is security-sensitive").
Current references:
| File | Reference | Owner |
|---|
build-test-sonar/action.yml | actions/setup-java@v5 | GitHub (first-party) |
build-test-sonar/action.yml | actions/setup-dotnet@v6 | GitHub (first-party) |
test-script-action/action.yml | Amadevus/pwsh-script@v2 | third-party |
.github/workflows/run-test-action.yml | actions/checkout@v3 | GitHub (first-party, and two majors stale) |
Amadevus/pwsh-script@v2 is the genuinely third-party one and the highest priority: a mutable tag means an upstream compromise or force-push would execute in any workflow using it.
This was deliberately left out of the #1 fix to keep that change minimal, because build-test-sonar is consumed at @main by other repositories and every change ships to them immediately.
Suggested scope:
- Pin all
uses: references to full commit SHAs with a trailing # vX.Y.Z comment. - Add
.github/dependabot.yml with the github-actions ecosystem so pinned SHAs do not silently rot. - Bump
actions/checkout@v3 to the current major while in there.
Pinning without Dependabot just trades one problem for another, so the two should land together.
Follow-up from #1 (PR fixing the SonarCloud authentication bug).
While fixing #1 the action references in this repository were reviewed. None are pinned to a commit SHA, which SonarCloud flags as
githubactions:S7637("Using a mutable reference for a third-party GitHub Action is security-sensitive").Current references:
build-test-sonar/action.ymlactions/setup-java@v5build-test-sonar/action.ymlactions/setup-dotnet@v6test-script-action/action.ymlAmadevus/pwsh-script@v2.github/workflows/run-test-action.ymlactions/checkout@v3Amadevus/pwsh-script@v2is the genuinely third-party one and the highest priority: a mutable tag means an upstream compromise or force-push would execute in any workflow using it.This was deliberately left out of the #1 fix to keep that change minimal, because
build-test-sonaris consumed at@mainby other repositories and every change ships to them immediately.Suggested scope:
uses:references to full commit SHAs with a trailing# vX.Y.Zcomment..github/dependabot.ymlwith thegithub-actionsecosystem so pinned SHAs do not silently rot.actions/checkout@v3to the current major while in there.Pinning without Dependabot just trades one problem for another, so the two should land together.