-
Notifications
You must be signed in to change notification settings - Fork 2.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: PkgIdentifier as value instead of pointer
Signed-off-by: juan131 <[email protected]>
- Loading branch information
Showing
47 changed files
with
499 additions
and
511 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -338,7 +338,7 @@ func TestAnalyzerGroup_AnalyzeFile(t *testing.T) { | |
ID: "[email protected]", | ||
Name: "musl", | ||
Version: "1.1.24-r2", | ||
Identifier: &types.PkgIdentifier{ | ||
Identifier: types.PkgIdentifier{ | ||
PURL: "pkg:apk/[email protected]", | ||
}, | ||
SrcName: "musl", | ||
|
@@ -382,7 +382,7 @@ func TestAnalyzerGroup_AnalyzeFile(t *testing.T) { | |
ID: "[email protected]", | ||
Name: "actioncable", | ||
Version: "5.2.3", | ||
Identifier: &types.PkgIdentifier{ | ||
Identifier: types.PkgIdentifier{ | ||
PURL: "pkg:gem/[email protected]", | ||
}, | ||
Indirect: false, | ||
|
@@ -400,7 +400,7 @@ func TestAnalyzerGroup_AnalyzeFile(t *testing.T) { | |
ID: "[email protected]", | ||
Name: "actionpack", | ||
Version: "5.2.3", | ||
Identifier: &types.PkgIdentifier{ | ||
Identifier: types.PkgIdentifier{ | ||
PURL: "pkg:gem/[email protected]", | ||
}, | ||
Indirect: true, | ||
|
@@ -449,7 +449,7 @@ func TestAnalyzerGroup_AnalyzeFile(t *testing.T) { | |
ID: "[email protected]", | ||
Name: "actioncable", | ||
Version: "5.2.3", | ||
Identifier: &types.PkgIdentifier{ | ||
Identifier: types.PkgIdentifier{ | ||
PURL: "pkg:gem/[email protected]", | ||
}, | ||
Indirect: false, | ||
|
@@ -467,7 +467,7 @@ func TestAnalyzerGroup_AnalyzeFile(t *testing.T) { | |
ID: "[email protected]", | ||
Name: "actionpack", | ||
Version: "5.2.3", | ||
Identifier: &types.PkgIdentifier{ | ||
Identifier: types.PkgIdentifier{ | ||
PURL: "pkg:gem/[email protected]", | ||
}, | ||
Indirect: true, | ||
|
@@ -587,7 +587,7 @@ func TestAnalyzerGroup_PostAnalyze(t *testing.T) { | |
{ | ||
Name: "com.fasterxml.jackson.core:jackson-annotations", | ||
Version: "2.15.0-rc2", | ||
Identifier: &types.PkgIdentifier{ | ||
Identifier: types.PkgIdentifier{ | ||
PURL: "pkg:maven/com.fasterxml.jackson.core/[email protected]", | ||
}, | ||
FilePath: "testdata/post-apps/jar/jackson-annotations-2.15.0-rc2.jar", | ||
|
@@ -611,7 +611,7 @@ func TestAnalyzerGroup_PostAnalyze(t *testing.T) { | |
ID: "[email protected]", | ||
Name: "certifi", | ||
Version: "2022.12.7", | ||
Identifier: &types.PkgIdentifier{ | ||
Identifier: types.PkgIdentifier{ | ||
PURL: "pkg:pypi/[email protected]", | ||
}, | ||
}, | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -67,7 +67,7 @@ func TestAnalyze(t *testing.T) { | |
{ | ||
Name: "test", | ||
Version: "1.2.3", | ||
Identifier: &types.PkgIdentifier{ | ||
Identifier: types.PkgIdentifier{ | ||
PURL: "pkg:golang/[email protected]", | ||
}, | ||
}, | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -32,7 +32,7 @@ func Test_conanLockAnalyzer_Analyze(t *testing.T) { | |
ID: "openssl/3.0.5", | ||
Name: "openssl", | ||
Version: "3.0.5", | ||
Identifier: &types.PkgIdentifier{ | ||
Identifier: types.PkgIdentifier{ | ||
PURL: "pkg:conan/[email protected]", | ||
}, | ||
DependsOn: []string{ | ||
|
@@ -49,7 +49,7 @@ func Test_conanLockAnalyzer_Analyze(t *testing.T) { | |
ID: "zlib/1.2.12", | ||
Name: "zlib", | ||
Version: "1.2.12", | ||
Identifier: &types.PkgIdentifier{ | ||
Identifier: types.PkgIdentifier{ | ||
PURL: "pkg:conan/[email protected]", | ||
}, | ||
Indirect: true, | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -31,7 +31,7 @@ func Test_packagingAnalyzer_Analyze(t *testing.T) { | |
{ | ||
Name: "pip", | ||
Version: "22.2.2", | ||
Identifier: &types.PkgIdentifier{ | ||
Identifier: types.PkgIdentifier{ | ||
PURL: "pkg:conda/[email protected]", | ||
}, | ||
Licenses: []string{"MIT"}, | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -37,7 +37,7 @@ func Test_pubSpecLockAnalyzer_Analyze(t *testing.T) { | |
ID: "[email protected]", | ||
Name: "collection", | ||
Version: "1.17.0", | ||
Identifier: &types.PkgIdentifier{ | ||
Identifier: types.PkgIdentifier{ | ||
PURL: "pkg:dart/[email protected]", | ||
}, | ||
Indirect: true, | ||
|
@@ -46,7 +46,7 @@ func Test_pubSpecLockAnalyzer_Analyze(t *testing.T) { | |
ID: "[email protected]", | ||
Name: "crypto", | ||
Version: "3.0.3", | ||
Identifier: &types.PkgIdentifier{ | ||
Identifier: types.PkgIdentifier{ | ||
PURL: "pkg:dart/[email protected]", | ||
}, | ||
DependsOn: []string{ | ||
|
@@ -57,15 +57,15 @@ func Test_pubSpecLockAnalyzer_Analyze(t *testing.T) { | |
ID: "[email protected]", | ||
Name: "meta", | ||
Version: "1.11.0", | ||
Identifier: &types.PkgIdentifier{ | ||
Identifier: types.PkgIdentifier{ | ||
PURL: "pkg:dart/[email protected]", | ||
}, | ||
}, | ||
{ | ||
ID: "[email protected]", | ||
Name: "typed_data", | ||
Version: "1.3.2", | ||
Identifier: &types.PkgIdentifier{ | ||
Identifier: types.PkgIdentifier{ | ||
PURL: "pkg:dart/[email protected]", | ||
}, | ||
Indirect: true, | ||
|
@@ -93,7 +93,7 @@ func Test_pubSpecLockAnalyzer_Analyze(t *testing.T) { | |
ID: "[email protected]", | ||
Name: "collection", | ||
Version: "1.17.0", | ||
Identifier: &types.PkgIdentifier{ | ||
Identifier: types.PkgIdentifier{ | ||
PURL: "pkg:dart/[email protected]", | ||
}, | ||
Indirect: true, | ||
|
@@ -102,23 +102,23 @@ func Test_pubSpecLockAnalyzer_Analyze(t *testing.T) { | |
ID: "[email protected]", | ||
Name: "crypto", | ||
Version: "3.0.3", | ||
Identifier: &types.PkgIdentifier{ | ||
Identifier: types.PkgIdentifier{ | ||
PURL: "pkg:dart/[email protected]", | ||
}, | ||
}, | ||
{ | ||
ID: "[email protected]", | ||
Name: "meta", | ||
Version: "1.11.0", | ||
Identifier: &types.PkgIdentifier{ | ||
Identifier: types.PkgIdentifier{ | ||
PURL: "pkg:dart/[email protected]", | ||
}, | ||
}, | ||
{ | ||
ID: "[email protected]", | ||
Name: "typed_data", | ||
Version: "1.3.2", | ||
Identifier: &types.PkgIdentifier{ | ||
Identifier: types.PkgIdentifier{ | ||
PURL: "pkg:dart/[email protected]", | ||
}, | ||
Indirect: true, | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -31,7 +31,7 @@ func Test_depsLibraryAnalyzer_Analyze(t *testing.T) { | |
{ | ||
Name: "Newtonsoft.Json", | ||
Version: "9.0.1", | ||
Identifier: &types.PkgIdentifier{ | ||
Identifier: types.PkgIdentifier{ | ||
PURL: "pkg:nuget/[email protected]", | ||
}, | ||
Locations: []types.Location{ | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -34,14 +34,14 @@ func Test_nugetibraryAnalyzer_Analyze(t *testing.T) { | |
{ | ||
Name: "Microsoft.AspNet.WebApi", | ||
Version: "5.2.2", | ||
Identifier: &types.PkgIdentifier{ | ||
Identifier: types.PkgIdentifier{ | ||
PURL: "pkg:nuget/[email protected]", | ||
}, | ||
}, | ||
{ | ||
Name: "Newtonsoft.Json", | ||
Version: "6.0.4", | ||
Identifier: &types.PkgIdentifier{ | ||
Identifier: types.PkgIdentifier{ | ||
PURL: "pkg:nuget/[email protected]", | ||
}, | ||
}, | ||
|
@@ -66,7 +66,7 @@ func Test_nugetibraryAnalyzer_Analyze(t *testing.T) { | |
ID: "[email protected]", | ||
Name: "Newtonsoft.Json", | ||
Version: "12.0.3", | ||
Identifier: &types.PkgIdentifier{ | ||
Identifier: types.PkgIdentifier{ | ||
PURL: "pkg:nuget/[email protected]", | ||
}, | ||
Locations: []types.Location{ | ||
|
@@ -81,7 +81,7 @@ func Test_nugetibraryAnalyzer_Analyze(t *testing.T) { | |
ID: "[email protected]", | ||
Name: "NuGet.Frameworks", | ||
Version: "5.7.0", | ||
Identifier: &types.PkgIdentifier{ | ||
Identifier: types.PkgIdentifier{ | ||
PURL: "pkg:nuget/[email protected]", | ||
}, | ||
Locations: []types.Location{ | ||
|
@@ -113,7 +113,7 @@ func Test_nugetibraryAnalyzer_Analyze(t *testing.T) { | |
ID: "[email protected]", | ||
Name: "Newtonsoft.Json", | ||
Version: "12.0.3", | ||
Identifier: &types.PkgIdentifier{ | ||
Identifier: types.PkgIdentifier{ | ||
PURL: "pkg:nuget/[email protected]", | ||
}, | ||
Locations: []types.Location{ | ||
|
@@ -128,7 +128,7 @@ func Test_nugetibraryAnalyzer_Analyze(t *testing.T) { | |
ID: "[email protected]", | ||
Name: "NuGet.Frameworks", | ||
Version: "5.7.0", | ||
Identifier: &types.PkgIdentifier{ | ||
Identifier: types.PkgIdentifier{ | ||
PURL: "pkg:nuget/[email protected]", | ||
}, | ||
Locations: []types.Location{ | ||
|
@@ -160,7 +160,7 @@ func Test_nugetibraryAnalyzer_Analyze(t *testing.T) { | |
ID: "[email protected]", | ||
Name: "Newtonsoft.Json", | ||
Version: "12.0.3", | ||
Identifier: &types.PkgIdentifier{ | ||
Identifier: types.PkgIdentifier{ | ||
PURL: "pkg:nuget/[email protected]", | ||
}, | ||
Locations: []types.Location{ | ||
|
@@ -174,7 +174,7 @@ func Test_nugetibraryAnalyzer_Analyze(t *testing.T) { | |
ID: "[email protected]", | ||
Name: "NuGet.Frameworks", | ||
Version: "5.7.0", | ||
Identifier: &types.PkgIdentifier{ | ||
Identifier: types.PkgIdentifier{ | ||
PURL: "pkg:nuget/[email protected]", | ||
}, | ||
Locations: []types.Location{ | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -30,7 +30,7 @@ func Test_mixLockAnalyzer_Analyze(t *testing.T) { | |
ID: "[email protected]", | ||
Name: "bunt", | ||
Version: "0.2.0", | ||
Identifier: &types.PkgIdentifier{ | ||
Identifier: types.PkgIdentifier{ | ||
PURL: "pkg:hex/[email protected]", | ||
}, | ||
Locations: []types.Location{ | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -32,21 +32,21 @@ func Test_gobinaryLibraryAnalyzer_Analyze(t *testing.T) { | |
{ | ||
Name: "github.com/aquasecurity/go-pep440-version", | ||
Version: "v0.0.0-20210121094942-22b2f8951d46", | ||
Identifier: &types.PkgIdentifier{ | ||
Identifier: types.PkgIdentifier{ | ||
PURL: "pkg:golang/github.com/aquasecurity/[email protected]", | ||
}, | ||
}, | ||
{ | ||
Name: "github.com/aquasecurity/go-version", | ||
Version: "v0.0.0-20210121072130-637058cfe492", | ||
Identifier: &types.PkgIdentifier{ | ||
Identifier: types.PkgIdentifier{ | ||
PURL: "pkg:golang/github.com/aquasecurity/[email protected]", | ||
}, | ||
}, | ||
{ | ||
Name: "golang.org/x/xerrors", | ||
Version: "v0.0.0-20200804184101-5ec99f83aff1", | ||
Identifier: &types.PkgIdentifier{ | ||
Identifier: types.PkgIdentifier{ | ||
PURL: "pkg:golang/golang.org/x/[email protected]", | ||
}, | ||
}, | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -36,7 +36,7 @@ func Test_gomodAnalyzer_Analyze(t *testing.T) { | |
ID: "github.com/aquasecurity/[email protected]", | ||
Name: "github.com/aquasecurity/go-dep-parser", | ||
Version: "0.0.0-20220406074731-71021a481237", | ||
Identifier: &types.PkgIdentifier{ | ||
Identifier: types.PkgIdentifier{ | ||
PURL: "pkg:golang/github.com/aquasecurity/[email protected]", | ||
}, | ||
Licenses: []string{ | ||
|
@@ -50,7 +50,7 @@ func Test_gomodAnalyzer_Analyze(t *testing.T) { | |
ID: "golang.org/x/[email protected]", | ||
Name: "golang.org/x/xerrors", | ||
Version: "0.0.0-20200804184101-5ec99f83aff1", | ||
Identifier: &types.PkgIdentifier{ | ||
Identifier: types.PkgIdentifier{ | ||
PURL: "pkg:golang/golang.org/x/[email protected]", | ||
}, | ||
Indirect: true, | ||
|
@@ -75,7 +75,7 @@ func Test_gomodAnalyzer_Analyze(t *testing.T) { | |
ID: "github.com/sad/[email protected]", | ||
Name: "github.com/sad/sad", | ||
Version: "0.0.1", | ||
Identifier: &types.PkgIdentifier{ | ||
Identifier: types.PkgIdentifier{ | ||
PURL: "pkg:golang/github.com/sad/[email protected]", | ||
}, | ||
}, | ||
|
@@ -100,7 +100,7 @@ func Test_gomodAnalyzer_Analyze(t *testing.T) { | |
ID: "github.com/aquasecurity/[email protected]", | ||
Name: "github.com/aquasecurity/go-dep-parser", | ||
Version: "0.0.0-20230219131432-590b1dfb6edd", | ||
Identifier: &types.PkgIdentifier{ | ||
Identifier: types.PkgIdentifier{ | ||
PURL: "pkg:golang/github.com/aquasecurity/[email protected]", | ||
}, | ||
DependsOn: []string{ | ||
|
@@ -111,7 +111,7 @@ func Test_gomodAnalyzer_Analyze(t *testing.T) { | |
ID: "github.com/BurntSushi/[email protected]", | ||
Name: "github.com/BurntSushi/toml", | ||
Version: "0.3.1", | ||
Identifier: &types.PkgIdentifier{ | ||
Identifier: types.PkgIdentifier{ | ||
PURL: "pkg:golang/github.com/burntsushi/[email protected]", | ||
}, | ||
Indirect: true, | ||
|
@@ -139,7 +139,7 @@ func Test_gomodAnalyzer_Analyze(t *testing.T) { | |
ID: "github.com/aquasecurity/[email protected]", | ||
Name: "github.com/aquasecurity/go-dep-parser", | ||
Version: "0.0.0-20230219131432-590b1dfb6edd", | ||
Identifier: &types.PkgIdentifier{ | ||
Identifier: types.PkgIdentifier{ | ||
PURL: "pkg:golang/github.com/aquasecurity/[email protected]", | ||
}, | ||
DependsOn: []string{}, | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -29,7 +29,7 @@ func Test_gradleLockAnalyzer_Analyze(t *testing.T) { | |
{ | ||
Name: "com.example:example", | ||
Version: "0.0.1", | ||
Identifier: &types.PkgIdentifier{ | ||
Identifier: types.PkgIdentifier{ | ||
PURL: "pkg:maven/com.example/[email protected]", | ||
}, | ||
}, | ||
|
Oops, something went wrong.