Conversation
Routine maintenance pass over the pinned tools in the standard, heavy and app-tests images. Trivy is deliberately left at 0.73.0: the Socket-built ghcr.io/socketdev/trivy:0.74.0 is not published yet, and the pin carries a digest that three consumers parse. OpenGrep moves four minors, so the Java rule set was re-measured against OWASP Benchmark v1.2 at the pinned corpus commit. Precision, recall, false positive rate and the per-category breakdown are identical to the 1.26.0 baseline, so docs/java-sast-benchmark.md records 1.30.0 without new numbers. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
All three Dockerfiles pinned their base and tool images as
`FROM image:${VERSION}` against an ARG, and the comments claimed Dependabot
tracked them through those FROM lines. It never did. Its Dockerfile parser is a
regex over FROM lines whose image and tag groups both require literal
characters, and it performs no ARG substitution, so every interpolated line
matched with no version and was skipped with no error at all.
The evidence: no Docker-ecosystem pull request has ever been opened against
this repo — all 33 Dependabot PRs are `python:uv` or `github-actions` — and
`git log -L` on the ARG pins shows they have only ever moved in hand-written
PRs. That is how uv came to sit 16 patch releases behind.
Images are now pinned as literal tags on their FROM lines, which is the only
form the parser reads. `node` and `uv` join the app-tests allow list, since an
`allow:` list silently drops images it does not name, and `securego/gosec`
leaves it: gosec is installed by a shell script and has no FROM line to match.
tests/test_dockerfile_pins.py transcribes the upstream regexes and asserts
every trackable FROM line parses to a version, that the allow lists cover every
image pinned, and that the one duplicated pin — the trufflehog label ARG, which
exists because a LABEL cannot read a FROM tag back — equals its FROM tag.
Two deliberate trade-offs: `--build-arg TRUFFLEHOG_VERSION=` no longer has any
effect, and TRIVY_IMAGE stays interpolated on purpose, because Socket's Trivy
build is digest-pinned and must not move independently.
Verified by building the root image with the documented public-Trivy override:
opengrep 1.30.0, trufflehog 3.97.5, socket 1.1.176, uv 0.12.17, python 3.12.14,
and the labels carry the same versions.
Merged
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.
Two related changes: a routine refresh of the pinned tools in the standard, heavy and app-tests images, and a fix for the reason those pins had gone stale in the first place.
Pins
v1.26.0v1.30.03.96.03.97.51.1.1651.1.1762.9.02.9.40.12.10.12.17v2.28.0v2.29.01.26.51.26.80.73.0Socket SDK (
socketdev) is already at 3.6.0 onmainvia #117 — no change needed here. Python 3.12 and Node 22 are intentional major-line pins.Trivy is still at 0.73.0
ghcr.io/socketdev/trivy:0.74.0is not published yet. The pin carries a digest that three consumers parse (scripts/smoke-test-docker.sh,tests/test_check_core_tools.py,scripts/check_release_docs.py), so a tag-only bump would fail CI. This PR stays draft until the image lands; the flip is a three-filesedpluscheck_release_docs.py --write.Dependabot has never updated a Docker pin in this repo
The Dockerfiles claimed "Dependabot tracks all ARGs below via the FROM lines that reference them." It does not, and never has.
Its parser (
shared_file_parser.rb,file_parser.rb) is a regex over FROM lines:Both groups require literal characters, and
parsedoes no ARG substitution — it just runsnext unless versionper line. SoFROM trufflesecurity/trufflehog:${TRUFFLEHOG_VERSION}matches with a nil tag and is dropped, andFROM ${TRIVY_IMAGE}failsIMAGEoutright. No warning, no error; the pin simply never moves.Two independent confirmations:
python:uvorgithub-actions(thedocker/*actions are GitHub Actions, not images).git log -L '/^ARG UV_VERSION/,+1:Dockerfile'shows the pin has only ever moved in hand-written PRs (feat: 🐳 multi-stage Docker builds, immutable release pipeline,CHANGELOGautomation #46, feat: restore Trivy scanning via Socket-built distribution #100).That is why uv sat 16 patch releases behind.
Correction to this PR's original description
It first proposed fixing this with
ARG UV_IMAGE=ghcr.io/astral-sh/uv:0.12.17+FROM ${UV_IMAGE}. That does not work either —${UV_IMAGE}fails theIMAGEregex just as${VERSION}failsTAG. A literalFROM image:tagis the only form the parser reads, which is what this PR now does.What changed
PYTHON_VERSION,UV_VERSION,GOLANG_VERSIONandNODE_VERSIONARGs are gone (nothing else consumed them).nodeandghcr.io/astral-sh/uvadded to the app-testsallow:list — an allow list silently drops images it does not name, sonode:22-slimwould have stayed invisible even once literal.securego/gosecremoved: gosec is installed by a shell script and has no FROM line to match.scripts/check_core_tools.pyandscripts/check_release_docs.pynow read the TruffleHog pin from the FROM line rather than the ARG — the same reasoning the code already applies toTRIVY_IMAGE(score the real build input, not a label that mirrors it).tests/test_dockerfile_pins.pytranscribes the upstream regexes and asserts: every trackable FROM line parses to a version, the allow lists cover every image pinned, and the trufflehog label ARG equals its FROM tag. Each assertion was verified to fail on a deliberately reintroduced regression.Deliberate trade-offs
--build-arg TRUFFLEHOG_VERSION=no longer does anything — the FROM tag is literal. Edit the line instead. Docs updated;smoke-test-docker.shno longer passes it. OpenGrep, the Socket CLIs and gosec keep working build args, since they are installed by script/npm/pip and never had FROM lines.com.socket.trufflehog-versionneeds a version string and a LABEL cannot read a FROM tag back, soARG TRUFFLEHOG_VERSIONremains as the one pin stated twice, with a test keeping the two equal.FROM ${TRIVY_IMAGE}stays interpolated on purpose. Socket's Trivy build is digest-pinned and must not move independently of the trivy-dist release process; being unreadable to Dependabot is the intent there.Behavior changes users will see
Java rule set re-measured
docs/java-sast-benchmark.mdsays to re-measure when the engine pin moves, so it was, on the pinned BenchmarkJava commit51f0a7c:Per-category and per-rule breakdowns are identical too, so the doc records 1.30.0 without new numbers.
Verification
pytest: 405 passed, 1 skipped, withSOCKET_BASICS_REQUIRE_OPENGREP=1against opengrep 1.30.0 so the Java rule regression tests ran rather than skipped.docker build --checkclean on all three Dockerfiles.--build-arg TRIVY_IMAGE=aquasec/trivy:0.73.0override. Inside it: opengrep1.30.0, trufflehog3.97.5, socket1.1.176, uv0.12.17, python3.12.14, and the OCI labels carry the same versions.🤖 Generated with Claude Code