Skip to content

Commit

Permalink
revert ID changes
Browse files Browse the repository at this point in the history
  • Loading branch information
DmitriyLewen committed Aug 25, 2023
1 parent 1394573 commit 20eab75
Show file tree
Hide file tree
Showing 5 changed files with 18 additions and 19 deletions.
2 changes: 0 additions & 2 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -405,5 +405,3 @@ require (
replace oras.land/oras-go => oras.land/oras-go v1.2.4-0.20230801060855-932dd06d38af

replace github.com/aquasecurity/trivy-db => github.com/DmitriyLewen/trivy-db v0.0.0-20230824102611-4e398f81cb3b

replace github.com/aquasecurity/go-dep-parser => github.com/DmitriyLewen/go-dep-parser v0.0.0-20230824105602-3f7622fbbc25
4 changes: 2 additions & 2 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -240,8 +240,6 @@ github.com/BurntSushi/xgb v0.0.0-20160522181843-27f122750802/go.mod h1:IVnqGOEym
github.com/CycloneDX/cyclonedx-go v0.7.2-0.20230625092137-07e2f29defc3 h1:NqeV+ZMqpcosu0Xg2VW14Ru9ayBs/toe2oihS7sN6Xo=
github.com/CycloneDX/cyclonedx-go v0.7.2-0.20230625092137-07e2f29defc3/go.mod h1:fGXSp1lCDfMQ8KR1EjxT4ewc5HHhGczRF2pWhLSWohs=
github.com/DATA-DOG/go-sqlmock v1.5.0 h1:Shsta01QNfFxHCfpW6YH2STWB0MudeXXEWMr20OEh60=
github.com/DmitriyLewen/go-dep-parser v0.0.0-20230824105602-3f7622fbbc25 h1:6sLAQT10WhpBb+JYpKXnHhYtBh5rM1U3ulhRfS57Lk0=
github.com/DmitriyLewen/go-dep-parser v0.0.0-20230824105602-3f7622fbbc25/go.mod h1:0+GvQF0gL4YEAAUPpNeLeGpFDxMvvIHLMd7vk9bpwko=
github.com/DmitriyLewen/trivy-db v0.0.0-20230824102611-4e398f81cb3b h1:n44r0G1H353jpO+i5kFTxmWHl2ZsDtETwRSI4Bt62VQ=
github.com/DmitriyLewen/trivy-db v0.0.0-20230824102611-4e398f81cb3b/go.mod h1:iJSGMMclPEhkYeyiN9i+gzjV9jhEv+XfPzfVgFhfvTE=
github.com/GoogleCloudPlatform/docker-credential-gcr v2.0.5+incompatible h1:juIaKLLVhqzP55d8x4cSVgwyQv76Z55/fRv/UBr2KkQ=
Expand Down Expand Up @@ -329,6 +327,8 @@ github.com/aquasecurity/bolt-fixtures v0.0.0-20200903104109-d34e7f983986 h1:2a30
github.com/aquasecurity/bolt-fixtures v0.0.0-20200903104109-d34e7f983986/go.mod h1:NT+jyeCzXk6vXR5MTkdn4z64TgGfE5HMLC8qfj5unl8=
github.com/aquasecurity/defsec v0.91.1 h1:dBIPm6Tva9I+ZTQv+6t9wob3ZlMSu8NFqMJr4mgJC5A=
github.com/aquasecurity/defsec v0.91.1/go.mod h1:l/srzxtuuyb6c6FlqUvMp3xw2ZbvuZ0l9972MNJM7V8=
github.com/aquasecurity/go-dep-parser v0.0.0-20230823094455-40c1f85cc942 h1:VGfeUtZyya9Vsl8enDurZ7pb/NDp2aJlL2rx2g4pR6A=
github.com/aquasecurity/go-dep-parser v0.0.0-20230823094455-40c1f85cc942/go.mod h1:0+GvQF0gL4YEAAUPpNeLeGpFDxMvvIHLMd7vk9bpwko=
github.com/aquasecurity/go-gem-version v0.0.0-20201115065557-8eed6fe000ce h1:QgBRgJvtEOBtUXilDb1MLi1p1MWoyFDXAu5DEUl5nwM=
github.com/aquasecurity/go-gem-version v0.0.0-20201115065557-8eed6fe000ce/go.mod h1:HXgVzOPvXhVGLJs4ZKO817idqr/xhwsTcj17CLYY74s=
github.com/aquasecurity/go-mock-aws v0.0.0-20230328195059-5bf52338aec3 h1:Vt9y1gZS5JGY3tsL9zc++Cg4ofX51CG7PaMyC5SXWPg=
Expand Down
4 changes: 2 additions & 2 deletions integration/testdata/cocoapods.json.golden
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
"Type": "cocoapods",
"Packages": [
{
"ID": "_NIODataStructures@2.41.0",
"ID": "_NIODataStructures/2.41.0",
"Name": "_NIODataStructures",
"Version": "2.41.0",
"Layer": {}
Expand All @@ -30,7 +30,7 @@
"Vulnerabilities": [
{
"VulnerabilityID": "CVE-2022-3215",
"PkgID": "_NIODataStructures@2.41.0",
"PkgID": "_NIODataStructures/2.41.0",
"PkgName": "_NIODataStructures",
"InstalledVersion": "2.41.0",
"FixedVersion": "2.29.1, 2.39.1, 2.42.0",
Expand Down
18 changes: 9 additions & 9 deletions pkg/fanal/analyzer/language/swift/cocoapods/cocoapods_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -27,37 +27,37 @@ func Test_cocoaPodsLockAnalyzer_Analyze(t *testing.T) {
FilePath: "testdata/happy.lock",
Libraries: types.Packages{
{
ID: "AppCenter@4.2.0",
ID: "AppCenter/4.2.0",
Name: "AppCenter",
Version: "4.2.0",
DependsOn: []string{
"AppCenter/Analytics@4.2.0",
"AppCenter/Crashes@4.2.0",
"AppCenter/Analytics/4.2.0",
"AppCenter/Crashes/4.2.0",
},
},
{
ID: "AppCenter/Analytics@4.2.0",
ID: "AppCenter/Analytics/4.2.0",
Name: "AppCenter/Analytics",
Version: "4.2.0",
DependsOn: []string{
"AppCenter/Core@4.2.0",
"AppCenter/Core/4.2.0",
},
},
{
ID: "AppCenter/Core@4.2.0",
ID: "AppCenter/Core/4.2.0",
Name: "AppCenter/Core",
Version: "4.2.0",
},
{
ID: "AppCenter/Crashes@4.2.0",
ID: "AppCenter/Crashes/4.2.0",
Name: "AppCenter/Crashes",
Version: "4.2.0",
DependsOn: []string{
"AppCenter/Core@4.2.0",
"AppCenter/Core/4.2.0",
},
},
{
ID: "KeychainAccess@4.2.1",
ID: "KeychainAccess/4.2.1",
Name: "KeychainAccess",
Version: "4.2.1",
},
Expand Down
9 changes: 5 additions & 4 deletions pkg/purl/purl_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -223,17 +223,18 @@ func TestNewPackageURL(t *testing.T) {
},
want: purl.PackageURL{
PackageURL: packageurl.PackageURL{
Type: packageurl.TypeSwift,
Name: "github.com/apple/swift-atomics",
Version: "1.1.0",
Type: packageurl.TypeSwift,
Namespace: "github.com/apple",
Name: "swift-atomics",
Version: "1.1.0",
},
},
},
{
name: "cocoapods package",
typ: ftypes.Cocoapods,
pkg: ftypes.Package{
ID: "_NIODataStructures@2.41.0",
ID: "_NIODataStructures/2.41.0",
Name: "_NIODataStructures",
Version: "2.41.0",
},
Expand Down

0 comments on commit 20eab75

Please sign in to comment.