mirror of
https://github.com/aquasecurity/trivy.git
synced 2025-12-22 23:26:39 -08:00
fix(server): add Locations for Packages in client/server mode (#6366)
This commit is contained in:
@@ -242,6 +242,16 @@ func TestClientServer(t *testing.T) {
|
||||
},
|
||||
golden: "testdata/pom.json.golden",
|
||||
},
|
||||
{
|
||||
name: "scan package-lock.json with repo command in client/server mode",
|
||||
args: csArgs{
|
||||
Command: "repo",
|
||||
RemoteAddrOption: "--server",
|
||||
Target: "testdata/fixtures/repo/npm/",
|
||||
ListAllPackages: true,
|
||||
},
|
||||
golden: "testdata/npm.json.golden",
|
||||
},
|
||||
{
|
||||
name: "scan sample.pem with repo command in client/server mode",
|
||||
args: csArgs{
|
||||
@@ -588,6 +598,10 @@ func setupClient(t *testing.T, c csArgs, addr string, cacheDir string, golden st
|
||||
osArgs = append(osArgs, "--format", "json")
|
||||
}
|
||||
|
||||
if c.ListAllPackages {
|
||||
osArgs = append(osArgs, "--list-all-pkgs")
|
||||
}
|
||||
|
||||
if c.IgnoreUnfixed {
|
||||
osArgs = append(osArgs, "--ignore-unfixed")
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user