Skip to content

fix: only generate one VEX/SBOM/intermediate file per run#5731

Open
QSchulz wants to merge 1 commit intoossf:mainfrom
QSchulz:dev/1-vex-N-reports
Open

fix: only generate one VEX/SBOM/intermediate file per run#5731
QSchulz wants to merge 1 commit intoossf:mainfrom
QSchulz:dev/1-vex-N-reports

Conversation

@QSchulz
Copy link
Copy Markdown
Contributor

@QSchulz QSchulz commented Apr 30, 2026

With
cve-bin-tool with --format csv,html --vex-output result.vex.json --revision-reason 'test'

We currently get two files:

  • 1_result.vex.json
  • result.vex.json

with result.vex.json having two metadata.properties entries:

  "metadata": {
    "timestamp": "2026-04-10T12:02:53Z",
    "tools": {
      "components": [
        {
          "name": "lib4vex",
          "version": "0.2.3",
          "type": "application"
        }
      ]
    },
    "properties": [
      {
        "name": "Revision_1",
        "value": "Test"
      },
      {
        "name": "Revision_2",
        "value": "Test"
      }
    ],

result1.vex.json only has one.

This makes sure that regardless of the amount of different reports to generate in one run, only one VEX file is generated, and only adding one revision. This is done by decoupling output report generation from VEX, intermediate and SBOM generation (which aren't related to the kind of output report to generate).

Fixes: #5686.

Cc @mmind

With
cve-bin-tool with --format csv,html --vex-output result.vex.json --revision-reason 'test'

We currently get two files:
- 1_result.vex.json
- result.vex.json

with result.vex.json having two metadata.properties entries:

  "metadata": {
    "timestamp": "2026-04-10T12:02:53Z",
    "tools": {
      "components": [
        {
          "name": "lib4vex",
          "version": "0.2.3",
          "type": "application"
        }
      ]
    },
    "properties": [
      {
        "name": "Revision_1",
        "value": "Test"
      },
      {
        "name": "Revision_2",
        "value": "Test"
      }
    ],

result1.vex.json only has one.

This makes sure that regardless of the amount of different reports to
generate in one run, only one VEX file is generated, and only adding one
revision. This is done by decoupling output report generation from VEX,
intermediate and SBOM generation (which aren't related to the kind of
output report to generate).

Fixes: ossf#5686.
Signed-off-by: Quentin Schulz <quentin.schulz@cherry.de>
@ffontaine
Copy link
Copy Markdown
Collaborator

@anthonyharrison, do you agree with the proposed change?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

fix: N output formats generate N VEX files and N revisions in main VEX file

2 participants