Repository navigation
fix(ci): fetch grype install.sh from the pinned tag, not main - #3023
Conversation
The installer was downloaded from the moving main branch and checked against a fixed hash, so any upstream edit to install.sh broke setup-tools. Fetching it from the grype version tag in .settings.yaml makes the hash stable until that version is bumped. Signed-off-by: Mike Cook <micook@nvidia.com>
|
Navigate logical layers of code changes, visualize relationships, and explore their blast radius. No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Repository: NVIDIA/aicr/.coderabbit.yaml Review profile: ASSERTIVE Plan: Enterprise Run ID: 📒 Files selected for processing (1)
Included review availability: This review used your included allowance. Your plan provides up to 12 included reviews per hour; 10 remain after this review. 📝 WalkthroughWalkthroughThe Grype installer now fetches Priority: ⬇️ Low Estimated code review effort: 1 (Trivial) | ~5 minutes Change: Bug fix Suggested reviewers: Merge Risk: ⚪ Minimal · up to No actionable merge-blocking risk remains; the installer pin is verified for the configured version. 🚥 Pre-merge checks | ✅ 4✅ Passed checks (4 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
Summary
Fetch grype's
install.shfrom the grype version tag in.settings.yamlinstead ofmain, so the pinned checksum stays valid until the grype version is bumped.Motivation / Context
tools/setup-toolsdownloadedinstall.shfromanchore/grype/mainand verified it against a fixedGRYPE_INSTALL_SHA256. Upstream merged a refactor of the script's argument handling, which changed its hash and broke the install step with a checksum mismatch. The tagged file is immutable, andinstall.shatv0.119.0hashes to the existing pin, so no hash change is needed.Fixes: N/A
Related: N/A
Type of Change
Component(s) Affected
cmd/aicr,pkg/cli)cmd/aicrd,pkg/server)pkg/recipe)pkg/bundler,pkg/component/*)pkg/collector,pkg/snapshotter)pkg/validator)pkg/errors,pkg/k8s)docs/,examples/)tools/setup-toolsImplementation Notes
GRYPE_SCRIPT_URLnow uses${GRYPE_VERSION}instead ofmain.GRYPE_INSTALL_SHA256with the command to re-pin it whensecurity_tools.grypeis bumped, matching the existing golangci-lint pin.security_tools.grypebut does not update the hash, so a grype bump will fail the check until the hash is re-pinned. golangci-lint already behaves this way.grype/mainline intools/registry-inventory/shell_test.gois a parser fixture and is intentionally unchanged.Testing
bash -n,tools/setup-tools_test.sh, and the registry-inventory tests pass. The taggedinstall.shhashes to8646f06a90b10ca64992c1809b4aa00c44e30b4f551f63c309b0b0ab66873556, which matchesGRYPE_INSTALL_SHA256. The previousmainfile hashed to the same value before the upstream change and now hashes toaf43b85a127bb0462f248f70f801d62e82ae584fcd05365853c709bd2cfc3b5c.Risk Assessment
Rollout notes: N/A. Only the Linux grype install path changes, and the verified hash is unchanged.
Checklist
make testwith-race)make lint)git commit -S) — GPG signing info