Add SHA256 digest support for Docker images#1
Merged
christian-andersson merged 1 commit intomainfrom Jan 26, 2026
Merged
Conversation
Docker tags are NOT immutable - they can be moved to point to different images at any time. This creates a supply chain attack vector. Changes: - Add digest, secureReference, and securityNotes fields to VersionInfo - Add digest field to VersionDetail for list_versions output - Update Docker client to return SHA256 digests from Docker Hub API - Include security warnings explaining tag mutability risks - Document digest-pinned references in README security section The secureReference field provides ready-to-use digest-pinned format: nginx@sha256:1948e0c46da16a3565a844aa65ab848e1546f85cf47e47d044a567906a3a497f Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Docker tags can be moved to point to different images at any time, creating a supply chain attack vector. This PR adds digest support so users can pin to immutable references like
nginx@sha256:1948e0c46....Example Output
{ "packageName": "nginx", "registry": "docker", "latestStable": "1.27.3", "digest": "sha256:1948e0c46da16a3565a844aa65ab848e1546f85cf47e47d044a567906a3a497f", "secureReference": "nginx@sha256:1948e0c46da16a3565a844aa65ab848e1546f85cf47e47d044a567906a3a497f", "securityNotes": [ "WARNING: Docker tags are NOT immutable...", "Using the digest-pinned reference provides protection against tag tampering.", ... ] }Test plan
deno test --allow-net- all tests passlookup_versionfor Docker images returns digestlist_versionsfor Docker images returns digest per version🤖 Generated with Claude Code