feat(report): include local DB version info in JSON output#10092
Open
syedazeez337 wants to merge 1 commit intoaquasecurity:mainfrom
Open
feat(report): include local DB version info in JSON output#10092syedazeez337 wants to merge 1 commit intoaquasecurity:mainfrom
syedazeez337 wants to merge 1 commit intoaquasecurity:mainfrom
Conversation
Include local database version information (vulnerability DB, Java DB, check bundle metadata) in JSON output for standalone mode. This helps assessment teams verify scans are performed with current vulnerability databases, addressing compliance requirements for organizations with monthly scan requirements. In client/server mode, local DB metadata is not included since databases reside on the server. Closes aquasecurity#10076
Author
DmitriyLewen
reviewed
Feb 6, 2026
Contributor
There was a problem hiding this comment.
Do we need this?
Can we use VersionInfo?
Comment on lines
+16
to
+18
| VulnerabilityDB *DBMetadata `json:",omitempty"` | ||
| JavaDB *DBMetadata `json:",omitempty"` | ||
| CheckBundle *BundleMetadata `json:",omitempty"` |
Contributor
There was a problem hiding this comment.
What about this way?
Suggested change
| VulnerabilityDB *DBMetadata `json:",omitempty"` | |
| JavaDB *DBMetadata `json:",omitempty"` | |
| CheckBundle *BundleMetadata `json:",omitempty"` | |
| version.VersionInfo |
| func buildTrivyInfo(options types.ScanOptions) types.TrivyInfo { | ||
| if options.IsRemote { | ||
| return types.TrivyInfo{ | ||
| Version: version.AppVersion(), |
Contributor
There was a problem hiding this comment.
We should show java-db and bundle metadata for client
Perhaps we can add Client() option (like version.Server()).
| r := types.Report{ | ||
| SchemaVersion: report.SchemaVersion, | ||
| Trivy: types.TrivyInfo{Version: app.Version()}, | ||
| Trivy: buildTrivyInfo(options), |
Contributor
There was a problem hiding this comment.
after rebase - don't forget add serverInfo
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Include local database version information (vulnerability DB, Java DB, check bundle metadata) in JSON output for standalone mode.
This helps assessment teams verify scans are performed with current vulnerability databases, addressing compliance requirements for organizations with monthly scan requirements.
In client/server mode, local DB metadata is not included since databases reside on the server.
Closes #10076