Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

update-trivy-0.37.3-with-unfilter-jars #2

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -391,4 +391,4 @@ replace oras.land/oras-go => oras.land/oras-go v1.1.1
// spdx logic write on v0.3.0 and incompatible with v0.3.1-0.20230104082527-d6f58551be3f
replace github.com/spdx/tools-golang => github.com/spdx/tools-golang v0.3.0

replace github.com/aquasecurity/go-dep-parser => /Users/wagdezabit/go/src/github.com/wagde-orca/go-dep-parser
replace github.com/aquasecurity/go-dep-parser => github.com/wagde-orca/go-dep-parser v0.0.0-20230611165515-52b03ea40fe7
2 changes: 2 additions & 0 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -1517,6 +1517,8 @@ github.com/vishvananda/netns v0.0.0-20200728191858-db3c7e526aae/go.mod h1:DD4vA1
github.com/vmihailenco/msgpack v3.3.3+incompatible/go.mod h1:fy3FlTQTDXWkZ7Bh6AcGMlsjHatGryHQYUTf1ShIgkk=
github.com/vmihailenco/msgpack/v4 v4.3.12/go.mod h1:gborTTJjAo/GWTqqRjrLCn9pgNN+NXzzngzBKDPIqw4=
github.com/vmihailenco/tagparser v0.1.1/go.mod h1:OeAg3pn3UbLjkWt+rN9oFYB6u/cQgqMEUPoW2WPyhdI=
github.com/wagde-orca/go-dep-parser v0.0.0-20230611165515-52b03ea40fe7 h1:kY/IetnGMByprG5tRsJYQ1LJwa0HHjbDzFGwpbc9KJU=
github.com/wagde-orca/go-dep-parser v0.0.0-20230611165515-52b03ea40fe7/go.mod h1:E5p/rvZrFOz2Py3WtBopQjC1d7AqU54D2FqjjEFHEkk=
github.com/willf/bitset v1.1.11-0.20200630133818-d5bec3311243/go.mod h1:RjeCKbqT1RxIR/KWY6phxZiaY1IyutSBfGjNPySAYV4=
github.com/willf/bitset v1.1.11/go.mod h1:83CECat5yLh5zVOf4P1ErAgKA5UDvKtgyUABdr3+MjI=
github.com/xanzy/ssh-agent v0.3.0 h1:wUMzuKtKilRgBAD1sUb8gOwwRr2FGoBVumcjoOACClI=
Expand Down
3 changes: 2 additions & 1 deletion pkg/fanal/handler/sysfile/filter.go
Original file line number Diff line number Diff line change
Expand Up @@ -59,9 +59,10 @@ func (h systemFileFilteringPostHandler) Handle(_ context.Context, result *analyz
for _, file := range append(result.SystemInstalledFiles, defaultSystemFiles...) {
// Trim leading slashes to be the same format as the path in container images.
systemFile := strings.TrimPrefix(file, "/")

// We should check the root filepath ("/") and ignore it.
// Otherwise libraries with an empty filePath will be removed.
if systemFile != "" {
if systemFile != "" && !strings.HasSuffix(systemFile, "."+types.Jar) {
systemFiles = append(systemFiles, systemFile)
}
}
Expand Down