SKY-D292 · CI/CD pipelines
GitHub Actions unpinned action
A step such as uses: docker/build-push-action@v6 runs whatever code the tag v6 points to on the day the job runs. Tags and branches can be moved by anyone who controls that repository. SKY-D292 reports every action or reusable workflow that is not pinned to a full 40-character commit SHA.
- Languages
- GitHub Actions workflows, composite actions
- Quality gate
- counted toward the gate limits (full and diff scans). A GitHub-owned action at a release tag, such as
actions/checkout@v4, is left out of the default listing, but the gate still counts it. - Finding type
- review
Why it matters
When an action's maintainer account is taken over, the attacker moves the tag to new code, and every workflow that uses the tag runs it on the next push, with that job's token and secrets. In March 2025 the tj-actions/changed-files tags were moved this way, and the new code wrote secrets into the build logs of thousands of repositories.
What Skylos flags
name: Docker imageon: push: branches: [main]permissions: contents: read packages: writejobs: image: runs-on: ubuntu-latest steps: - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 - uses: docker/login-action@v3 with: registry: ghcr.io username: ${{ github.actor }} password: ${{ github.token }} - uses: docker/build-push-action@v6 with: push: true tags: ghcr.io/${{ github.repository }}:${{ github.sha }}What Skylos leaves alone
name: CIon: pull_requestpermissions: contents: readjobs: lint: runs-on: ubuntu-latest steps: - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 - uses: ./.github/actions/setup-toolchain - run: make lint test: uses: ./.github/workflows/test.ymlWhy Skylos leaves it alone
The checkout is pinned to a commit. ./.github/actions/setup-toolchain is an action in this repository and ./.github/workflows/test.yml a workflow in it: both run at the commit being built, so there is no tag for anyone else to move.
How Skylos decides
- Reads
uses:in workflow steps, in jobs that call a reusable workflow, and in the steps of composite actions (action.yml). - Leaves alone references that start with
./or../(code in this repository), job calls of./.github/workflows/<file>.ymlor$/.github/workflows/<file>.yml, anddocker://images that contain@, such as an@sha256:digest. - Everything else needs
@followed by exactly 40 hex characters. A reference with${{ … }}or with no@at all is reported. - Grades severity by owner:
actions/*andgithub/*at a tag or branch are LOW, because GitHub publishes them; every other owner, and a GitHub-owned path with.,..or empty parts, is HIGH. A LOW finding whose ref is a version tag such asv4orv4.2.2is marked as low risk, which hides it from the default listing. - Reports on the first line that contains the reference. The same reference used in several places is one finding.
How to fix it
Pin each action to the commit SHA of the release you reviewed, and keep the version in a comment so Dependabot or Renovate can update both. Take the SHA from the action's own release page; the ones below show the format.
name: Docker imageon: push: branches: [main]permissions: contents: read packages: writejobs: image: runs-on: ubuntu-latest steps: - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2Removed: - uses: docker/login-action@v3Added: - uses: docker/login-action@9780b0c442fbb1117ed29e0efdff1e18412f7567 # v3.3.0 with: registry: ghcr.io username: ${{ github.actor }} password: ${{ github.token }}Removed: - uses: docker/build-push-action@v6Added: - uses: docker/build-push-action@4f58ea79222b3b9dc2c8bbdd6debcef730109a75 # v6.9.0 with: push: true tags: ghcr.io/${{ github.repository }}:${{ github.sha }}When it can be wrong
- A pinned SHA is not checked against the action's repository: a SHA from a fork, or one that is not a release, still passes.
docker://image:tagis reported here as well as by SKY-D296, which covers container images.
Seeing a case that isn't listed here? Report the wrong result so the rule can be fixed. Don't paste company code: describe the shape of it.
How to silence it
Put
skylos: ignore[SKY-D292]with a reason on the reported line or the line directly above it; each reference needs its own marker. Because one finding covers every use of the same reference, a marker on its first use covers them all.YAML steps: # skylos: ignore[SKY-D292] internal action, released by our own team - uses: our-org/deploy-action@v3A baseline (
skylos baseline ., then--baseline) also hides it. The entry is the rule, the absolute file path and the line, so it stops matching when lines above the reference move or the checkout is at another path.[tool.skylos] ignore = ["SKY-D292"]turns the rule off for the whole project.