mirror of
https://github.com/anchore/syft.git
synced 2026-07-04 18:18:26 +02:00
Borland Package Library (.bpl) files are standard Windows PE/DLL files used in Delphi and C++Builder ecosystems. This adds the .bpl glob pattern to the PE file discovery so these files are cataloged alongside .dll and .exe files.
This commit is contained in:
parent
b15c5dbfe2
commit
1143c12a97
@ -32,6 +32,7 @@ func TestCataloger_Globs(t *testing.T) {
|
||||
fixture: "testdata/glob-paths",
|
||||
cataloger: NewDotnetPortableExecutableCataloger(),
|
||||
expected: []string{
|
||||
"src/something.bpl",
|
||||
"src/something.dll",
|
||||
"src/something.exe",
|
||||
},
|
||||
@ -41,6 +42,7 @@ func TestCataloger_Globs(t *testing.T) {
|
||||
fixture: "testdata/glob-paths",
|
||||
cataloger: NewDotnetDepsBinaryCataloger(DefaultCatalogerConfig()),
|
||||
expected: []string{
|
||||
"src/something.bpl",
|
||||
"src/something.deps.json",
|
||||
"src/something.dll",
|
||||
"src/something.exe",
|
||||
|
||||
@ -23,6 +23,7 @@ const (
|
||||
depsJSONGlob = "**/*.deps.json"
|
||||
dllGlob = "**/*.dll"
|
||||
exeGlob = "**/*.exe"
|
||||
bplGlob = "**/*.bpl"
|
||||
)
|
||||
|
||||
// depsBinaryCataloger will search for both deps.json evidence and PE file evidence to create packages. All packages
|
||||
@ -472,7 +473,7 @@ func readDepsJSON(resolver file.Resolver, loc file.Location) (*depsJSON, error)
|
||||
|
||||
// findPEFiles locates and parses all PE files (dll/exe).
|
||||
func findPEFiles(resolver file.Resolver) ([]logicalPE, error, error) {
|
||||
peLocs, err := resolver.FilesByGlob(dllGlob, exeGlob)
|
||||
peLocs, err := resolver.FilesByGlob(dllGlob, exeGlob, bplGlob)
|
||||
if err != nil {
|
||||
return nil, nil, fmt.Errorf("unable to find PE files: %w", err)
|
||||
}
|
||||
|
||||
0
syft/pkg/cataloger/dotnet/testdata/glob-paths/src/something.bpl
vendored
Normal file
0
syft/pkg/cataloger/dotnet/testdata/glob-paths/src/something.bpl
vendored
Normal file
Loading…
x
Reference in New Issue
Block a user