-
Notifications
You must be signed in to change notification settings - Fork 2.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
refactor: use UUID for Packages IDs from pom.xml
files.
#7879
Open
DmitriyLewen
wants to merge
10
commits into
aquasecurity:main
Choose a base branch
from
DmitriyLewen:refactor/maven-uuid
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
10 commits
Select commit
Hold shift + click to select a range
4a4a4c7
feat(parser): add UUID for pom Packages
DmitriyLewen c5ae33b
test: update tests
DmitriyLewen 68aa1f0
fix: use pkgID to filter vulns
DmitriyLewen 29fc583
fix: use `pkgName:pkgVersion` for dep tree of pom packages
DmitriyLewen c72a080
test(bom): add test with same GAV from different modules
DmitriyLewen 6cfa9ea
Merge branch 'master' into 'refactor/maven-uuid'
DmitriyLewen c662e10
test: update tests after rebase
DmitriyLewen 54abd3e
fix: use uuid for modules in `Dependencies`
DmitriyLewen ccd6118
fix: linter errors
DmitriyLewen fe38704
fix: integration test
DmitriyLewen File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
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 |
---|---|---|
|
@@ -2,7 +2,7 @@ | |
"$schema": "http://cyclonedx.org/schema/bom-1.6.schema.json", | ||
"bomFormat": "CycloneDX", | ||
"specVersion": "1.6", | ||
"serialNumber": "urn:uuid:3ff14136-e09f-4df9-80ea-000000000005", | ||
"serialNumber": "urn:uuid:3ff14136-e09f-4df9-80ea-000000000007", | ||
"version": 1, | ||
"metadata": { | ||
"timestamp": "2021-08-25T12:20:30+00:00", | ||
|
@@ -17,7 +17,7 @@ | |
] | ||
}, | ||
"component": { | ||
"bom-ref": "3ff14136-e09f-4df9-80ea-000000000001", | ||
"bom-ref": "3ff14136-e09f-4df9-80ea-000000000003", | ||
"type": "application", | ||
"name": "testdata/fixtures/repo/pom", | ||
"properties": [ | ||
|
@@ -30,7 +30,7 @@ | |
}, | ||
"components": [ | ||
{ | ||
"bom-ref": "3ff14136-e09f-4df9-80ea-000000000002", | ||
"bom-ref": "3ff14136-e09f-4df9-80ea-000000000004", | ||
"type": "application", | ||
"name": "pom.xml", | ||
"properties": [ | ||
|
@@ -54,7 +54,7 @@ | |
"properties": [ | ||
{ | ||
"name": "aquasecurity:trivy:PkgID", | ||
"value": "com.example:log4shell:1.0-SNAPSHOT" | ||
"value": "3ff14136-e09f-4df9-80ea-000000000001" | ||
}, | ||
{ | ||
"name": "aquasecurity:trivy:PkgType", | ||
|
@@ -72,7 +72,7 @@ | |
"properties": [ | ||
{ | ||
"name": "aquasecurity:trivy:PkgID", | ||
"value": "com.fasterxml.jackson.core:jackson-databind:2.9.1" | ||
"value": "3ff14136-e09f-4df9-80ea-000000000002" | ||
}, | ||
{ | ||
"name": "aquasecurity:trivy:PkgType", | ||
|
@@ -83,13 +83,13 @@ | |
], | ||
"dependencies": [ | ||
{ | ||
"ref": "3ff14136-e09f-4df9-80ea-000000000001", | ||
"ref": "3ff14136-e09f-4df9-80ea-000000000003", | ||
"dependsOn": [ | ||
"3ff14136-e09f-4df9-80ea-000000000002" | ||
"3ff14136-e09f-4df9-80ea-000000000004" | ||
] | ||
}, | ||
{ | ||
"ref": "3ff14136-e09f-4df9-80ea-000000000002", | ||
"ref": "3ff14136-e09f-4df9-80ea-000000000004", | ||
"dependsOn": [ | ||
"pkg:maven/com.example/[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 |
---|---|---|
|
@@ -23,11 +23,11 @@ | |
"Vulnerabilities": [ | ||
{ | ||
"VulnerabilityID": "CVE-2020-9548", | ||
"PkgID": "com.fasterxml.jackson.core:jackson-databind:2.9.1", | ||
"PkgID": "3ff14136-e09f-4df9-80ea-000000000002", | ||
"PkgName": "com.fasterxml.jackson.core:jackson-databind", | ||
"PkgIdentifier": { | ||
"PURL": "pkg:maven/com.fasterxml.jackson.core/[email protected]", | ||
"UID": "9c69fdeffb7ee6d4" | ||
"UID": "fd7dbd1e62564ea0" | ||
}, | ||
"InstalledVersion": "2.9.1", | ||
"FixedVersion": "2.9.10.4", | ||
|
@@ -89,11 +89,11 @@ | |
}, | ||
{ | ||
"VulnerabilityID": "CVE-2021-20190", | ||
"PkgID": "com.fasterxml.jackson.core:jackson-databind:2.9.1", | ||
"PkgID": "3ff14136-e09f-4df9-80ea-000000000002", | ||
"PkgName": "com.fasterxml.jackson.core:jackson-databind", | ||
"PkgIdentifier": { | ||
"PURL": "pkg:maven/com.fasterxml.jackson.core/[email protected]", | ||
"UID": "9c69fdeffb7ee6d4" | ||
"UID": "fd7dbd1e62564ea0" | ||
}, | ||
"InstalledVersion": "2.9.1", | ||
"FixedVersion": "2.9.10.7", | ||
|
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
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
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I want the output reports to be as reproducible as possible. I'm considering another approach, but I have not yet come up with...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do you mean using something like a hash instead of UUID?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That's one of the options. Regardless of the method, I want the same value to be output as much as possible when scanning the same object.