From 9db7ed83bd53ac5828be522a49be721c4c6d1e95 Mon Sep 17 00:00:00 2001 From: Ramkumar Chinchani <45800463+rchincha@users.noreply.github.com> Date: Mon, 26 Feb 2024 10:11:11 -0800 Subject: [PATCH] fix: consider only regular files to checksum (#65) Signed-off-by: Ramkumar Chinchani --- pkg/fs/fs.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/pkg/fs/fs.go b/pkg/fs/fs.go index 12602f7..0e78e42 100644 --- a/pkg/fs/fs.go +++ b/pkg/fs/fs.go @@ -103,7 +103,8 @@ func BuildPackageFromDir(input string, kdoc *k8spdx.Document, kpkg *k8spdx.Packa return err } - if info.IsDir() { + // we compute checksums below, so consider only regular files + if !info.Mode().IsRegular() { return nil }