DEP-91 (3/5): attach SBOM and bundled-tool manifest to releases - #1687
DEP-91 (3/5): attach SBOM and bundled-tool manifest to releases#1687racerxdl wants to merge 4 commits into
Conversation
PR Summary by QodoAttach Trivy SBOMs and release manifest to GitHub releases
AI Description
Diagram
High-Level Assessment
Files changed (4)
|
Code Review by Qodo
1.
|
| def bundled_tools() -> dict: | ||
| """Read bundled-CLI versions from Dockerfile.tools' ARG defaults. | ||
|
|
||
| Best-effort: an ARG that is renamed or removed is simply omitted (the SBOMs |
There was a problem hiding this comment.
1. No tests for sbom generator 📘 Rule violation ▣ Testability
The PR adds a non-trivial SBOM/manifest generator with parsing and retry logic but does not add/modify any unit tests covering common and edge cases. This increases the risk of silent release-artifact failures (e.g., registry lag, non-index manifests, missing ARGs) going undetected.
Agent Prompt
## Issue description
A new helper/parsing script (`scripts/ci/generate-sbom-manifest.py`) was added without accompanying unit tests, despite containing parsing/normalization and retry/branching logic.
## Issue Context
This script impacts release artifact generation (SBOMs + `release-manifest.json`). Unit tests should cover at least: multi-arch index vs single-manifest behavior, registry visibility retry/skip logic, Dockerfile ARG parsing, and Trivy JSON summarization.
## Fix Focus Areas
- scripts/ci/generate-sbom-manifest.py[75-115]
- scripts/ci/generate-sbom-manifest.py[117-131]
- scripts/ci/generate-sbom-manifest.py[147-165]
- scripts/ci/generate-sbom-manifest.py[172-188]
ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools
Migration Safety AnalysisNo database migrations were changed in this PR. Safe to deploy to sandbox. |
|
✅ Build Completed with Success, Version=1687.0.0-g5f1a276 |
Part of DEP-91. New sbom-and-manifest release job (non-blocking, gated behind publish-release) generates per-platform CycloneDX + SPDX SBOMs and a release-manifest.json (index digest, per-platform child digest, base OS, component count, Trivy CRITICAL/HIGH summary) for hoop, hoopdev and hoopdev-minimal, then attaches them to the GitHub release so downstream users can verify shipped components and fixes without re-scanning. 🤖 Generated with Mister Maluco Co-Authored-By: MisterMal <teskeslab@lucasteske.dev>
Part of DEP-91. The SBOM job invoked the generator with a relative outdir that was then bind-mounted into the Trivy container; Docker rejects a relative path as a volume name, so the (continue-on-error) job never attached SBOMs. Resolve outdir to an absolute path before mounting. The agent-tools report-only vuln steps ended a jq summary with `| head` under pipefail: a failed or empty Trivy scan yields invalid JSON, jq exits nonzero, and pipefail failed the step -- blocking the push despite being "non-blocking". Slice inside jq, guard it, and mark the steps continue-on-error so a report hiccup can never block publishing. 🤖 Generated with Mister Maluco Co-Authored-By: MisterMal <teskeslab@lucasteske.dev>
Part of DEP-91. - SBOM: scan each platform by its immutable child digest (repo@sha256:...) so the SBOM matches the digest recorded in the manifest; a non-index tag resolves its real platform and scans by digest (never assumes amd64). - Manifest: record bundled CLI versions for the fat hoophq/hoopdev image (kubectl/sqlcmd/mongosh/mongodb-tools/node/aws-cli/gcloud/gke-plugin), read from Dockerfile.tools ARG defaults, per issue #1643. - AWS CLI: install the pinned version via the versioned installer URL using the previously-unused AWS_CLI_VERSION ARG; the clean train pins 2.36.14, legacy keeps 2.28.6. 🤖 Generated with Mister Maluco Co-Authored-By: MisterMal <teskeslab@lucasteske.dev>
Part of DEP-91. Generate CycloneDX/SPDX SBOMs and a per-tag release manifest for the published images, recording each tag's index digest, per-platform child digests, and (for the fat agent) bundled CLI versions read from Dockerfile.tools ARG defaults. Covers hoophq/hoop, hoophq/hoopdev and both hoophq/hoopagent flavours. Because hoopagent publishes no unsuffixed tag, the image list carries an explicit tag suffix per entry rather than assuming a bare release tag exists. Fixes #DEP-91 🤖 Generated with Mister Maluco Co-Authored-By: MisterMal <teskeslab@lucasteske.dev>
|
✅ Build Completed with Success, Version=1687.0.0-ge80324a |
Stack (DEP-91)
Split from #1662 for reviewability, then rescoped:
mainhas since landed #1681 (dependency/toolchain CVEs) and #1693 (hoophq/hoopagent), which superseded two PRs of the original stack.DEP-91 (1/7): bump Go dependencies and toolchain for CVE fixes #1683 — Go dependency + toolchain CVE bumps— closed, superseded by fix(deps): patch govulncheck vulnerabilities and align CI toolchain to go1.26.5 #1681DEP-91 (3/7): add opt-in hoophq/hoopdev-minimal agent image #1685 — opt-in— closed, superseded by feat(agent): add hoophq/hoopagent image with minimal and distroless flavours #1693hoophq/hoopdev-minimalDEP-91 (1/5): agent-tools: drop kernel-header CVEs and modernize clean train #1684 — 1. agent-tools: drop kernel-header CVEs, modernize clean train
DEP-91 (2/5): gate hoopagent vulnerabilities and add govulncheck #1686 — 2. Vulnerability gates for hoopagent + govulncheck
DEP-91 (3/5): attach SBOM and bundled-tool manifest to releases #1687 — 3. SBOM + bundled-tool manifest on releases ← you are here
DEP-91 (4/5): weekly base-OS rebuild of hoophq/hoopagent #1688 — 4. Weekly base-OS rebuild of hoopagent
DEP-91 (5/5): harden image release integrity #1689 — 5. Image release integrity hardening
Merge in order, bottom-up. Each PR targets the one below it.
The remaining work is what
mainstill lacks: the fat image's kernel-header CVEs, and any vulnerability gate, SBOM, or scheduled OS patching forhoophq/hoopagent.What
Generates CycloneDX/SPDX SBOMs and a per-tag release manifest for the published images, recording each tag's index digest, per-platform child digests, and (for the fat agent) bundled CLI versions.
Covers
hoophq/hoop,hoophq/hoopdev, and bothhoophq/hoopagentflavours.Why
Makes shipped image contents auditable, and prevents reported tool versions from drifting from what actually shipped.
Note on hoopagent tags
hoophq/hoopagentdeliberately publishes no unsuffixed tag and no:latest— every deployment names its flavour. The image list therefore carries an explicit tag suffix per entry (("hoophq/hoopagent", "-minimal")) instead of assumingrepo:tagresolves. Assuming a bare tag would have made the SBOM job silently skip both flavours.hoopagentis intentionally not inREQUIRED_IMAGE_REPOS, so a lagging publish warns rather than failing the release.How to test
Expected: tests pass. Registry visibility probes stay non-raising; Trivy failures propagate.
Part of DEP-91.
Automated by MisterMal