Skip to content

feat(report): include local DB version info in JSON output#10092

Open
syedazeez337 wants to merge 1 commit intoaquasecurity:mainfrom
syedazeez337:feat/include-db-version-in-json-output
Open

feat(report): include local DB version info in JSON output#10092
syedazeez337 wants to merge 1 commit intoaquasecurity:mainfrom
syedazeez337:feat/include-db-version-in-json-output

Conversation

@syedazeez337
Copy link

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

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
@syedazeez337
Copy link
Author

Hi @knqyf263 I believe you have been working on the issue #10074
I would like your co-ordination here as issues are closely linked. LMK

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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"`
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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(),
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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),
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

after rebase - don't forget add serverInfo

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Include local DB version information in JSON output

2 participants