From 7d16fab2b009f8010cb5765a1c28c7f60365b4f4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Filip=20Hed=C3=A9n?= Date: Tue, 23 Apr 2024 15:53:53 +0200 Subject: [PATCH] BC: Change fingerprint flag to negation --- internal/cmd/scan/scan.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/internal/cmd/scan/scan.go b/internal/cmd/scan/scan.go index 9bc3c135..31e786dd 100644 --- a/internal/cmd/scan/scan.go +++ b/internal/cmd/scan/scan.go @@ -45,7 +45,7 @@ const ( VersionHintFlag = "version-hint" RegenerateFlag = "regenerate" NoResolveFlag = "no-resolve" - FingerprintFlag = "fingerprint" + NoFingerprintFlag = "no-fingerprint" PassOnTimeOut = "pass-on-timeout" CallGraphFlag = "callgraph" CallGraphUploadTimeoutFlag = "callgraph-upload-timeout" @@ -128,7 +128,7 @@ $ debricked scan . `+exampleFlags) cmd.Flags().BoolVarP(&passOnDowntime, PassOnTimeOut, "p", false, "pass scan if there is a service access timeout") 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, "disables fingerprinting for undeclared component identification. Can be run as a standalone command [files fingerprint] with more granular options.") + cmd.Flags().BoolVar(&noFingerprint, NoFingerprintFlag, false, "disables fingerprinting for undeclared component identification. Can be run as a standalone command [fingerprint] with more granular options.") 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.") @@ -162,7 +162,7 @@ func RunE(s *scan.IScanner) func(_ *cobra.Command, args []string) error { options := scan.DebrickedOptions{ Path: path, Resolve: !viper.GetBool(NoResolveFlag), - Fingerprint: !viper.GetBool(FingerprintFlag), + Fingerprint: !viper.GetBool(NoFingerprintFlag), Exclusions: viper.GetStringSlice(ExclusionFlag), Verbose: viper.GetBool(VerboseFlag), Regenerate: viper.GetInt(RegenerateFlag),