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

Add date information to OS schema #760

Merged
merged 2 commits into from
Jan 10, 2025
Merged

Add date information to OS schema #760

merged 2 commits into from
Jan 10, 2025

Conversation

wagoodman
Copy link
Contributor

Related to #742, adds the following fields to the os schema:

  • Metadata.Updated: date the vuln record was updated
  • Metadata.Withdrawn: date the vuln record was withdrawn
  • FixedIn.Issued: date the fix was made available

Signed-off-by: Alex Goodman <[email protected]>
@wagoodman
Copy link
Contributor Author

This is the actual change

# $ diff schema/vulnerability/os/schema-1.0.1.json schema/vulnerability/os/schema-1.0.2.json
98a99,102
>                 },
>                 "Issued": {
>                   "type": "string",
>                   "description": "date the fix was made available"
117c121,122
<               "type": "string"
---
>               "type": "string",
>               "description": "date the vulnerability was published"
118a124,131
>             "Updated": {
>               "type": "string",
>               "description": "date the vulnerability was last updated"
>             },
>             "Withdrawn": {
>               "type": "string",
>               "description": "date the vulnerability was withdrawn"
>             },

@wagoodman wagoodman requested a review from a team January 10, 2025 17:34
@wagoodman wagoodman self-assigned this Jan 10, 2025
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.

There are a lot of changes here! You definitely know better than me what's going on, so I'll just leave a couple observations:

  • should this have a schema.json, like we do in syft which is always the current and would have ended up showing a diff here? (and could be referred to by commit; unsure if that makes anything really easier)
  • it would be ideal if bumping the schema version wouldn't require updating all the test fixtures like this -- maybe some process somewhere updates the values while reading them in test fixtures or migrates the files somehow if it was an easy process

@wagoodman
Copy link
Contributor Author

Yeah, I agree with both observations -- that's going to require more refactoring of test utils and cases + adding some automation around how the schema is bumped (which does not exist). This PR isn't the right time to introduce those things (but am all for it).

@wagoodman wagoodman merged commit 85f3ba6 into main Jan 10, 2025
10 checks passed
@wagoodman wagoodman deleted the add-os-date-schema branch January 10, 2025 18:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

2 participants