From d31b8303ae084170f1111fc589ec46ebd4d0ad38 Mon Sep 17 00:00:00 2001 From: Mathieu Grzybek Date: Mon, 13 Jul 2026 10:37:43 +0200 Subject: [PATCH] fix: set HOME in sbom Nix build so syft can create its cache dir 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 --- nix/default.nix | 1 + 1 file changed, 1 insertion(+) diff --git a/nix/default.nix b/nix/default.nix index 77b9bd2..503f611 100644 --- a/nix/default.nix +++ b/nix/default.nix @@ -46,6 +46,7 @@ let sbom = pkgs.runCommand "sbom.cdx.json" { nativeBuildInputs = [ pkgs.syft ]; } '' + export HOME=$TMPDIR syft scan ${manager}/bin/manager \ --output cyclonedx-json \ --file $out