Skip to content

fix: set HOME in sbom Nix build so syft can create its cache dir#302

Merged
mgrzybek merged 1 commit into
mainfrom
fix/sbom-nix-sandbox-home
Jul 13, 2026
Merged

fix: set HOME in sbom Nix build so syft can create its cache dir#302
mgrzybek merged 1 commit into
mainfrom
fix/sbom-nix-sandbox-home

Conversation

@mgrzybek

@mgrzybek mgrzybek commented Jul 13, 2026

Copy link
Copy Markdown
Contributor

Summary

  • The "Generate SBOM (CycloneDX)" CI job was failing: in the Nix sandbox $HOME points to a nonexistent /homeless-shelter, so syft can't create $HOME/.cache/syft (permission denied) and exits without producing sbom.cdx.json, which Nix then reports as builder ... failed to produce output path for output 'out'.
  • Fix: export HOME=$TMPDIR (writable inside the sandbox) before invoking syft in the sbom derivation in nix/default.nix.

Failing run: https://github.com/azimuth-cloud/cluster-api-janitor-openstack/actions/runs/29234807134/job/86766907789

Test plan

  • CI: confirm the "Generate SBOM (CycloneDX)" step succeeds on this branch

In the Nix sandbox HOME points to a nonexistent /homeless-shelter,
so syft fails to create $HOME/.cache/syft (permission denied) and
exits without producing the sbom.cdx.json output, breaking the
"Generate SBOM (CycloneDX)" CI job.

Signed-off-by: Mathieu Grzybek <mathieu@stackhpc.com>
@mgrzybek
mgrzybek requested a review from a team as a code owner July 13, 2026 08:39
@mgrzybek
mgrzybek merged commit 10da5b2 into main Jul 13, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants