Repository navigation
build: the image is built and scanned where the code is (ADR 0085) - #127
Merged
Merged
Conversation
The DaemonSet runs as root with hostPID and CAP_SYS_PTRACE, and security.md says plainly that installing it is a decision to trust this image with the node. Nothing built that image but a person, nothing looked inside it, both bases were movable tags, and `COPY . .` took CONTEXT.md into the builder stage. CI now builds it on every pull request and pushes nothing. syft catalogues the image, grype scans the catalogue and fails on a fixable high-severity finding in the base layer. Go findings are printed and do not gate: matching the binary's embedded module list against advisories is the weaker question ADR 0038 already answered better with reachability, and grype says so itself in a warning about module granularity. The job first asserts the catalogue is not empty, because a cataloguer that finds nothing reads exactly like a clean image. Both FROM lines are pinned by digest and Dependabot gains a docker ecosystem beside the two it already watched, so a moved tag arrives as a pull request this job builds. A pin it can move is a new way to break the rule that the Go floor in go.mod and in the build image are one fact, so test/image fails when they disagree. .git stays in the build context deliberately: it is what stamps vcs.revision into the binary, which is the provenance this agent reads off customer workloads. make image-scan # 6 deb packages, 83 go modules catalogued, 0 findings go test ./test/image/ -run TestEveryBase # fails on a tag-only FROM Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01KeZECJXTDHL6Nts95eKMJA
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.
Slice 1 of the image-security work. Nothing is published — CI builds the image and pushes nothing; signing, provenance and multi-arch are the release questions and are not answered here.
Why now
security.md§7.1 says plainly that installing the DaemonSet "is a decision to trust this agent's image with the node" — it runs as root, withhostPIDandCAP_SYS_PTRACE, plusCAP_BPF/CAP_PERFMONin one profile. Everything in this repository bounds what the agent's code does; none of it bounds what other code in that container could do. The image had none of the discipline the code has:make vulncheckanswers about Go and cannot see the base layer at all;FROMlines were movable tags;.dockerignore,COPY . .tookCONTEXT.mdinto the builder stage.What is in the image, measured
The division of labour, and why it is not duplication
syftcatalogues,grypescans the catalogue and fails on a fixable high-severity finding in the base layer. Go findings are printed (--show-suppressed) and do not gate.That is not leniency — it is ADR 0038's line. Matching the binary's embedded module list against advisories fails on modules nothing calls, which §2 of that ADR decided must not fail a build. grype itself prints the reason on our image: "go vulnerability matching falls back to module granularity and may report false positives". Reachability stays
make vulncheck's job; the base layer, invisible to it, is what this gates.The job asserts the catalogue is non-empty before trusting it — a cataloguer that finds nothing reports nothing, which reads exactly like a clean image.
Pins, and the drift they invite
Both bases pinned by digest. Dependabot gains a
dockerecosystem beside thegomodandgithub-actionsentries it already had, so a moved tag arrives as a PR this job builds and scans.That creates one new way to break ADR 0038 §3 — the Go floor in
go.modand in the build image are one fact, and Dependabot can now move one of them alone.test/imagefails when they disagree, and it is proved to fail: bumping the builder togolang:1.26.8turns both guardrails red..gitstays in the context, deliberatelyExcluding it would be the obvious hygiene move and it is wrong here:
.gitis what stampsvcs.revision,vcs.timeandvcs.modifiedinto the binary — the provenance this agent reads off customer workloads. An image of ours that could not answer "which commit is running" would fail the check we sell. The test asserts it is not excluded.Evidence
Built and tested from a clean
git archive HEADextraction.🤖 Generated with Claude Code
https://claude.ai/code/session_01KeZECJXTDHL6Nts95eKMJA