githubactions:S7637 false positives for actions pinned through native actions.lock

GitHub Actions now supports native workflow dependency lockfiles at .github/workflows/actions.lock, generated by the gh actions-lock CLI extension.

However, githubactions:S7637 still reports:

Use full commit SHA hash for this dependency.

This produces false-positive findings for tag-based action references whose exact commits are pinned and enforced through the workflow’s lockfile.

Official GitHub documentation:

GitHub explicitly states:

For repositories that adopt a lockfile, SHA pinning within workflow files is no longer necessary.

The documentation also explains that lockfiles cover transitive action dependencies, verify source repository identity, and satisfy GitHub’s “Require actions to be pinned to a full-length commit SHA” policy for onboarded workflows.

Expected behavior
S7637 should recognize action references covered by an onboarded workflow’s valid actions.lock, rather than requiring an additional inline commit SHA.
It should continue reporting unpinned references when:

  • The workflow is not onboarded to the lockfile.
  • The action reference is not covered by the lockfile.
  • The reference is a reusable workflow call (jobs.<job_id>.uses), which GitHub explicitly excludes from lockfile pinning.

Could you confirm whether native lockfile support is planned or already tracked? If not, please consider this a false-positive report and request to update S7637.

I investigated contributing a fix through SonarSource/sonar-iac, but could not find the GitHub Actions check implementation in the public repository. Is there a public contribution path for this change?

Hi Adam,

Thanks for the detailed report and documentation links. This is a known limitation of S7637: the rule currently checks the inline uses: reference without taking actions.lock into account. We are already tracking native lockfile support, but I don’t have a release date to share yet.

Your expected distinction is correct: step-level action references covered by a valid lockfile for an onboarded workflow should not need an additional inline SHA. Workflows that are not onboarded and references that are not covered should not be exempted. Calls to reusable workflows (jobs.<job_id>.uses) are not pinned by the caller’s lockfile and still require a full commit SHA.

The GitHub Actions check implementation is maintained in a private repository, which explains why you could not find it in the public sonar-iac repository. A direct contribution to this check through that public repository is therefore not available.

Thanks again for reporting this and for looking into a contribution.