Skip to content

Commit

Permalink
Update CVE JSON schema to 5.1.0
Browse files Browse the repository at this point in the history
This makes cvelib compatible with CVE Services 2.3.0 and CVE JSON schema
5.1.0.

Resolves #79
  • Loading branch information
mprpic committed May 15, 2024
1 parent ff1ef82 commit e4d4b4c
Show file tree
Hide file tree
Showing 12 changed files with 1,969 additions and 158 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

A library and a command line interface for the CVE Services API.

**Note**: version 1.3.0 of cvelib is compatible with CVE Services 2.2.0.
**Note**: version 1.4.0 of cvelib is compatible with CVE Services 2.2.1 and CVE JSON schema 5.1.0.

## Requirements

Expand Down
8 changes: 4 additions & 4 deletions cvelib/cve_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,10 +32,10 @@ def __reduce__(self):

class CveRecord:
class Schemas(Constants):
CNA_PUBLISHED = next(SCHEMA_DIR.glob("published_cna_container_*.json"))
CNA_REJECTED = next(SCHEMA_DIR.glob("rejected_cna_container_*.json"))
ADP = next(SCHEMA_DIR.glob("adp_container_*.json"))
V5_SCHEMA = next(SCHEMA_DIR.glob("CVE_JSON_5.0_bundled_*.json"))
CNA_PUBLISHED = next(SCHEMA_DIR.glob("CVE_JSON_cnaPublishedContainer_*.json"))
CNA_REJECTED = next(SCHEMA_DIR.glob("CVE_JSON_cnaRejectedContainer_*.json"))
ADP = next(SCHEMA_DIR.glob("CVE_JSON_adpContainer_*.json"))
V5_SCHEMA = next(SCHEMA_DIR.glob("CVE_JSON_bundled_*.json"))

@classmethod
def validate(cls, cve_json: dict, schema_path: Optional[str] = None) -> None:
Expand Down
Loading

0 comments on commit e4d4b4c

Please sign in to comment.