Skip to content

security: pin all container images to digests + enforce with a catalog test - #37

Merged
GeiserX merged 1 commit into
mainfrom
security/pin-images
Jul 5, 2026
Merged

security: pin all container images to digests + enforce with a catalog test#37
GeiserX merged 1 commit into
mainfrom
security/pin-images

Conversation

@GeiserX

@GeiserX GeiserX commented Jul 5, 2026

Copy link
Copy Markdown
Owner

Fourth PR from the /review-code! audit — the top security finding (S1).

The catalog pulled every service image by a floating tag / bare :latest — a real supply-chain risk (closed-source passive-income clients auto-pulled onto your residential IP) that also broke the repo's own rule (CLAUDE.md: never :latest).

  • Pinned 19/20 images to their current multi-arch OCI index digest (image[:tag]@sha256:…, kept the tag for readability, stays multi-platform).
  • The only unpinned image is peer2profit — its Docker Hub repo was removed (401), and it's a dead service, so it's exempt.
  • New enforcement gate: internal/catalog/image_pin_test.go loads the real ./services catalog and fails if any non-dead/dropped/broken service with a non-empty docker.image lacks an @sha256: pin. Fail-closed proven (temporarily unpinning one image failed the test).

Verified on macOS: go test ./internal/catalog/ + go test ./... green. Renovate/Dependabot can keep the digests fresh going forward.

…g test

The service catalog pulled every image by a floating tag / bare :latest — a
supply-chain risk (closed-source proxyware auto-pulled onto the user's IP) that
also violated the repo's own rule (CLAUDE.md: never :latest). Pin all 19
resolvable images to their current multi-arch OCI index digest
(image[:tag]@sha256:...); the only unpinned image is peer2profit (dead — its
Docker Hub repo was removed), which is exempt as a dead service.

Add internal/catalog/image_pin_test.go: loads the real ./services catalog and
fails if any non-dead/dropped/broken service with a non-empty docker.image
lacks an @sha256: pin. Fail-closed verified.

Verified on macOS: go test ./internal/catalog/ + go test ./... green.
@coderabbitai

coderabbitai Bot commented Jul 5, 2026

Copy link
Copy Markdown

Warning

Review limit reached

@GeiserX, you've reached your PR review limit, so we couldn't start this review.

Next review available in: 14 minutes

Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available.
You're only billed for reviews past your plan's rate limits ($0.25/file).

How can I continue?

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.

To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews.

How do review limits work?

CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability.

For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window.

Please refer docs for additional details.

Review details
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: e3791169-4108-445a-b2b0-7f777653f5b5

📥 Commits

Reviewing files that changed from the base of the PR and between d5aef03 and 52866b2.

📒 Files selected for processing (21)
  • internal/catalog/image_pin_helpers_test.go
  • internal/catalog/image_pin_test.go
  • services/bandwidth/bitping.yml
  • services/bandwidth/earnapp.yml
  • services/bandwidth/earnfm.yml
  • services/bandwidth/honeygain.yml
  • services/bandwidth/iproyal.yml
  • services/bandwidth/mysterium.yml
  • services/bandwidth/packetshare.yml
  • services/bandwidth/packetstream.yml
  • services/bandwidth/proxybase.yml
  • services/bandwidth/proxylite.yml
  • services/bandwidth/proxyrack.yml
  • services/bandwidth/repocket.yml
  • services/bandwidth/speedshare.yml
  • services/bandwidth/traffmonetizer.yml
  • services/bandwidth/urnetwork.yml
  • services/bandwidth/wizardgain.yml
  • services/depin/anyone-protocol.yml
  • services/depin/presearch.yml
  • services/storage/storj.yml
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch security/pin-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.

@codecov

codecov Bot commented Jul 5, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 50.31%. Comparing base (4fa8937) to head (52866b2).
⚠️ Report is 2 commits behind head on main.

Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##             main      #37      +/-   ##
==========================================
+ Coverage   45.95%   50.31%   +4.36%     
==========================================
  Files           8        8              
  Lines        1754     1751       -3     
==========================================
+ Hits          806      881      +75     
+ Misses        893      802      -91     
- Partials       55       68      +13     

see 4 files with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@GeiserX
GeiserX merged commit 6807414 into main Jul 5, 2026
5 checks passed
@GeiserX
GeiserX deleted the security/pin-images branch July 5, 2026 02:52
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.

1 participant