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

Clarify sentence about "last_affected" and "fixed" in docs. #310

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions docs/schema.md
Original file line number Diff line number Diff line change
Expand Up @@ -830,8 +830,8 @@ Only **a single type** (either `introduced`, `fixed`, `last_affected`,
`limit`) is allowed in each event object. For instance,
`{"introduced": "1.0.0", "fixed": "1.0.2"}` is **invalid**.

Entries in the `events` array can contain either `last_affected` or `fixed`
events, but not both. It's **strongly recommended** to use `fixed` instead of
An events array can have entries containing either "last_affected" or "fixed" events,
Copy link
Collaborator

Choose a reason for hiding this comment

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

Yes, there's some semantic nuance here, which is a little tricky to convey, I think.

So to get all JSON-technical, the events array is an array of JSON (event) objects, and the intention of the statement under scrutiny is to refer to these event objects, as you've surmised.

https://github.com/ossf/osv-schema/blob/main/validation/schema.json#L92-L150

Suggested change
An events array can have entries containing either "last_affected" or "fixed" events,
Entries in the `events` array may be "last_affected" or "fixed" events,

Copy link
Author

Choose a reason for hiding this comment

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

@andrewpollock I think that it's possible that someone may still misread that suggestion as disallowing this case:

[..., {"last_affected": "1.0.0", "fixed": "1.0.1"}, ...]

but not both. It's **strongly recommended** to use `fixed` instead of
`last_affected` where possible, as it precisely identifies the version which
contains the fix. `last_affected` should be thought of as the hard ceiling
of the vulnerability _at the time of publication_ in the absence of a fixed version.
Expand Down