Skip to content

Add more documentation around components[].scope #293

Closed

Description

@noqcks

The CycloneDX standard includes a scope attribute for each component:

image

I am confused about when one should use required, optional or excluded when generating an entry for a component. Are there any examples? Could the description be altered to make this more clear?

Activity

  1. added this to the 1.6 milestone on Sep 11, 2023
  2. prabhu commented on Dec 24, 2023

    @prabhu
    Contributor

    This attribute can be deprecated in favor of evidence. The presence of an occurrence or a call stack evidence is proof that the component is definitely required. All other components could be treated as unknown to keep it safe.

    Example:

    consider CVE-2023-4910. Typically unit test files would be treated as a dev dependency and therefore as scope optional. However, there is direct occurrence evidence (even with an SBOM with a post-build lifecycle) so this component must be considered as required. However, the evidence alone is enough instead of setting another redundant attribute.

    https://www.malwarebytes.com/blog/news/2023/11/owncloud-vulnerability-can-be-used-to-extract-admin-passwords

  3. stevespringett commented on Dec 27, 2023

    @stevespringett
    Member

    scope is a way to include a component but not assert that that component is delivered or included in the inventory. For example, you may want to include Windows XP Embedded as a component, mark the scope as excluded, as a way to indicate that the entire stack will include the OS, but that the supplier does not provide it with the software. There is ongoing discussions within CISA on how to specify runtime requirements. Expect this capability to expand in the future.

  4. stevespringett commented on Dec 27, 2023

    @stevespringett
    Member

    With that said, we will expand the documentation for v1.6. Thanks for the suggestion.

  5. jkowalleck commented on Feb 8, 2024

    @jkowalleck
    Member

    JSON was fixed via d92e58e

    XML and ProtoBuf already had the needed docs,
    see

    <xs:simpleType name="scope">
    <xs:restriction base="xs:string">
    <xs:enumeration value="required">
    <xs:annotation>
    <xs:documentation>The component is required for runtime</xs:documentation>
    </xs:annotation>
    </xs:enumeration>
    <xs:enumeration value="optional">
    <xs:annotation>
    <xs:documentation>The component is optional at runtime. Optional components are components that
    are not capable of being called due to them not be installed or otherwise accessible by any means.
    Components that are installed but due to configuration or other restrictions are prohibited from
    being called must be scoped as 'required'.</xs:documentation>
    </xs:annotation>
    </xs:enumeration>
    <xs:enumeration value="excluded">
    <xs:annotation>
    <xs:documentation>Components that are excluded provide the ability to document component usage
    for test and other non-runtime purposes. Excluded components are not reachable within a call
    graph at runtime.</xs:documentation>
    </xs:annotation>
    </xs:enumeration>
    </xs:restriction>
    </xs:simpleType>

  6. added a commit that references this issue on Apr 9, 2024
  7. added a commit that references this issue on Jan 27, 2026
  8. added a commit that references this issue on Feb 23, 2026
  9. jkowalleck commented on Mar 3, 2026

    @jkowalleck
    Member

    For example, you may want to include Windows XP Embedded as a component, mark the scope as excluded, as a way to indicate that the entire stack will include the OS, but that the supplier does not provide it with the software.

    with CycloneDX 1.7, we introduced external runtime dependencies

    Make it possible to describe external dependencies that are not part of a shipped product,
    like runtime environments, shared objects and dynamically linked libraries, operating system, hardware (architecture) etc.

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

Metadata

Metadata

Type

No type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions