Skip to content

Commit

Permalink
Implement the CSAF VEX output view #107 (#213)
Browse files Browse the repository at this point in the history
Signed-off-by: tdruez <[email protected]>
  • Loading branch information
tdruez authored Dec 19, 2024
1 parent 79699bc commit 0315ecf
Show file tree
Hide file tree
Showing 30 changed files with 3,362 additions and 25 deletions.
9 changes: 9 additions & 0 deletions CHANGELOG.rst
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,15 @@ Release notes
This threshold helps prioritize and control the level of attention to vulnerabilities.
https://github.com/aboutcode-org/dejacode/issues/97

- Add the `vulnerabilities_risk_threshold` field to the Product and
DataspaceConfiguration models.
This threshold helps prioritize and control the level of attention to vulnerabilities.
https://github.com/aboutcode-org/dejacode/issues/97

- Add the ability to download a CSAF VEX document from the Product details view "Share"
menu.
https://github.com/aboutcode-org/dejacode/issues/107

### Version 5.2.1

- Fix the models documentation navigation.
Expand Down
7 changes: 7 additions & 0 deletions dejacode_toolkit/csaf/HEADER
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
#
# Copyright (c) nexB Inc. and others. All rights reserved.
# DejaCode is a trademark of nexB Inc.
# SPDX-License-Identifier: AGPL-3.0-only
# See https://github.com/aboutcode-org/dejacode for support or download.
# See https://aboutcode.org for more information about AboutCode FOSS projects.
#
24 changes: 24 additions & 0 deletions dejacode_toolkit/csaf/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
CSAF Models
===========

Install the code generator
--------------------------

$ pip install 'datamodel-code-generator[http]'

Generate the models
-------------------

$ TARGET_PYTHON_VERSION=3.12
$ datamodel-codegen \
--input dejacode_toolkit/csaf/schema_v2.0/csaf_json_schema.json \
--output dejacode_toolkit/csaf/ \
--output-model-type pydantic_v2.BaseModel \
--input-file-type jsonschema \
--target-python-version $TARGET_PYTHON_VERSION \
--custom-file-header-path dejacode_toolkit/csaf/HEADER \
--use-schema-description \
--use-default-kwarg

$ rm dejacode_toolkit/csaf/cvss_v2.py dejacode_toolkit/csaf/cvss_v3.py
$ make valid
Loading

0 comments on commit 0315ecf

Please sign in to comment.