Add explicit version information to emitted records#763
Open
Add explicit version information to emitted records#763
Conversation
Signed-off-by: Alex Goodman <wagoodman@users.noreply.github.com>
Signed-off-by: Alex Goodman <wagoodman@users.noreply.github.com>
Signed-off-by: Alex Goodman <wagoodman@users.noreply.github.com>
Signed-off-by: Alex Goodman <wagoodman@users.noreply.github.com>
Signed-off-by: Alex Goodman <wagoodman@users.noreply.github.com>
Signed-off-by: Alex Goodman <wagoodman@users.noreply.github.com>
Signed-off-by: Alex Goodman <wagoodman@users.noreply.github.com>
Signed-off-by: Alex Goodman <wagoodman@users.noreply.github.com>
Signed-off-by: Alex Goodman <wagoodman@users.noreply.github.com>
Signed-off-by: Alex Goodman <wagoodman@users.noreply.github.com>
Signed-off-by: Alex Goodman <wagoodman@users.noreply.github.com>
Signed-off-by: Alex Goodman <wagoodman@users.noreply.github.com>
wagoodman
commented
Jan 13, 2025
Contributor
Author
There was a problem hiding this comment.
diff schema/vulnerability/os/schema-1.0.2.json schema/vulnerability/os/schema-1.0.3.json
72a73,89
> "OS": {
> "type": "object",
> "properties": {
> "ID": {
> "type": "string"
> },
> "Version": {
> "type": "string"
> }
> }
> },
> "Architectures": {
> "type": "array",
> "items": {
> "type": "string"
> }
> },
Signed-off-by: Alex Goodman <wagoodman@users.noreply.github.com>
5dcaa54 to
840d63c
Compare
Signed-off-by: Alex Goodman <wagoodman@users.noreply.github.com>
Contributor
|
Hmm, what about prior minor versions of the same release line though? For instance, if there is a fix available in the rhel 8.7 appstream but the prior 8.x appstreams should still be considered vulnerable because there won't be a fix released to them? If the release info is just captured in the RPM version information like today then the < comparison will work, but if it is instead part of the namespace then I'm not sure it will unless we have special logic that also adds a namespace for just the major version to fall back on (though that may be the responsibility of grype-db rather than vunnel) |
Signed-off-by: Alex Goodman <wagoodman@users.noreply.github.com>
Signed-off-by: Alex Goodman <wagoodman@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Today we have the namespace field which conveys "ID:VERSION" for distro information. This field is a hold over from how anchore enterprise used to function. The downside is that the current version resolution for some operating systems does not consider the minor or patch version, which is conveyed in some OS fix information (such as redhat and oracle linux). This PR nudges the existing OS schema forward by adding a specific OS field with OS ID (aligning with /etc/os-release ID) and Version properties (which should be as specific as possible relative to the fix information). All providers have been updated to use this new field (ideally we'll remove the Namespace fields as a breaking change in the future).
I've additionally added architecture qualifiers to the fix information as well, but have not updated any provider to use this new field.