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

Ability to apply template off of previously generated json #2101

Open
nvp152 opened this issue Sep 7, 2024 · 1 comment
Open

Ability to apply template off of previously generated json #2101

nvp152 opened this issue Sep 7, 2024 · 1 comment
Labels
enhancement New feature or request

Comments

@nvp152
Copy link

nvp152 commented Sep 7, 2024

This is an aggregation use case. I have multiple jobs building containers and scanning them. I can easily produce a json for each with grype but come release time, i'd like to aggregate all the jsons from all the container scans and produce a single meta html report.

Aggregating the jsons is routine and I can obviously create something custom to apply the template against the json data. However, can you think of way to reuse what is existing to get this done? Would be nice if there was a grype command that did it, since I presume much of the logic is already in place.

May be a
grype template ./grype.json -o template:out.html -template myHtmlTemplate.tmpl

@nvp152 nvp152 added the enhancement New feature or request label Sep 7, 2024
@spiffcs
Copy link
Contributor

spiffcs commented Sep 9, 2024

👋 Thanks for the issue @nvp152! As far as aggregation is concerned I think that's where we draw the invisible line of "out of grypes scope". We do have a great command as you pointed out surrounding the template outputs with examples here: https://github.com/anchore/grype/tree/main/templates

I would very much encourage and promote a separate tool that was written to take n number of templates generated by grype and build this view your describing.

If you were only asking about a single scan use case then definitely check out the template folder we already have to see if that fits your use case =)

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: No status
Development

No branches or pull requests

2 participants