This is the multi-page printable view of this section. Click here to print.

Return to the regular view of this page.

Generating an SBOM with Open Source Tools

Explains how to generate an SBOM for each environment using general-purpose open source tools.

    If you cannot use the SKT-provided tool, or you already have your own build pipeline, you can use open source tools directly. Below is a list of the major open source tools validated by SK Telecom, along with links to their official documentation.

    If you are not comfortable setting up a tool environment and you have Docker installed, consider reviewing the SKT SBOM Generator first.

    Tool Selection Guide

    graph TD
        A[Identify analysis target] --> B{Is it source code?}
        B -- Yes --> C[cdxgen recommended]
        B -- No --> D{Is it a Docker image?}
        D -- Yes --> E[Syft or Trivy recommended]
        D -- No --> F[Binary/Firmware]
        F --> G[Syft recommended]

    Major Tools

    Automatically analyzes projects in various languages such as Java, Python, Node.js, and Go, and generates an SBOM in CycloneDX format.

    Analyzes Docker images, file systems, and binary files to identify both OS packages and application libraries. Supports CycloneDX and SPDX formats.

    Trivy (container image analysis)

    An all-in-one tool that can perform container image analysis and vulnerability scanning together.

    Security Warning — Trivy Supply Chain Attack Incident (2026)

    In March 2026, a supply chain attack occurred in which an attacker re-pointed existing release tags of aquasecurity/trivy to inject malware. The GitHub release v0.69.4 (3/19) and the DockerHub images v0.69.5 and v0.69.6 (3/22) have been confirmed as compromised, so please stop using them.

    To use Trivy safely, follow these principles.

    • GitHub Actions: Use a pinned commit SHA or a verified version tag instead of mutable tags (@master, @latest, @v1, etc.).

      # Recommended: pin to a verified version
      - uses: aquasecurity/trivy-action@0.35.0
      # Safer: pin to a commit SHA
      - uses: aquasecurity/trivy-action@<commit-sha>
      
    • Docker images: Specify a particular version tag, or pin to an image digest (@sha256:...).

      docker run aquasecurity/trivy:<verified-version> image <target-image>
      
    • Official channels: Check the latest security advisories through the GitHub Security Advisory.

    This incident shows that if you do not pin versions when adopting an open source tool, you can be exposed to a supply chain attack at any time. Always specify the version of every external tool and verify its integrity before use.

    Language-Specific Dedicated Plugins

    Using a build tool plugin lets you extract more accurate dependency information.

    Language/Build ToolPlugin/ToolOfficial Documentation
    Java (Maven)cyclonedx-maven-pluginLink
    Java (Gradle)cyclonedx-gradle-pluginLink
    Pythoncyclonedx-bomLink
    Node.js@cyclonedx/cyclonedx-npmLink
    Gocyclonedx-gomodLink

    Verifying Transitive Dependency Inclusion

    An SBOM submitted to SK Telecom must include transitive dependencies.

    Transitive dependencies are libraries that the project does not declare directly, but on which the libraries it uses depend internally. If these are omitted, hidden vulnerabilities cannot be detected and the SBOM may be rejected.

    Key principle: Generate the SBOM after the build (package installation) is complete.

    When only source code is present, transitive dependencies may be omitted. Refer to the table below and complete the prerequisite steps before generating the SBOM.

    Transitive Dependency Support by Tool

    Tool / MethodTransitive Dependencies IncludedPrerequisite Before SBOM Generation
    cdxgen (source code)Included automaticallyNo separate build required (auto-detected)
    cdxgen (Java/Maven)ConditionalRun mvn package or mvn dependency:resolve first
    cdxgen (Java/Gradle)ConditionalRun ./gradlew dependencies first
    cdxgen (Python)ConditionalActivate the virtual environment, then run pip install -r requirements.txt first
    cdxgen (Node.js)ConditionalRun npm install or yarn install first
    Syft (Docker image)Included automaticallyScan after the image build is complete (includes both OS and app packages)
    Syft (file system/RootFS)Included automaticallyScan based on the deployment artifact
    Maven pluginIncluded automaticallyGenerated automatically during the mvn package phase
    Gradle pluginIncluded automaticallyRun ./gradlew cyclonedxBom

    Recommendation: When delivering as a Docker image, scanning the built image with Syft can include more complete transitive dependencies than source code analysis.

    Common Precautions

    Verify the following before using a tool.

    • Transitive dependency inclusion: Refer to the table above and complete the prerequisite steps before generating the SBOM. Missing dependencies are grounds for rejection.
    • PURL inclusion: Verify that the generated SBOM includes a purl field for every component. SK Telecom’s system maps vulnerabilities based on PURL.
    • Output format: CycloneDX JSON format is recommended. (Use -o cyclonedx-json or an equivalent option)
    • Project information: Verify that the metadata accurately records the name and version of the delivered project.