Skip to content

Commit

Permalink
Expanded dpkg cataloger globs (#3373)
Browse files Browse the repository at this point in the history
Signed-off-by: Nathan Voss <njvoss299@gmail.com>
  • Loading branch information
njv299 authored Oct 23, 2024
1 parent 06d300e commit b505317
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 2 deletions.
2 changes: 1 addition & 1 deletion syft/pkg/cataloger/debian/cataloger.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,6 @@ func NewDBCataloger() pkg.Cataloger {
return generic.NewCataloger("dpkg-db-cataloger").
// note: these globs have been intentionally split up in order to improve search performance,
// please do NOT combine into: "**/var/lib/dpkg/{status,status.d/*}"
WithParserByGlobs(parseDpkgDB, "**/var/lib/dpkg/status", "**/var/lib/dpkg/status.d/*", "**/lib/opkg/info/*.control", "**/lib/opkg/status").
WithParserByGlobs(parseDpkgDB, "**/lib/dpkg/status", "**/lib/dpkg/status.d/*", "**/lib/opkg/info/*.control", "**/lib/opkg/status").
WithProcessors(dependency.Processor(dbEntryDependencySpecifier))
}
4 changes: 3 additions & 1 deletion syft/pkg/cataloger/debian/cataloger_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -234,10 +234,12 @@ func TestCataloger_Globs(t *testing.T) {
name: "obtain db status files",
fixture: "test-fixtures/glob-paths",
expected: []string{
"usr/lib/dpkg/status",
"var/lib/dpkg/status",
"usr/lib/dpkg/status.d/pkg-1.0",
"var/lib/dpkg/status.d/pkg-1.0",
"usr/lib/opkg/status",
"usr/lib/opkg/info/pkg-1.0.control",
"usr/lib/opkg/status",
},
},
}
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
bogus status
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
bogus package

0 comments on commit b505317

Please sign in to comment.