ossf / ossf/osv-schema

Add a "first_not_affected" field or similar to properly describe all possible ranges for affected packages

Open
#75 4 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Go
Stars
271
Forks
129
Avg merge
3h 46m
Merged PRs (30d)
4

Description

Description

Hi!

I was trying to express some NVD vulnerabilities with OSV.
They use these keywords for the ranges

  • versionStartIncluding
  • versionStartExcluding
  • versionEndIncluding
  • versionEndExcluding

So we can have these type of intervals

  • [X,..., Y] : from X to Y, both ends included
  • [X,..., Y) : from X to Y, X included, Y excluded
  • (X,..., Y] : from X to Y, X excluded, Y included
  • (X,..., Y) : from X to Y, both ends excluded

But here in OSV, we have:

  • introduced: this is equivalent to versionStartIncluding
  • fixed: this is equivalent to versionEndExcluding
  • last_affected: this is equivalent to versionEndIncluding
  • limit: in this context, it is similar to fixed

It isn't posible to express (X,..., Y] / (X,..., Y) ranges, we are missing an equivalen to versionStartExcluding.

Example

The https://nvd.nist.gov/vuln/detail/CVE-2022-34465 vulnerability has this type of ranges

example

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the OSV range semantics described in the issue and review the existing introduced, fixed, last_affected, and limit fields. Define how a lower-bound-exclusive range should be represented and verify that all four interval combinations can be expressed without ambiguity; done means the schema change and its compatibility implications are resolved.

Written by the indexing model from the issue text.

Assessment

Domain
backend-api-design
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.