Skip to content

CycloneDX Import Specifications#

This page explains which fields of an SBOM in OWASP CycloneDX (v1.x) format FutureVuls interprets and imports, and how.

For the format-independent common specifications, such as component type determination and the import of OS and dependency libraries, refer to "SBOM Import Specifications".

FutureVuls reads the following information from CycloneDX. The JSON in each section is an excerpt for explanation. It cannot be imported as is.

metadata#

  "metadata": {
    "timestamp": "2023-08-08T08:22:10+00:00",
    "tools": [
      {
        "vendor": "aquasecurity",
        "name": "trivy",
        "version": "0.43.0"
      }
    ],
    "component": {
      "bom-ref": "__ROOT_COMPONENT_REF__",
      "type": "container",
      "name": "ami-xxxxxxxxxxxxxxxxx"
    }
  }
  • The tool that generated the SBOM is determined from tools.
  • component represents the subject of the SBOM itself (a container image, a virtual machine, etc.). bom-ref is an ID for referring to a component within the SBOM (see "dependencies").
  • If the component has type: operating-system, it is used as OS information when both of the following conditions are met. The example above has type: container, so this does not apply to it.
Condition Description
1 The OS cannot be determined from components
2 The SBOM contains OS packages that are not under the OS element (a component in components with type: operating-system)

The OS of the component is not used for an SBOM that contains no OS packages (for a server SBOM, the OS of the server is Pseudo).

components#

  "components": [
    {
      "bom-ref": "__OPERATING_SYSTEM_COMPONENT_REF__",
      "type": "operating-system",
      "name": "amazon",
      "version": "2023"
    },
    {
      "bom-ref": "pkg:rpm/amazon/bash@4.2.46-34.amzn2023?arch=x86_64",
      "type": "library",
      "name": "bash",
      "version": "4.2.46-34.amzn2023",
      "purl": "pkg:rpm/amazon/bash@4.2.46-34.amzn2023?arch=x86_64"
    },
    {
      "bom-ref": "__APPLICATION_COMPONENT_REF__",
      "type": "application",
      "name": "opt/vuls-saas/vuls",
      "properties": [
        {
          "name": "aquasecurity:trivy:Type",
          "value": "gobinary"
        }
      ]
    },
    {
      "bom-ref": "pkg:golang/github.com/vulsio/go-exploitdb@v0.4.2",
      "type": "library",
      "name": "github.com/vulsio/go-exploitdb",
      "version": "v0.4.2",
      "purl": "pkg:golang/github.com/vulsio/go-exploitdb@v0.4.2"
    },
    ...
  ]

components, which represent the list of software in CycloneDX, are imported as follows, using type as a hint. Depending on the SBOM generation tool, there are exceptions to the handling of application and library.

type Condition Handling
operating-system - Imported as OS information
library Not under an OS or application, and not covered by the row below (for components under an OS or application, see the description below the table) Imported as an OS package, a language library, or software with the software type private, based on the purl and cpe information
library In an SBOM from a tool that outputs the project itself as type: library (cdxgen, etc.), a library at the root of the dependency graph that can be identified as the project itself That library is treated as an application. The dependencies under it are imported as libraries of that application
application Other than the rows below Imported as application information (a unit that groups dependency libraries). If there are no libraries to import, it is not registered as an application
application An SBOM whose generator is identified as Amazon Inspector or a similar tool (determined by the rules for each generator; outputting all components as type: application from your own tool does not result in this handling) Not treated as applications; each component is imported as software
application A component whose application type (the language or the type of package management) cannot be identified (binaries output by Syft, etc.) Imported as software with the software type private
firmware, device, etc. When not under an OS or an application The software type is determined based on the purl and cpe information, as with other components, and they are imported
file, machine-learning-model, data, cryptographic-asset - Not imported

The actual software type of each component (os / library / private) is determined based on its purl and cpe information. For the determination rules, refer to "Component Type Determination". In addition, the license information described in licenses is also imported.

dependencies#

  "dependencies": [
    {
      "ref": "__ROOT_COMPONENT_REF__",
      "dependsOn": [
        "__OPERATING_SYSTEM_COMPONENT_REF__",
        "__APPLICATION_COMPONENT_REF__"
      ]
    },
    {
      "ref": "__OPERATING_SYSTEM_COMPONENT_REF__",
      "dependsOn": [
        ...
        "pkg:rpm/amazon/bash@4.2.46-34.amzn2023?arch=x86_64",
        ...
      ]
    },
    {
      "ref": "__APPLICATION_COMPONENT_REF__",
      "dependsOn": [
        ...
        "pkg:golang/github.com/vulsio/go-exploitdb@v0.4.2",
        ...
      ]
    },
    ...
  ]

dependencies represents the relationships between components. In ref and dependsOn, you write the bom-ref (the ID for reference) of metadata.component and of each component in components. ref is the parent, and dependsOn lists the components under it. In the example, some components use the same string as their PURL for bom-ref. purl is a value used to identify software, and bom-ref is a value used for reference within the SBOM, so their purposes differ.

The relationships in the example above are as follows.

In the CycloneDX example, the relationships connected by dependsOn from metadata.component to the OS and the application, from the OS to bash, and from the application to go-exploitdb

Parent (ref) Under it (dependsOn) Import in FutureVuls
__ROOT_COMPONENT_REF__ (metadata.component) __OPERATING_SYSTEM_COMPONENT_REF__, __APPLICATION_COMPONENT_REF__ The OS and the application are identified
__OPERATING_SYSTEM_COMPONENT_REF__ (OS: amazon 2023) pkg:rpm/amazon/bash@... bash is imported as an OS package
__APPLICATION_COMPONENT_REF__ (application: opt/vuls-saas/vuls) pkg:golang/github.com/vulsio/go-exploitdb@v0.4.2 go-exploitdb is imported as a dependency library
  • If the ref is an OS, each component listed in its dependsOn is imported as an OS package.
  • If the ref is an application, each component listed in its dependsOn is imported as a dependency library.
  • If dependsOn refers to another dependency, it is imported recursively.
  • components that do not exist in dependencies are classified and imported according to "Component Type Determination". However, if one or more OS packages are imported from under the OS, OS packages that do not exist in dependencies are not imported. If you list OS packages under the OS, include all OS packages to be imported under the OS. Components whose type is file, data, machine-learning-model, or cryptographic-asset, and components without a name (name), are not imported.