SBOM CycloneDX Package

Checks different properties of the CycloneDX SBOMs associated with the image being validated.

Package Name

  • sbom_cyclonedx

Rules Included

Allowed

Confirm the CycloneDX SBOM contains only allowed packages. By default all packages are allowed. Use the "disallowed_packages" rule data key to provide a list of disallowed packages.

Solution: Update the image to not use any disallowed package.

  • Rule type: FAILURE

  • FAILURE message: Package is not allowed: %s

  • Code: sbom_cyclonedx.allowed

  • Source

Allowed package external references

Confirm the CycloneDX SBOM contains only packages with explicitly allowed external references. By default all external references are allowed unless the "allowed_external_references" rule data key provides a list of type-pattern pairs that forbid the use of any other external reference of the given type where the reference url matches the given pattern.

Solution: Update the image to use only packages with explicitly allowed external references.

  • Rule type: FAILURE

  • FAILURE message: Package %s has reference %q of type %q which is not explicitly allowed%s

  • Code: sbom_cyclonedx.allowed_package_external_references

  • Source

Allowed package sources

For each of the components fetched by Cachi2 which define externalReferences of type distribution, verify they are allowed based on the allowed_package_sources rule data key. By default, allowed_package_sources is empty, which means no components with such references are allowed.

Solution: Update the image to not use a package from a disallowed source.

  • Rule type: FAILURE

  • FAILURE message: Package %s fetched by cachi2 was sourced from %q which is not allowed

  • Code: sbom_cyclonedx.allowed_package_sources

  • Effective from: 2024-12-15T00:00:00Z

  • Source

Disallowed package attributes

Confirm the CycloneDX SBOM contains only packages without disallowed attributes. By default all attributes are allowed. Use the "disallowed_attributes" rule data key to provide a list of key-value pairs that forbid the use of an attribute set to the given value.

Solution: Update the image to not use any disallowed package attributes.

  • Rule type: FAILURE

  • FAILURE message: Package %s has the attribute %q set%s

  • Code: sbom_cyclonedx.disallowed_package_attributes

  • Effective from: 2024-07-31T00:00:00Z

  • Source

Disallowed package external references

Confirm the CycloneDX SBOM contains only packages without disallowed external references. By default all external references are allowed. Use the "disallowed_external_references" rule data key to provide a list of type-pattern pairs that forbid the use of an external reference of the given type where the reference url matches the given pattern.

Solution: Update the image to not use a package with a disallowed external reference.

  • Rule type: FAILURE

  • FAILURE message: Package %s has reference %q of type %q which is disallowed%s

  • Code: sbom_cyclonedx.disallowed_package_external_references

  • Effective from: 2024-07-31T00:00:00Z

  • Source

Valid

Check the CycloneDX SBOM has the expected format. It verifies the CycloneDX SBOM matches the 1.5 version of the schema.

Solution: Make sure the build process produces a valid CycloneDX SBOM.

  • Rule type: FAILURE

  • FAILURE message: CycloneDX SBOM at index %d is not valid: %s

  • Code: sbom_cyclonedx.valid

  • Source