build(deps): add Dependabot, digest-pin base images, and scan dependency licenses - #520
Conversation
|
Auto-sync is disabled for draft pull requests in this repository. Workflows must be run manually. Contributors can view more details about this message here. |
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: ASSERTIVE Plan: Enterprise Run ID: 📒 Files selected for processing (1)
Included review availability: Your plan provides up to 12 included reviews per hour; 10 remain after this review. 📜 Recent review details⏰ Context from checks skipped due to timeout. (6)
🔇 Additional comments (1)
📝 SummarySummary by CodeRabbit
WalkthroughThe pull request adds weekly Dependabot updates, a license-scan workflow, and digest-pinned Go and Alpine container images. ChangesDependency governance
Estimated code review effort: 2 (Simple) | ~10 minutes Merge Risk: ⚪ Minimal · up to This change adds automated dependency updates, license compliance validation, and immutable container image pins. The current configuration is ready to merge with no identified merge-blocking risk. 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
Greptile SummaryThis PR strengthens dependency and supply-chain maintenance:
Confidence Score: 5/5The PR appears safe to merge, with no outstanding correctness, security, or repository-rule issues identified. The prior license-workflow toolchain mismatch is fully fixed by using go-version-file, and the current dependency automation, license scan, and digest pins introduce no actionable failures. Important Files Changed
Flowchart%%{init: {'theme': 'neutral'}}%%
flowchart LR
D[Dependabot weekly checks] --> G[Go module update PRs]
D --> A[GitHub Actions update PRs]
D --> I[Docker image digest update PRs]
C[Push to main or PR mirror branch] --> L[License scan]
L --> V{All dependency licenses allowed?}
V -->|Yes| P[Check passes]
V -->|No| F[Check fails]
Reviews (3): Last reviewed commit: "ci(license): resolve the Go toolchain fr..." | Re-trigger Greptile |
Neither base image in the Dockerfile was pinned, and alpine:3 was a floating tag that silently moved to whatever the alpine 3 line published that day. Two builds of the same commit could produce different runtime images, and there was no record of which base a released image was actually built from. Pin both to the digest the registry returns today, keeping the tag alongside it so a reader can still see the version: golang:1.26.6@sha256:0d1d3a79... alpine:3.24@sha256:28bd5fe8... alpine:3 currently resolves to 3.24.1, so 3.24 is the concrete tag for the image that was already in use. Both digests were resolved with "docker buildx imagetools inspect" and verified by building a probe image from the two FROM lines: go1.26.6 linux/amd64 and /etc/alpine-release 3.24.1. A digest pin freezes the base image permanently unless something bumps it, so the Dependabot config lands in the same commit. Its docker ecosystem is what keeps the tag and digest pairs current; gomod and github-actions cover the rest of the dependency surface. Minor and patch updates are grouped into one PR per ecosystem per week to keep the maintainers' merge train short, while majors stay ungrouped so each gets its own review. Signed-off-by: Carlos Eduardo Arango Gutierrez <eduardoa@nvidia.com>
Topograph ships under Apache-2.0 but nothing checked that its dependencies can be redistributed under those terms. A first GPL or LGPL module could land in go.mod and reach a release with no signal at all. Run go-licenses over the build graph on pushes to main and to the copy-pr-bot pull-request branches, matching the trigger shape the other workflows already use. The allow list is the exact set present in the tree today (Apache-2.0, BSD-2-Clause, BSD-3-Clause, ISC, MIT) rather than the tool's default, so any new license fails the check and gets a deliberate decision instead of arriving silently. MPL-2.0 and the GPL family are left out on purpose. Verified before landing: the check passes on the current 122-module graph, and removing MIT from the allow list turns it red, so the gate discriminates rather than passing unconditionally. Permissions are contents:read only, and both actions are pinned to full commit SHAs so a moved tag cannot change what runs. Signed-off-by: Carlos Eduardo Arango Gutierrez <eduardoa@nvidia.com>
ec053af to
62a4f22
Compare
The job pinned go-version 1.26.6, which stopped matching go.mod when the toolchain moved to 1.27.1. With GOTOOLCHAIN=local the run then failed with 'go.mod requires go >= 1.27.1 (running go 1.26.6)'. Reading go-version-file keeps the job on whatever go.mod requires, so a future toolchain bump cannot leave it behind. That matters more here than elsewhere because this workflow exists to keep dependency metadata current. Signed-off-by: Carlos Eduardo Arango Gutierrez <eduardoa@nvidia.com>
Description
Adds Dependabot, pins the container base images to digests, and adds a dependency license
scan.
Part of the OSS Health Scorecard work tracked in #513.
What
.github/dependabot.ymlcoveringgomod,github-actionsanddocker. Minor and patchbumps are grouped into one PR per ecosystem per week so the merge train stays short; major
bumps are deliberately left ungrouped so each gets a real review.
Dockerfilebase images pinned to digests, with the readable tag kept alongside:golang:1.26.6@sha256:0d1d3a…andalpine:3.24@sha256:28bd5fe…. The previousalpine:3was a floating tag.
.github/workflows/license-scan.ymlchecking dependency licenses against Apache-2.0.The digests were resolved and then proven
Both digests come from
docker buildx imagetools inspect, not from memory. They were thenverified by an actual BuildKit build of a probe Dockerfile assembled from the two
FROMlinesextracted from the file, with the builder stage made load-bearing so it could not be pruned:
build rc=0,
ALPINE=3.24.1,GO=go version go1.26.6 linux/amd64.Note
alpine:3currently resolves to 3.24.1, so pinning is not a version change.The license gate was seen to go red
Across 122 modules the tree is 72 Apache-2.0, 27 BSD-3-Clause, 21 MIT, 1 ISC, 1 BSD-2-Clause.
With the workflow's allowlist the check passes (rc=0). With MIT removed from the allowlist it
fails (rc=1, naming
github.com/agrea/ptramong others). So the gate discriminates ratherthan passing vacuously.
A note on the trigger
The workflow triggers on push to
mainand onpull-request/[0-9]+rather thanpull_request, matching every existing workflow in this repo: there are zeropull_requesttriggers across the twelve pre-existing workflows because the repo uses copy-pr-bot. Easy to
change if that is not the intent.
Measured effect
CI/CD 2.83/4 to 3.02/4, +0.57 points.
Reviewer note
Dependabot's PRs will pass DCO without any configuration change. The DCO app skips commits
whose author type is
Botbefore it inspects sign-off, and Dependabot signs off anyway. Thiswas verified against a sibling repo in the org running the same app with no
dco.yml.Part of #513.
Checklist
git commit -s).