feat(pipeline): firmware SBOM via tramiton reproducible build (phase 2)
CI / Check (pull_request) Successful in 6m49s
CI / Detect Changes (pull_request) Has been skipped
CI / Deploy Agent (pull_request) Has been skipped
CI / Deploy Dashboard (pull_request) Has been skipped
CI / Deploy Docs (pull_request) Has been skipped
CI / Deploy MCP (pull_request) Has been skipped
CI / Check (pull_request) Successful in 6m49s
CI / Detect Changes (pull_request) Has been skipped
CI / Deploy Agent (pull_request) Has been skipped
CI / Deploy Dashboard (pull_request) Has been skipped
CI / Deploy Docs (pull_request) Has been skipped
CI / Deploy MCP (pull_request) Has been skipped
Upgrade the firmware SBOM from analysis-only to a full reproducible build: run tramiton's NixBackend (`seal_and_build`) over the ingested source to produce a sealed lock whose libraries are pinned and whose firmware artifact carries a content hash, then render the SBOM from the lock plus deep binary SCA of any pre-compiled inputs — the complete bill of materials (toolchain + every fetched library + the firmware image), mapped into `SbomEntry` rows. Graceful by design: when no nix backend is available (or the build fails / times out at 15m), it falls back to the analysis-only components (toolchain + resolvable libraries), so a nix that can't run in the deployment never breaks a scan. Infra: the agent image now installs `nix-portable` (rootless, single binary; best-effort — a failed download just leaves the analysis-only path). The nix store lives under `NP_LOCATION=/data/compliance-scanner` — mount a PERSISTENT volume there in the deployment, otherwise every firmware scan re-fetches nixpkgs + cross toolchains. Adds the `tramiton-sbom` dependency. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Opus 4.8
parent
eaaafc0621
commit
3cedb488ac
@@ -40,6 +40,19 @@ RUN pip3 install --break-system-packages semgrep
|
||||
# Install ruff for Python linting
|
||||
RUN pip3 install --break-system-packages ruff
|
||||
|
||||
# Install nix-portable (rootless nix) so the firmware-SBOM pipeline can drive a
|
||||
# tramiton reproducible build (NixBackend). Best-effort: if the download fails,
|
||||
# the agent falls back to analysis-only firmware SBOMs (never breaks a scan).
|
||||
# The nix store lives under NP_LOCATION — mount a PERSISTENT volume there in the
|
||||
# deployment, else every firmware scan re-fetches nixpkgs + cross toolchains.
|
||||
ARG NIX_PORTABLE_VERSION=v012
|
||||
RUN curl -fsSL -o /usr/local/bin/nix-portable \
|
||||
"https://github.com/DavHau/nix-portable/releases/download/${NIX_PORTABLE_VERSION}/nix-portable-x86_64" \
|
||||
&& chmod +x /usr/local/bin/nix-portable \
|
||||
|| { rm -f /usr/local/bin/nix-portable; echo "WARN: nix-portable install skipped; firmware SBOM uses analysis-only fallback"; }
|
||||
ENV NP_LOCATION=/data/compliance-scanner
|
||||
RUN mkdir -p /data/compliance-scanner
|
||||
|
||||
COPY --from=builder /app/target/release/compliance-agent /usr/local/bin/compliance-agent
|
||||
|
||||
# Copy documentation for the help chat assistant
|
||||
|
||||
Reference in New Issue
Block a user