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

feat: add timestamp to json output (#1170) #1249

Merged
merged 3 commits into from
Apr 21, 2023
Merged

Conversation

jneate
Copy link
Contributor

@jneate jneate commented Apr 21, 2023

Adds timestamp into the JSON Output, timestamp is a new field inside Descriptor.

Unit tests were a little fiddly because the timestamp changes so first check the value is not nil and is in RFC 3339 format, then essentially use the normal assert.JSONEq to check the rest of the document(s).

Signed-off-by: James Neate <jamesmneate@gmail.com>
Signed-off-by: James Neate <jamesmneate@gmail.com>
grype/presenter/json/presenter_test.go Outdated Show resolved Hide resolved
grype/presenter/json/presenter_test.go Outdated Show resolved Hide resolved
Signed-off-by: James Neate <jamesmneate@gmail.com>
Copy link
Contributor

@kzantow kzantow left a comment

Choose a reason for hiding this comment

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

LGTM 👍

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.

Grype|Include Timestamp and Image Name to Reports
2 participants