github.com/anchore/syft@v1.38.2/syft/pkg/cataloger/debian/cataloger.go (about) 1 /* 2 Package debian provides a concrete Cataloger implementation relating to packages within the Debian linux distribution. 3 */ 4 package debian 5 6 import ( 7 "github.com/anchore/syft/syft/pkg" 8 "github.com/anchore/syft/syft/pkg/cataloger/generic" 9 "github.com/anchore/syft/syft/pkg/cataloger/internal/dependency" 10 ) 11 12 // NewDBCataloger returns a new Deb package cataloger capable of parsing DPKG status DB flat-file stores. 13 func NewDBCataloger() pkg.Cataloger { 14 return generic.NewCataloger("dpkg-db-cataloger"). 15 // note: these globs have been intentionally split up in order to improve search performance, 16 // please do NOT combine into: "**/var/lib/dpkg/{status,status.d/*}" 17 WithParserByGlobs(parseDpkgDB, "**/lib/dpkg/status", "**/lib/dpkg/status.d/*", "**/lib/opkg/info/*.control", "**/lib/opkg/status"). 18 WithProcessors(dependency.Processor(dbEntryDependencySpecifier)) 19 } 20 21 // NewArchiveCataloger returns a new Debian package cataloger object capable of parsing .deb archive files 22 func NewArchiveCataloger() pkg.Cataloger { 23 return generic.NewCataloger("deb-archive-cataloger"). 24 WithParserByGlobs(parseDebArchive, "**/*.deb") 25 }