mirror of
https://github.com/anchore/syft.git
synced 2026-11-01 23:16:30 +01:00
PHP parser composer.lock (#609)
* PHP parse composer.lock Signed-off-by: Nikita <33390074+Zilborg@users.noreply.github.com> * rename PHP package type Signed-off-by: Alex Goodman <alex.goodman@anchore.com> * add PHP composer package support to source info SPDX helper Signed-off-by: Alex Goodman <alex.goodman@anchore.com> * update directory cataloger integration tests (make exception for images) Signed-off-by: Alex Goodman <alex.goodman@anchore.com> Co-authored-by: Alex Goodman <alex.goodman@anchore.com>
This commit is contained in:
@@ -31,6 +31,8 @@ func SourceInfo(p *pkg.Package) string {
|
||||
answer = "acquired package info from go module information"
|
||||
case pkg.RustPkg:
|
||||
answer = "acquired package info from rust cargo manifest"
|
||||
case pkg.PhpComposerPkg:
|
||||
answer = "acquired package info from PHP composer manifest"
|
||||
default:
|
||||
answer = "acquired package info from the following paths"
|
||||
}
|
||||
|
||||
@@ -124,6 +124,14 @@ func Test_SourceInfo(t *testing.T) {
|
||||
"from rust cargo manifest",
|
||||
},
|
||||
},
|
||||
{
|
||||
input: pkg.Package{
|
||||
Type: pkg.PhpComposerPkg,
|
||||
},
|
||||
expected: []string{
|
||||
"from PHP composer manifest",
|
||||
},
|
||||
},
|
||||
}
|
||||
var pkgTypes []pkg.Type
|
||||
for _, test := range tests {
|
||||
|
||||
Reference in New Issue
Block a user