Skip to content

Fix githubactions:S7637: Pin external GitHub Actions to commit hashes #418

Open

Description

@lhein

Summary

Sonar rule githubactions:S7637 flags external GitHub Actions referenced by mutable tags (e.g. @v4, @v1) instead of immutable commit SHAs. A compromised upstream action could silently inject malicious code into CI pipelines.

This is a real supply chain risk — see CVE-2025-30066 (tj-actions/changed-files) as a recent example.

Changes

Pin all 4 third-party actions across 3 workflow files to their full commit SHA (tag preserved as a comment for readability):

Action Tag Commit SHA
docker/login-action v4 dbcb813823bdd20940b903addbd779551569679f
mathieudutour/github-tag-action v6.2 a22cf08638b34d5badda920f9daf6e72c477b07b
ncipollo/release-action v1 339a81892b84b4eeb0f6e744e4574d79d0d9b8dd
container-tools/kind-action v2 0ad70e2299366b0e1552c7240f4e4567148f723e

First-party actions/* refs are not flagged by Sonar (trusted prefix).

Prevention

No local linter equivalent — Sonar remains the guard. Using Renovate (already configured in this repo via dependabot.yml) to keep pinned SHAs up to date is recommended.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions