diff --git a/pkg/compliance/bsiV2.go b/pkg/compliance/bsiV2.go index 6700718..ffc7db7 100644 --- a/pkg/compliance/bsiV2.go +++ b/pkg/compliance/bsiV2.go @@ -89,7 +89,7 @@ func bsiV2SbomSignature(doc sbom.Document) *db.Record { valid, err := common.VerifySignature(pubKey, blob, sig) if err != nil { fmt.Printf("Verification failed: %v\n", err) - return db.NewRecordStmt(SBOM_SIGNATURE, "doc", "Verification failed", 0.0, "") + return db.NewRecordStmt(SBOM_SIGNATURE, "doc", "Verification failed!", 0.0, "") } if valid { score = 10.0 diff --git a/pkg/compliance/common/common.go b/pkg/compliance/common/common.go index 6909eb0..3e630b7 100644 --- a/pkg/compliance/common/common.go +++ b/pkg/compliance/common/common.go @@ -384,8 +384,6 @@ func IsComponentPartOfPrimaryDependency(primaryCompDeps []string, comp string) b } func VerifySignature(publicKeyPath, sbomPath, signaturePath string) (bool, error) { - filesToDelete := []string{publicKeyPath, sbomPath, signaturePath} - defer DeleteFiles(filesToDelete) pubKeyData, err := os.ReadFile(publicKeyPath) if err != nil { return false, err @@ -427,16 +425,6 @@ func VerifySignature(publicKeyPath, sbomPath, signaturePath string) (bool, error return true, err } -func DeleteFiles(files []string) { - for _, file := range files { - if err := os.Remove(file); err != nil { - fmt.Printf("Error deleting file %s: %v\n", file, err) - } else { - fmt.Printf("Deleted file: %s\n", file) - } - } -} - func HashSBOM(sbomPath string) ([]byte, error) { sbomData, err := os.ReadFile(sbomPath) if err != nil {