Skip to content
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

Grype Output Schema #2212

Open
Amndeep7 opened this issue Oct 24, 2024 · 1 comment
Open

Grype Output Schema #2212

Amndeep7 opened this issue Oct 24, 2024 · 1 comment
Labels
enhancement New feature or request
Milestone

Comments

@Amndeep7
Copy link

What would you like to be added:

A formal schema for the Grype output format.

Why is this needed:

The MITRE Security Automation Framework (https://saf.mitre.org) has made an integration between the Grype output format and our tools and libraries. The primary integration is a converter that can take the Grype output format and normalize it into our Oasis Heimdall Data Format (OHDF).

https://github.com/mitre/heimdall2/blob/master/libs/hdf-converters/src/anchore-grype-mapper.ts
https://github.com/mitre/saf?tab=readme-ov-file#anchore-grype-to-hdf

We have created this integration via empirical testing and reading through the Grype source code; however, we'd like to improve the mapping and make sure that it is comprehensive in scope. In order to do this, we need a schema for the output format.

Additional context:

A sample Grype results file: https://github.com/mitre/heimdall2/blob/master/libs/hdf-converters/sample_jsons/anchore_grype_mapper/sample_input_report/anchore_grype.json

Those same results normalized into OHDF: https://github.com/mitre/heimdall2/blob/master/libs/hdf-converters/sample_jsons/anchore_grype_mapper/anchore-grype-hdf.json

Some screenshots of those results loaded into Heimdall, our security results visualization application:

image

image

@Amndeep7 Amndeep7 added the enhancement New feature or request label Oct 24, 2024
@wagoodman wagoodman added this to the Grype 1.0 milestone Oct 31, 2024
@wagoodman wagoodman moved this to Ready in OSS Oct 31, 2024
@wagoodman
Copy link
Contributor

agreed -- we should capture a JSON schema in the same way we do in syft. Specifically we should start adding automation on generating the schema from go structs, detect when the schema is changing on each PR, and closely control the package metadata struct names.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
Status: Ready
Development

No branches or pull requests

3 participants