Skip to content

chore(security): pin Docker images by SHA digest#56

Merged
williaby merged 1 commit into
mainfrom
chore/sha-pin-docker-images
May 28, 2026
Merged

chore(security): pin Docker images by SHA digest#56
williaby merged 1 commit into
mainfrom
chore/sha-pin-docker-images

Conversation

@williaby
Copy link
Copy Markdown
Contributor

Summary

Pin Docker base images by SHA digest to fix OpenSSF Scorecard Pinned-Dependencies findings.

  • python:3.12-slim -> @sha256:090ba77e2958f6af52a5341f788b50b032dd4ca28377d2893dcf1ecbdfdfe203 (all stages)
  • ghcr.io/astral-sh/uv:latest -> ghcr.io/astral-sh/uv:0.11.16@sha256:440fd6477af86a2f1b38080c539f1672cd22acb1b1a47e321dba5158ab08864d
  • node:22-alpine -> @sha256:968df39aedcea65eeb078fb336ed7191baf48f972b4479711397108be0966920 (3 stages in frontend/Dockerfile)
  • nginx:alpine -> @sha256:8b1e78743a03dbb2c95171cc58639fef29abc8816598e27fb910ed2e621e589a (production stage in frontend/Dockerfile)

Why

Same root cause as ByronWilliamsCPA/llc-manager#51. Floating tags break supply-chain integrity; immutable digests make the build deterministic and the Scorecard score climb by ~1.0-1.5.

How the SHAs were resolved

  • python:3.12-slim digest from Docker Hub tag API (last_updated 2026-05-22)
  • uv digest from GHCR OCI registry manifest; the 0.11.16 version tag added alongside digest so Renovate can auto-bump
  • node:22-alpine and nginx:alpine digests from Docker Hub tag API (last_updated 2026-05-14 and 2026-05-24 respectively)

Test plan

  • CI passes (no functional change)
  • Container security gate still satisfied
  • Next Scorecard run shows Pinned-Dependencies score increase

Generated with Claude Code

OpenSSF Scorecard Pinned-Dependencies check scored 0 because Docker
images were pulled by floating tag. Pin to immutable SHA digests so
the build is deterministic and resistant to upstream tag re-pointing.

- python:3.12-slim -> @sha256:090ba77e2958f6af52a5341f788b50b032dd4ca28377d2893dcf1ecbdfdfe203
  (Docker Hub digest as of 2026-05-22, applied to all stages)
- ghcr.io/astral-sh/uv:latest -> ghcr.io/astral-sh/uv:0.11.16@sha256:440fd6477af86a2f1b38080c539f1672cd22acb1b1a47e321dba5158ab08864d
  (explicit version + digest so Renovate can auto-bump together)
- node:22-alpine -> @sha256:968df39aedcea65eeb078fb336ed7191baf48f972b4479711397108be0966920 (3 stages in frontend/Dockerfile)
- nginx:alpine -> @sha256:8b1e78743a03dbb2c95171cc58639fef29abc8816598e27fb910ed2e621e589a (production stage in frontend/Dockerfile)

Same pattern as ByronWilliamsCPA/llc-manager#51.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Copilot AI review requested due to automatic review settings May 26, 2026 17:47
@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented May 26, 2026

Warning

Review limit reached

@williaby, we couldn't start this review because you've reached your PR review rate limit.

More reviews will be available in 59 minutes and 52 seconds. Learn how PR review limits work.

Your organization has run out of usage credits. Purchase more in the billing tab.

⌛ How to resolve this issue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

We recommend that you space out your commits to avoid hitting the rate limit.

🚦 How do rate limits work?

CodeRabbit enforces hourly rate limits for each developer per organization.

Our paid plans include higher PR review limits than trial, open-source, and free plans. In all cases, reviews become available again over time. During sustained high-volume PR review activity, CodeRabbit may temporarily slow when the next review becomes available.

Please see our Fair Usage Limits Policy for further information.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: ASSERTIVE

Plan: Pro

Run ID: 3997b801-893e-4e8c-a681-b90ab437f68f

📥 Commits

Reviewing files that changed from the base of the PR and between 1bb81a7 and 8d4e525.

📒 Files selected for processing (2)
  • Dockerfile
  • frontend/Dockerfile
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch chore/sha-pin-docker-images

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@github-actions
Copy link
Copy Markdown

⚠️ Deprecation Warning: The deny-licenses option is deprecated for possible removal in the next major release. For more information, see issue 997.

Dependency Review

✅ No vulnerabilities or license issues or OpenSSF Scorecard issues found.

Scanned Files

None

Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Pins Docker base images to immutable SHA256 digests to satisfy OpenSSF Scorecard “Pinned-Dependencies” findings and make container builds deterministic.

Changes:

  • Pinned python:3.12-slim to a SHA digest in both builder and runtime stages of the backend Dockerfile.
  • Pinned the uv tool image used for COPY --from=... to ghcr.io/astral-sh/uv:0.11.16@sha256:....
  • Pinned node:22-alpine and nginx:alpine to SHA digests across all stages of frontend/Dockerfile.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.

File Description
Dockerfile Pins Python base image by digest and pins the uv image used for dependency tooling.
frontend/Dockerfile Pins Node (deps/builder/dev) and Nginx (production) base images by digest.

@sonarqubecloud
Copy link
Copy Markdown

@williaby williaby merged commit bf74a00 into main May 28, 2026
41 checks passed
@williaby williaby deleted the chore/sha-pin-docker-images branch May 28, 2026 02:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants