From 43a3b7b3dd147123ffe5483c490f88fa3a14279a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Emil=20W=C3=A5reus?= Date: Mon, 5 Feb 2024 11:02:21 +0100 Subject: [PATCH] unhide fingerprint in scan command and remove unpacking of compressed files (#191) --- internal/cmd/scan/scan.go | 1 - internal/scan/scanner.go | 2 +- 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/internal/cmd/scan/scan.go b/internal/cmd/scan/scan.go index 45b2a672..491f8b38 100644 --- a/internal/cmd/scan/scan.go +++ b/internal/cmd/scan/scan.go @@ -117,7 +117,6 @@ $ debricked scan . `+exampleFlags) cmd.Flags().BoolVar(&noResolve, NoResolveFlag, false, `disables resolution of manifest files that lack lock files. Resolving manifest files enables more accurate dependency scanning since the whole dependency tree will be analysed. For example, if there is a "go.mod" in the target path, its dependencies are going to get resolved onto a lock file, and latter scanned.`) cmd.Flags().BoolVar(&noFingerprint, FingerprintFlag, false, "enables fingerprinting for undeclared component identification. Can be run as a standalone command [files fingerprint] with more granular options. Will be default in an upcoming major release.") - cmd.Flags().MarkHidden(FingerprintFlag) //nolint:errcheck cmd.Flags().BoolVar(&callgraph, CallGraphFlag, false, `Enables call graph generation during scan.`) cmd.Flags().IntVar(&callgraphUploadTimeout, CallGraphUploadTimeoutFlag, 10*60, "Set a timeout (in seconds) on call graph upload.") cmd.Flags().IntVar(&callgraphGenerateTimeout, CallGraphGenerateTimeoutFlag, 60*60, "Set a timeout (in seconds) on call graph generation.") diff --git a/internal/scan/scanner.go b/internal/scan/scanner.go index 762a5265..c95298a0 100644 --- a/internal/scan/scanner.go +++ b/internal/scan/scanner.go @@ -153,7 +153,7 @@ func (dScanner *DebrickedScanner) scanResolve(options DebrickedOptions) error { func (dScanner *DebrickedScanner) scanFingerprint(options DebrickedOptions) error { if options.Fingerprint { - fingerprints, err := dScanner.fingerprint.FingerprintFiles(options.Path, file.DefaultExclusionsFingerprint(), true) + fingerprints, err := dScanner.fingerprint.FingerprintFiles(options.Path, file.DefaultExclusionsFingerprint(), false) if err != nil { return err }