mat3uszm CyberSecurity Blog

Blog about Cyber Security and Programming

SBOM. Why should you be a little bit less afraid when you have it in your pipeline?

Recent security incidents involving popular frameworks, such as the issues surrounding React Server Components or the recurrent supply chain attacks targeting core NPM libraries, underscore a critical industry challenge. Such vulnerabilities present substantial, often overlooked, risks to proprietary applications and client-facing solutions alike. The core question remains: How can organizations proactively secure their software dependencies and expedite response times before a zero-day vulnerability is publicly exploited? This demand for systematic risk management is precisely why the industry is rapidly converging on a definitive solution: the Software Bill of Materials (SBOM).

What SBOM is ?

A Software Bill of Materials (SBOM) is a formal, machine-readable inventory of software components, dependencies, and their hierarchical relationships. It serves as the bedrock for supply chain transparency, standardizing the disclosure of critical metadata such as component names, versions, vendor details, and licensing information. To maximize operational value and ensure timely coverage, the generation of the SBOM must be automated and seamlessly integrated into the Continuous Integration/Continuous Delivery (CI/CD) pipeline. For practical implementation, open-source tools like Syft are highly recommended. Syft excels at creating accurate SBOMs from various sources (container images, filesystems), and its streamlined CLI facilitates quick integration into pipeline scripts. The true security benefit of the SBOM manifests when it is paired with a vulnerability scanner. This is where tools like Grype come into play. Grype, designed for container images and file systems, utilizes the generated SBOM (from Syft) to efficiently identify, map, and report potential weaknesses, cross-referencing them against public databases using industry-standard CVE identifiers.

Secure Development Culture

It is imperative to understand that simply generating an SBOM is not an end in itself; it offers no inherent value without a dedicated Secure Development Culture. The true effectiveness lies in the team’s ability to proactively interpret the resulting reports and remediate identified vulnerabilities. A strategic capability in this process is the implementation of pipeline gating—blocking merges to sensitive branches (e.g., main or development) based on defined severity thresholds. Grype facilitates this crucial step by enabling administrators to fail the build when it detects component vulnerabilities exceeding an agreed-upon severity level, effectively enforcing security policies as code. For example, this line fails the pipeline when vulnerabilities classified as critical or high are detected:

grype sbom:sbom.json --fail-on critical, high -o json > grype-report.json

However, pipeline gating only serves as a preventive measure. Remediation—the act of updating or patching vulnerable libraries—remains the fundamental requirement. To accelerate the remediation loop, I highly recommend creating custom automation (e.g., Python or Bash scripts) to rapidly surface actionable data from the SBOM/Grype report directly to development teams. Furthermore, dedicating time for the systematic review of SBOM reports is essential. Recognizing that false positives are an unavoidable reality, this manual review mitigates unnecessary slowdowns and prevents pipelines from failing incorrectly. By integrating this review process and sharing security knowledge, organizations effectively leverage SBOM not merely as an automation tool, but as a critical metric for fostering a proactive security mindset within development teams.

Different tools

While tools like Syft and Grype provide exceptional component visibility and vulnerability analysis, the resultant data often requires further processing for enterprise-wide consumption and efficient communication. This challenge is effectively addressed by higher-level frameworks, such as the OSS Review Toolkit (ORT). ORT functions as a comprehensive FOSS policy automation and orchestration toolkit, enabling organizations to manage open source dependencies strategically, safely, and efficiently. Crucially, ORT can transform raw SBOM data into user-friendly HTML reports. This standardization simplifies data consumption, allowing teams to quickly review comprehensive dependency and license information directly within a browser interface. This improved readability ensures that even less technical stakeholders can interpret the reports, facilitating quicker consensus on remediation and adherence to licensing compliance requirements.

Examples

To illustrate these concepts, I have provided a practical demonstration of SBOM integration within a GitHub Actions workflow for a React Native application. The workflow begins by installing Syft and Grype, followed by generating the initial SBOM report. This report is then immediately utilized by Grype to perform a detailed vulnerability analysis. A crucial, though optional, step demonstrated here involves using a license-checker to verify compliance. This measure is implemented to detect proprietary or restrictive licenses and automatically gate the build process. Furthermore, the workflow includes an example of leveraging the ORT tool for comprehensive license and dependency analysis on JavaScript package files. Ultimately, the action generates relevant artifacts and enforces a mandatory build failure if any restrictive-license libraries are identified, enforcing a ‘License as Code’ policy. You can review the full implementation of the security scan script here: Link to the GitHub Actions Script

The Critical Role of Security Process

The strategic value of the Software Bill of Materials ultimately transcends mere tooling; it is fundamentally about establishing effective security processes. As previously highlighted, the systematic review of SBOM outputs is paramount, providing an essential, quantitative metric for gauging the team’s ongoing commitment to delivering secure solutions. Drawing from practical experience, I strongly advocate for scheduling periodic cross-functional meetings with development teams. These sessions should be utilized not only to review the most current SBOM reports but also to deliver targeted, educational insights on emerging threats. This dedication to shared knowledge and transparency is vital for cultivating a truly resilient, secure development culture.

Summary

Given the current landscape, where supply chain attacks are increasingly prevalent, achieving 100% security remains unattainable. However, organizations can and must take decisive, measurable steps to effectively mitigate risk. The implementation of a robust SBOM framework is, therefore, a strategic imperative and a powerful ally in the application security pipeline. Crucially, remember that merely generating the SBOM is insufficient; success depends on establishing and executing continuous processes that transform component visibility into tangible security improvements and a more resilient secure development culture.