OPS-11: SBOM generation and release provenance workflow#606
OPS-11: SBOM generation and release provenance workflow#606Chris0Jeky merged 10 commits intomainfrom
Conversation
CycloneDX SBOMs for .NET backend and npm frontend dependencies, plus SLSA-style build provenance manifest with checksums. Implements OPS-11 (#103).
The release build verification workflow now calls reusable-sbom-provenance.yml for real SBOM generation instead of the previous placeholder summary.
The release security workflow now also generates SBOM artifacts alongside the existing dependency inventory and vulnerability scans.
Reflect that SBOM/provenance is now implemented via reusable-sbom-provenance.yml in both release lanes.
Covers format choices, workflow integration, retention policy, failure handling, and security review process for OPS-11 (#103).
Security review process now points to SBOM/provenance artifacts generated by the reusable-sbom-provenance workflow.
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
Use Node.js script with environment variables instead of a bash heredoc to avoid indentation artifacts in the JSON output and prevent GitHub expression injection in shell context.
There was a problem hiding this comment.
Code Review
This pull request establishes a formal policy for SBOM generation and release provenance, incorporating CycloneDX and SLSA v1. It also updates the existing security documentation to reflect these new processes. Review feedback identifies a factual error regarding CycloneDX's ISO status and strongly recommends pinning the versions of the SBOM generation tools to ensure build reproducibility and security.
|
|
||
| ## SBOM Format | ||
|
|
||
| Taskdeck uses the [CycloneDX](https://cyclonedx.org/) format (JSON, spec version 1.5) for all SBOMs. CycloneDX is an OWASP project and an ISO standard (ISO/IEC 27036) widely supported by vulnerability scanners and dependency analysis tools. |
There was a problem hiding this comment.
CycloneDX is an OWASP project, but it is not an ISO standard (SPDX is the ISO standard for SBOMs, ISO/IEC 5962:2021). ISO/IEC 27036 is a standard for supplier relationship security that SBOMs help satisfy, but it is not the specification for the CycloneDX format itself. It is better to remove the ISO claim to maintain accuracy.
| Taskdeck uses the [CycloneDX](https://cyclonedx.org/) format (JSON, spec version 1.5) for all SBOMs. CycloneDX is an OWASP project and an ISO standard (ISO/IEC 27036) widely supported by vulnerability scanners and dependency analysis tools. | |
| Taskdeck uses the [CycloneDX](https://cyclonedx.org/) format (JSON, spec version 1.5) for all SBOMs. CycloneDX is an OWASP project widely supported by vulnerability scanners and dependency analysis tools. |
|
|
||
| ### Backend SBOM | ||
|
|
||
| - **Tool:** `CycloneDX` .NET global tool (`dotnet CycloneDX`) |
There was a problem hiding this comment.
For reproducible builds and reliable provenance, it is recommended to specify and pin the version of the CycloneDX .NET tool. Relying on the environment's default or latest version can lead to inconsistent SBOM outputs over time.
| - **Tool:** `CycloneDX` .NET global tool (`dotnet CycloneDX`) | |
| - **Tool:** CycloneDX .NET global tool (pinned version) |
|
|
||
| ### Frontend SBOM | ||
|
|
||
| - **Tool:** `@cyclonedx/cyclonedx-npm` (npx, latest) |
There was a problem hiding this comment.
Using latest for security-critical tooling like SBOM generation introduces non-determinism and potential supply chain risks. For robust release provenance, it is recommended to pin the @cyclonedx/cyclonedx-npm tool to a specific version (e.g., ^1.10.0). This ensures that updates to the tool don't unexpectedly change the SBOM format or break the pipeline.
| - **Tool:** `@cyclonedx/cyclonedx-npm` (npx, latest) | |
| - **Tool:** @cyclonedx/cyclonedx-npm (npx, pinned version) |
Replace positional directory argument and undocumented flags with the correct --package-dir flag per cyclonedx-npm docs.
Adversarial Self-ReviewFindings reviewed and status1. Provenance JSON generation (FIXED)
2. Frontend SBOM CLI flags (FIXED)
3. Backend SBOM
4.
5. Permissions scope (VERIFIED)
6. Tool version pinning (NOTED FOR FUTURE)
7. SBOM summary markdown indentation (COSMETIC)
8. Duplicate SBOM generation across ci-release and release-security (BY DESIGN)
ConclusionTwo real issues found and fixed (provenance JSON generation, frontend CLI flags). Remaining items are acceptable design decisions documented in the policy. No blocking issues remain. |
Adversarial Code Review -- PR #606CI Status: Workflow Lint FAILINGThe This is in the checksum generation step: sha256sum *.json > checksums.sha256 2>/dev/null || trueFix: Severity: HIGH -- This blocks merge via the CI gate. Must be fixed. Security FindingsS1.
|
| ID | Category | Severity | Status |
|---|---|---|---|
| CI | Workflow Lint failure (SC2035) | HIGH | Blocks merge |
| S1 | github.ref_name injection in shell |
MEDIUM | Must fix |
| S2 | Unpinned tool versions via npx --yes |
MEDIUM | Should fix |
| S3 | Silent SBOM failure by default | LOW | Acceptable if documented |
| C1 | dotnet CycloneDX solution file support |
MEDIUM | Verify |
| C2 | Empty checksums on total failure | LOW | Cosmetic |
| C3 | Inaccurate startedOn timestamp |
LOW | Nice to fix |
| P1 | Unsigned provenance called "SLSA" | MEDIUM | Rename in docs |
| P2 | Tool versions recorded as "latest" | MEDIUM | Should fix |
| P3 | SLSA subject field incomplete |
LOW | Future |
Verdict: Do not merge until at minimum the CI lint failure (SC2035) and the shell injection vector (S1) are fixed. S2 and P2 are strongly recommended before merge.
Prevents filenames starting with dashes from being interpreted as options to sha256sum.
Prevents shell injection via crafted tag names. github.ref_name and other expressions are now passed through env vars instead of being interpolated directly into shell commands.
Summary
Implements #103 (OPS-11): SBOM generation and release provenance workflow.
.github/workflows/reusable-sbom-provenance.yml): generates CycloneDX JSON SBOMs for backend (.NET viadotnet CycloneDX) and frontend (npm via@cyclonedx/cyclonedx-npm), plus a SLSA v1-style build provenance manifest with SHA-256 checksumsdocs/ops/SBOM_RELEASE_PROVENANCE.md): format choices, trigger matrix, retention policy, failure handling, security review process, future enhancementsArtifact retention is 90 days. SBOM generation uses
continue-on-errorby default with an opt-infail-on-errorstrict mode for production gates.Test plan
ci-release.ymlvia manual dispatch and confirm SBOM artifacts are uploadedrelease-security.ymlmanual dispatch also produces SBOM artifactsbuild-provenance.jsoncontains correct repository/SHA/run metadatachecksums.sha256covers all JSON artifactsfail-on-error: truemode rejects runs with SBOM generation failuresCloses #103