diff --git a/pkg/cmd/cmd_sbom/generate.go b/pkg/cmd/cmd_sbom/generate.go index aef8c23d..1ba28c4c 100644 --- a/pkg/cmd/cmd_sbom/generate.go +++ b/pkg/cmd/cmd_sbom/generate.go @@ -67,6 +67,7 @@ func runGenerate(ctx context.Context, opts *generateOptions) error { Enabled: true, SBOM: &security.SBOMConfig{ Enabled: true, + Required: true, Format: string(format), Generator: "syft", Output: &security.OutputConfig{ @@ -91,9 +92,6 @@ func runGenerate(ctx context.Context, opts *generateOptions) error { if err != nil { return fmt.Errorf("failed to generate SBOM: %w", err) } - if generatedSBOM == nil { - return fmt.Errorf("no SBOM generated") - } // Print summary fmt.Printf("✓ SBOM generated successfully\n")