Skip to content

Give the possibility to atomically upload a SBOM with related VEX #1872

Open

Description

@syalioune

Current Behavior:

Dependency Track manage BOM and VEX as distinct entities with their own API as recommended here.
From an automation perspective, one has to :

  • Upload a BOM with /v1/bom API and get a token
  • Wait for BOM to be completely processed and fetch project/component identifiers
  • Eventually alter VEX with the proper bom-refs and upload it with /v1/vex and get a token
  • Check that VEX is completely processed

Proposed Behavior:

Provide the ability to manage BOM and VEX atomically to ease integration tasks. Two alternatives (not mutually exclusive)

  1. Distinct resources : Enhance POST|PUT /v1/bom API with an optional vex field and chain BomUploadEvent and VexUploadEvent events during the BOM processing
  2. Mutualized resource : During BOM upload processing, check if the BOM has vulnerabilities and if the test is positive, handle the VEX upload as part of the processing

Activity

  1. added
    enhancement
    on Aug 8, 2022
  2. zestful-thud commented on Sep 18, 2022

    @zestful-thud

    @syalioune do you have an example of the altered VEX? I'm adding a bom-ref to the vulnerability and updating the affects ref to match the project however the vuln is not displaying for me after uploading

  3. syalioune commented on Sep 19, 2022

    @syalioune
    ContributorAuthor

    Hello @natefive

    Given a project with uuid PROJECT_UUID, a VEX like below works for me

    {
      "bomFormat": "CycloneDX",
      "specVersion": "1.4",
      "version": 1,
      "metadata": {
        "timestamp": "2022-09-19T09:20:57Z",
        "component": {
          "name": "test-project",
          "version": "test",
          "type": "application",
          "bom-ref": "PROJECT_UUID"
        }
      },
      "vulnerabilities": [
        {
          "id": "CVE-2022-28948",
          "analysis": {
            "state": "false_positive",
            "detail": "Kafka connect is not used."
          },
          "affects": [
            {
              "ref": "PROJECT_UUID"
            }
          ]
        }
      ]
    }

    Can you please share the VEX you are trying to upload ?

  4. zestful-thud commented on Sep 20, 2022

    @zestful-thud

    @syalioune your above example does not work for me either, are you sure the affects.ref is supposed to be the project UUID, I thought that it should be the UUID of the vulnerable package/ component?

    I'd been trying this, as this was similar to what I had seen in an exported VEX

    {
      "bomFormat" : "CycloneDX",
      "specVersion" : "1.4",
      "version" : 1,
      "metadata" : {
        "timestamp" : "2022-09-20T14:25:03Z",
        "component" : {
          "name" : "test3",
          "version" : "test",
          "type" : "application",
          "bom-ref" : "PROJECT_UUID"
        }
      },
      "vulnerabilities" : [
        {
          "bom-ref" : "PROJECT_UUID",
          "id" : "CVE-2009-2360",
          "source" : {
            "name" : "NVD",
            "url" : "https://nvd.nist.gov/"
          },
          "ratings" : [
            {
              "source" : {
                "name" : "NVD",
                "url" : "https://nvd.nist.gov/"
              },
              "score" : 4.3,
              "severity" : "medium",
              "method" : "CVSSv2",
              "vector" : "(AV:N/AC:M/Au:N/C:N/I:P/A:N)"
            }
          ],
          "cwes" : [
            79
          ],
          "description" : "Cross-site scripting (XSS) vulnerability in passwd/main.php in the Passwd module before 3.1.1 for Horde allows remote attackers to inject arbitrary web script or HTML via the backend parameter.",
          "published" : "2009-07-08T15:30:00Z",
          "updated" : "2017-08-17T01:30:00Z",
          "affects" : [
            {
              "ref" : "PACKAGE/COMPONENT_UUID"
            }
          ]
        }
      ]
    }
    
  5. syalioune commented on Sep 21, 2022

    @syalioune
    ContributorAuthor

    Hello Nate,

    are you sure the affects.ref is supposed to be the project UUID, I thought that it should be the UUID of the vulnerable package/ component?

    Based on CISA VEX use cases and Steve comment here, my understanding is that VEX intent is to communicate vulnerability state at a project level not individual component.

    Dependency Track implementation allow both targets (project and component) with the following conditions :

    • Project target : The vulnerability affects.ref must match exactly metadata.component.bom-ref (no need to match the exact project UUID as I initially thought) or it must be a bom-link like urn:cdx:123e4567-e89b-12d3-a456-426614174000/1 (the URI does not need to actually match an existing BOM serial number) ==> The vulnerability analysis state will be applied to all the project's components vulnerable to the vuln
    • Component target : The vulnerability affects.ref must match exactly a components[*].bom-ref in the same VEX file ==> The matching component identifiers will then be used to find the actual project's component to apply the analysis state

    Some common pre-conditions for the VEX import to work :

    • The vulnerabilities listed in the VEX must already be associated with project/component ==> A VEX import does not add new vulnerabilities. It is an update process
    • Each vulnerability in the VEX must have an analysis node otherwise it is skipped during import ==> That's why your example above does not work

    You can find attached some test data using Traefik SBOM (JSON files renamed to .TXT)

    traefik-sbom.txt
    vex-using-local-component-bom-ref.txt
    vex-existing-vuln-target-project-bom-ref.txt
    vex-existing-vuln-target-project-bom-ref-no-analysis-not-working.txt
    vex-existing-vuln-target-urn.txt
    vex-new-vulnerability-not-working.txt
    vex-using-actual-component-uuid-not-working.txt

  6. stevespringett commented on Nov 16, 2022

    @stevespringett
    Member

    I think the use cases need to be very clear between importing VDR and VEX as they are entirely different things.

    Refer to:
    https://cyclonedx.org/capabilities/vdr/
    https://cyclonedx.org/capabilities/vex/

    I'm not aware of any use case (other than audit and IAST tools) where a BOM will contain VEX.

    However, many security tools support BOM with VDR. This will be a common use case, but there's already a ticket open for that. (#1297)

  7. tiagojufr commented on Feb 23, 2023

    @tiagojufr

    @syalioune when you say

    The vulnerabilities listed in the VEX must already be associated with project/component ==> A VEX import does not add new vulnerabilities. It is an update process

    I'm trying to implement the following workflow:

    1. Create project via Dependency Track REST API
    2. Upload VEX via Dependency Track REST API
    3. Upload BOM using dependencyTrackPublisher in Jenkins

    Does this mean I will not have the VEX audit information present in the project's Audit Vulnerabilities tab after the 3rd step?

  8. stevespringett commented on Feb 23, 2023

    @stevespringett
    Member

    @tiagojufr The way DT currently works would require:

    1. Create project via Dependency Track REST API
    2. Upload BOM using dependencyTrackPublisher in Jenkins
    3. Upload VEX via Dependency Track REST API

    The VEX would need to be last and would have to be uploaded AFTER the initial analysis of the BOM.

    There are limitations in DT's support of VEX currently. DT can only apply VEX analysis decisions for vulnerabilities that DT has already identified. If DT has not identified the vulnerability, the analysis will be discarded.

    Take for example a VEX that states that the product is not vulnerable to Log4Shell, which would be a common assertion from many vendors. If the project you're applying the VEX to doesn't use Log4J, you will not know the VEX make that assertion. So there's certainly a lot of improvement that VEX support needs.

    In your workflow example, you have the VEX coming before the BOM. That ideally should be a supported use case. However, it would require a retention policy and use of the BOM Repository Server to store and manage BOMs, VEXs, etc for extended use. This is something that is not in place today, but is planned. Once implemented, I think the VEX coming before the BOM should absolutely be possible.

  9. Shortfinga commented on May 15, 2023

    @Shortfinga

    Are there plans to make this possible? Do you have a rough ETA?

  10. added
    p2
    on Jul 27, 2023
  11. paletteguy commented on Feb 26, 2025

    @paletteguy

    +1 from me...
    It's VERY annoying not to be able apply vulnerability and when the order inside VEX file will have an different behaviors, CVE vulnerability response may or may not be updated when applied to the project.

    Almost makes it unusable.

  12. alexhocks commented on Apr 16, 2025

    @alexhocks

    Hey @stevespringett
    within my company we are currently looking into providing this feature for Dependency Track (i.e. providing some form of VEX upload for an unfinished SBOM analysis which will automatically be taken into account after the SBOM analysis has finished). Basically what you described in this comment:
    #1872 (comment)

    It would be a relevant feature for us so we are planning to make this contribution to Dependency Track. Would you still be open to this feature?

  13. Falco20019 commented on Jul 2, 2026

    @Falco20019

    This is sadly still VERY annoying. I tried to merge my SBOM with VEX from develop just to find out the vulnerabilities node is ignored on /v1/bom and that waiting for /v1/token/{uuid} before sending it separately to /v1/vex will still trigger notifications that I have to close afterwards on each new version... Would be great to just support the vulnerabilities node as expected by CycloneDXs specification.

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementp2

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions