SKY-D296 · CI/CD pipelines
Container image not pinned by digest
A tag such as node:20 or latest is a movable name: whoever controls the image can point it at new content at any time. Only a digest (@sha256: followed by a hash of the image) always means the same bytes. SKY-D296 reports images that a workflow or action runs without one.
- Languages
- GitHub Actions workflows, Docker and composite actions
- Quality gate
- counted toward the gate limits (full and diff scans)
- Finding type
- review
- Catalog name
- GitHub Actions unpinned container image
Why it matters
The job runs the image with its token, secrets and checkout. If the publisher's registry account is taken over, or a tag is re-pushed by mistake, your next run executes the new content without any change in your repository to review.
What Skylos flags
name: Integration testson: push: branches: [main]permissions: contents: readjobs: integration: runs-on: ubuntu-latest container: image: node:20 steps: - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 with: persist-credentials: false - run: npm ci --ignore-scripts && npm run test:integrationWhat Skylos leaves alone
name: Integration testson: push: branches: [main]permissions: contents: readjobs: integration: runs-on: ubuntu-latest container: image: >- node:20@sha256:80b4246e696054e3f2b2a5e961b89190d2499487399f126d5ef2ee2174350883 steps: - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 with: persist-credentials: false - run: npm ci --ignore-scripts && npm run test:integrationWhy Skylos leaves it alone
The image still carries the readable tag 20, but the @sha256: digest after it decides what runs: Docker refuses any content whose hash does not match. >- only lets the long value start on the next line.
How Skylos decides
- Reads workflow files under
.github/workflowsandaction.yml/action.yamlfiles. - In a workflow, looks at each job's
container(written as text or asimage:), theimageof eachservicesentry, and steps that usedocker://<image>. In an action, looks atruns.imagewhenruns.usingisdocker. - In every
run:step, finds lines that start withdocker runordocker pulland takes the first word after the options as the image. - An image that contains
@sha256:passes. Otherwise it is reported: HIGH with no tag or the taglatest, MEDIUM with another tag or when the name contains${{ … }}, because the value cannot be checked. - One finding per image, on the first line of the file that contains the image text.
How to fix it
Pin each image by digest and keep the tag in front of it so readers still see the version. docker buildx imagetools inspect node:20 prints the digest. A dependency bot such as Renovate can update it later in a reviewed pull request.
name: Integration testson: push: branches: [main]permissions: contents: readjobs: integration: runs-on: ubuntu-latest container:Removed: image: node:20Added: image: >-Added: node:20@sha256:80b4246e696054e3f2b2a5e961b89190d2499487399f126d5ef2ee2174350883 steps: - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 with: persist-credentials: false - run: npm ci --ignore-scripts && npm run test:integrationWhen it can be wrong
- A Docker action with
image: Dockerfile, which GitHub builds from the action's own repository, is reported as an unpinned HIGH image. - An image built earlier in the same job, as in
docker build -t app:ci .followed bydocker run app:ci, is reported as a tagged image. - The finding sits on the first line of the file that contains the image text, which can be an earlier mention of the same name.
- Missed:
docker create,docker compose,sudo docker run,podmanand images named in Compose files.
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-D296]at the end of the reported line or on the line directly above it, one rule per marker.YAML container: # skylos: ignore[SKY-D296] image built and signed by our own pipeline image: ghcr.io/acme/ci-runner:2026.11[tool.skylos] ignore = ["SKY-D296"]turns the rule off for the whole project.