Skip to content

Commit 911ca74

Browse files
committed
[SBOM] only checksum jar files
1 parent bb7243d commit 911ca74

File tree

1 file changed

+1
-4
lines changed

1 file changed

+1
-4
lines changed

pkg/util/trivy/trivy.go

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -104,6 +104,7 @@ func getDefaultArtifactOption(opts sbom.ScanOptions) artifact.Option {
104104
Parallel: parallel,
105105
SBOMSources: []string{},
106106
DisabledHandlers: DefaultDisabledHandlers(),
107+
FileChecksumJar: true,
107108
WalkerOption: walker.Option{
108109
ErrorCallback: func(_ string, err error) error {
109110
if errors.Is(err, fs.ErrPermission) || errors.Is(err, fs.ErrNotExist) {
@@ -164,10 +165,6 @@ func getDefaultArtifactOption(opts sbom.ScanOptions) artifact.Option {
164165
)
165166
}
166167

167-
if slices.Contains(opts.Analyzers, LanguagesAnalyzers) {
168-
option.FileChecksum = true
169-
}
170-
171168
return option
172169
}
173170

0 commit comments

Comments
 (0)