Skip to content

Commit

Permalink
Remove beta label and disable fingerprinting of compressed content by…
Browse files Browse the repository at this point in the history
… default
  • Loading branch information
sweoggy committed Feb 1, 2024
1 parent 1e0bd15 commit b934c34
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 7 deletions.
8 changes: 4 additions & 4 deletions internal/cmd/fingerprint/fingerprint.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,16 +13,16 @@ import (
var exclusions = file.DefaultExclusionsFingerprint()

const (
ExclusionFlag = "exclusion-fingerprint"
ExclusionFlag = "exclusion"
FingerprintCompressedContent = "fingerprint-compressed-content"
)

var shouldFingerprintCompressedContent bool

func NewFingerprintCmd(fingerprinter fingerprint.IFingerprint) *cobra.Command {

short := "Fingerprints files to match against the Debricked knowledge base. [beta feature]"
long := fmt.Sprintf("Fingerprint files for identification in a given path and writes it to %s. [beta feature]\nThis hashes all files and matches them against the Debricked knowledge base.", fingerprint.OutputFileNameFingerprints)
short := "Fingerprints files to match against the Debricked knowledge base."
long := fmt.Sprintf("Fingerprint files for identification in a given path and writes it to %s.\nThis hashes all files and matches them against the Debricked knowledge base.", fingerprint.OutputFileNameFingerprints)
cmd := &cobra.Command{
Use: "fingerprint [path]",
Short: short,
Expand All @@ -47,7 +47,7 @@ Special Terms | Meaning
Example:
$ debricked files fingerprint . `+exampleFlags)

cmd.Flags().BoolVar(&shouldFingerprintCompressedContent, FingerprintCompressedContent, true, `Fingerprint the contents of compressed files by unpacking them in memory, Supported files: `+fmt.Sprintf("%v", fingerprint.FILES_TO_UNPACK))
cmd.Flags().BoolVar(&shouldFingerprintCompressedContent, FingerprintCompressedContent, false, `Fingerprint the contents of compressed files by unpacking them in memory, Supported files: `+fmt.Sprintf("%v", fingerprint.FILES_TO_UNPACK))

viper.MustBindEnv(ExclusionFlag)

Expand Down
2 changes: 1 addition & 1 deletion internal/cmd/scan/scan.go
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,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, "enables fingerprinting for undeclared component identification. Can be run as a standalone command [files fingerprint] with more granular options. [beta feature]")
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.")
Expand Down
2 changes: 0 additions & 2 deletions internal/fingerprint/fingerprint.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ import (
"errors"
"fmt"
"io"
"log"
"os"
"path/filepath"
"strings"
Expand Down Expand Up @@ -126,7 +125,6 @@ func (f FileFingerprint) ToString() string {
}

func (f *Fingerprinter) FingerprintFiles(rootPath string, exclusions []string, fingerprintCompressedContent bool) (Fingerprints, error) {
log.Println("Warning: Fingerprinting is beta and may not work as expected.")
if len(rootPath) == 0 {
rootPath = filepath.Base("")
}
Expand Down

0 comments on commit b934c34

Please sign in to comment.