Kokil Thapa - Professional Web Developer in Nepal
Freelancer Web Developer in Nepal with 15+ Years of Experience

Kokil Thapa is an experienced full-stack web developer focused on building fast, secure, and scalable web applications. He helps businesses and individuals create SEO-friendly, user-focused digital platforms designed for long-term growth.

SBOMs and Supply Chain Security

By Kokil Thapa | Last reviewed: September 2026

SBOMs and supply chain security answer a question every production team eventually faces: do you know exactly what code is running in your app? A Software Bill of Materials is a structured inventory of components, versions, and relationships. When a CVE hits a library you never knew you had, that inventory is the difference between a same-day patch and a weekend breach. For teams shipping custom Laravel, WordPress, and eCommerce applications, supply chain risk is not abstract—it lives in composer.lock, npm lockfiles, Docker base images, and CI plugins.

What are SBOMs and why do they matter for supply chain security?

An SBOM is a nested list of ingredients in your software, similar to a food label. It names packages, versions, suppliers, and how those pieces connect. The US NTIA minimum elements for SBOM define baseline fields: supplier name, component name, version, unique identifiers, dependency relationships, author of the SBOM data, and timestamp.

Supply chain attacks target the path from developer laptop to production server. Attackers compromise npm packages, typosquat Composer libraries, or inject malicious CI actions. You cannot defend what you cannot see. An SBOM gives security and engineering a shared source of truth.

On legal-tech portals and client portals I have maintained, third-party audits increasingly ask for dependency transparency. Regulated buyers, government tenders, and enterprise clients want proof that you track vulnerabilities in dependencies—not just your own PHP code. SBOMs are becoming a deliverable, not a nice-to-have.

Supply Chain Security LayersYour CodePHP, JS, BladeDependenciesComposer, npmInfrastructureDocker, CI, OSRuntimePHP-FPMSBOM — Machine-Readable InventorySPDX or CycloneDX JSON attached to each releaseCVE MatchingNVD, GitHub AdvisoriesPolicy GatesBlock critical CVEs in CIAudit TrailPer-release proof
SBOMs and supply chain security connect application code, dependencies, and infrastructure to vulnerability response workflows.

Without an SBOM, teams rely on memory and manual grep through lockfiles. That fails at scale. A Laravel 13 app with 80 direct Composer packages may pull 400 transitive dependencies. Your frontend build adds another tree via npm 12 and Vite 8.x. Each release changes the graph.

SBOMs do not replace scanning. They feed it. Software Composition Analysis tools ingest SBOMs to prioritize fixes. Pair SBOM generation with guidance from our SBOM generation walkthrough and the broader SLSA supply chain security framework for provenance and build integrity.

What SBOM formats should PHP and Laravel teams use?

Two standards dominate: SPDX and CycloneDX. Both satisfy NTIA minimum elements. Both export JSON. Your choice depends on tooling and who consumes the file.

CriteriaSPDXCycloneDX
Primary maintainerLinux Foundation / ISO 5962OWASP / ECMA-424
Best forLicense compliance, legal reviewSecurity scanning, DevSecOps
PHP ecosystem toolsspdx/spdx-tools, some CI pluginsCycloneDX PHP library, Syft, Trivy
VEX supportYes (SPDX 2.3+)Yes (native VEX profile)
Typical consumerCompliance teams, enterprisesDependency-Track, Grype, Snyk

For most web teams I work with, CycloneDX is the practical default. Security scanners ingest it cleanly. SPDX shines when license obligations matter—GPL contamination in a commercial plugin, for example.

You can generate both from the same build if a client requires SPDX and your pipeline prefers CycloneDX. Store them as release artefacts alongside checksums. Never regenerate from source months later; the lockfile at release time is the truth.

Minimum fields to verify in any export

  • Component name and version for every direct and transitive dependency
  • Package URL (purl) or CPE where available—Composer uses pkg:composer/vendor/package@version
  • Dependency graph edges showing which package pulled which child
  • SBOM author tool name and creation timestamp
  • Hash of the source artefact (container digest or git commit SHA)

Validate exports with the JSON formatter tool during development. Malformed JSON breaks automated importers silently.

How do you generate an SBOM for Composer, npm, and Docker builds?

Generation belongs in CI, not on a developer laptop. Laptops drift. CI uses locked dependencies and reproducible commands. The pattern I use on Deployer 7 + GitLab CI pipelines mirrors what we document for shift-left DevSecOps in CI/CD.

PHP and Composer (Laravel 12/13)

Composer 2.10 already exposes vulnerability data via composer audit. That is SCA, not an SBOM—but run both. For CycloneDX from PHP:

# Install CycloneDX PHP tool as dev dependency
composer require --dev cyclonedx/cyclonedx-php-composer

# Generate SBOM from composer.lock
vendor/bin/cyclonedx-php-composer \
  --output-file=sbom-cyclonedx.json \
  --output-format=JSON

# Audit known advisories (Composer native)
composer audit --format=json > audit-report.json

Commit neither file to git by default. Attach them to the CI job artefact store or release bucket. Tag each SBOM with the git SHA and deployment environment.

JavaScript assets (Vite 8.x / npm 12)

Frontend dependencies need their own SBOM. Syft scans package-lock.json without executing install scripts:

# Install Syft (pin version in CI image)
curl -sSfL https://raw.githubusercontent.com/anchore/syft/main/install.sh | sh -s -- -b /usr/local/bin

# Generate CycloneDX SBOM from lockfile
syft scan file:package-lock.json -o cyclonedx-json > sbom-frontend.json

Merge PHP and JS SBOMs at release time, or store separately and reference both in release notes. Merged SBOMs simplify client handoffs for projects like secure client portals with document sharing.

Container images

If you ship Docker images—even only for CI runners—scan the image itself. Lockfiles miss OS packages inside the image. Trivy and Syft both emit CycloneDX:

syft scan docker:myapp:1.4.2 -o cyclonedx-json > sbom-container.json
trivy image --format cyclonedx --output trivy-sbom.json myapp:1.4.2

Read our distroless images guide for reducing base-image attack surface. Fewer packages means a shorter SBOM and fewer CVEs to triage.

SBOM Generation in CI/CDGit Pushcomposer installnpm ciBuild AssetsGenerate SBOMsPHP + JS + DockerSCA ScanGrype, Snyk, auditPolicy GateFail on criticalRelease Artefact StoreSBOM + audit report + git SHA + deploy timestamp
Generate SBOMs and supply chain security scans during CI before any production deploy completes.

How should SBOMs fit into vulnerability response and compliance?

An SBOM without a response process is shelfware. The workflow below is what I recommend for production systems under active maintenance contracts.

  1. Subscribe to advisories. Enable GitHub Dependabot or GitLab dependency scanning on every repo. Watch CVE feeds for your stack—PHP, Laravel, WordPress, WooCommerce 11.1, Magento 2.4.x.
  2. Match CVE to SBOM. Import the release SBOM into OWASP Dependency-Track or run Grype locally against the saved JSON file.
  3. Triage by exploitability. A critical CVE in a dev-only package differs from one in a payment callback handler. Use reachability analysis where your scanner supports it.
  4. Patch and rebuild. Update the lockfile, regenerate the SBOM, redeploy. PHP-FPM opcache may serve stale code until reload—account for that on Linux production servers.
  5. Document exceptions. If you cannot patch immediately, publish a VEX (Vulnerability Exploitability eXchange) statement explaining why the CVE does not affect your deployment.

For WordPress and WooCommerce sites, plugin supply chains add risk beyond Composer. A compromised premium plugin bypasses your PHP lockfile entirely. File integrity monitoring and staged updates matter. See the WordPress security hardening checklist for operational controls that complement SBOM data.

Magento merchants face a similar pattern with composer-based core plus marketplace extensions. The Magento 2 security patch guide covers patch timing when Adobe publishes APSB advisories.

SBOM vs SCA vs SLSASBOMWhat is installedInventory listPer release artefactSCAWhat is vulnerableCVE matchingContinuous scanningSLSAHow it was builtProvenance proofTamper resistanceTogether: inventory + risk + integritySBOM feeds SCA tools; SLSA attests CI/build originAll three belong in a mature supply chain program
SBOMs inventory components; SCA finds CVEs; SLSA proves build integrity—three pillars of supply chain security.

What common SBOM mistakes break supply chain security programs?

Teams adopt SBOMs because a client or framework mandate requires them. Then the programme stalls. These failures show up repeatedly on projects I audit or maintain.

Generating SBOMs from outdated lockfiles

Running SBOM tools against composer.json instead of composer.lock produces fantasy data. Version ranges are not versions. Always pin against lockfiles and container digests.

Skipping transitive dependencies

Direct-only SBOMs miss 90% of your attack surface. CycloneDX and Syft include transitive packages by default. Verify your exporter does too.

No linkage to releases

An SBOM floating in a shared drive with no git SHA is useless during incident response. Store SBOMs keyed to immutable release identifiers. On sister sites sharing Deployer 7 pipelines, I attach artefacts to GitLab job IDs for traceability.

Treating SBOM as a one-time checkbox

Supply chain security is continuous. New CVEs publish daily. Schedule weekly composer audit runs and monthly full SBOM regeneration even without releases. Our support and maintenance service includes dependency monitoring for clients who lack in-house security staff.

Ignoring CI/CD supply chain

Your GitLab runner plugins, GitHub Actions, and deployment keys are part of the chain. Harden runners per the self-hosted CI runners security guide. Scan runner images the same way you scan application images.

Integrate SCA with quality gates from SonarQube security gates and developer-first scanning covered in our Snyk scanning overview. Compare static versus dynamic approaches in the SAST vs DAST guide—SBOM-driven SCA complements both.

CVE Response Using SBOMCVE PublishedQuery SBOMAll release versionsIdentify HitsAffected envsTriage RiskProd vs devPatch: update lockfile, rebuild SBOM, deployReload PHP-FPM; verify with composer auditCannot patch immediately?Publish VEX statement + WAF rule + monitor logs
Use stored SBOMs during CVE incidents to find affected releases and drive patch or VEX decisions fast.

How do SBOMs connect to API security and server hardening?

Supply chain risk does not stop at dependencies. A vulnerable JWT library listed in your SBOM matters only if your API exposes it to attackers. Cross-reference SBOM findings with your API security checklist and JWT vulnerability patterns.

Server-level hardening reduces blast radius when a dependency exploit succeeds. Apply controls from the Ubuntu security hardening guide and keep OS packages in scope—extend SBOM generation to the host or container OS layer.

For teams evaluating tooling, testing and optimization services can integrate SBOM generation into existing GitLab CI pipelines without rewriting deployment workflows. The goal is additive security, not a parallel release process.

The CycloneDX specification and SPDX specification remain the authoritative references for field definitions and validation rules. Align internal templates with those docs before promising SBOM formats to enterprise clients.

Key Takeaways

  • Generate SBOMs from lockfiles and container digests in CI—never from version ranges or developer machines alone.
  • Use CycloneDX for DevSecOps workflows; add SPDX when license compliance is a contract requirement.
  • Store every release SBOM with git SHA, timestamp, and audit report for fast CVE lookup.
  • Pair SBOM inventory with SCA scanning and SLSA-style build provenance for full supply chain coverage.
  • Run composer audit on PHP 8.3+ Laravel 13 projects weekly, and regenerate SBOMs on every production deploy.
  • Publish VEX statements when a CVE is not exploitable in your configuration instead of leaving findings unexplained.

People Also Ask

Are SBOMs legally required in 2026?

US federal software procurement increasingly expects SBOMs under Executive Order 14028 and subsequent guidance. The EU Cyber Resilience Act will require software transparency for products sold in EU markets. Private enterprise RFPs follow the same trend. Even without a legal mandate, client security questionnaires now routinely ask for dependency inventories.

What is the difference between an SBOM and a lockfile?

A lockfile pins versions for one ecosystem—Composer or npm—and is consumed by package managers during install. An SBOM is a standardised, cross-ecosystem document with supplier metadata, licence data, and dependency graphs designed for security tools and auditors. You generate SBOMs from lockfiles, but they are not interchangeable.

How often should you regenerate an SBOM?

Regenerate on every release that reaches production. For high-risk applications—payment portals, legal document systems, healthcare-adjacent workflows—also regenerate on a fixed schedule such as weekly. Any time a critical CVE publishes against your stack, regenerate immediately after patching to confirm the fix appears in the inventory.

Can WordPress sites produce meaningful SBOMs?

Partially. Composer-based Bedrock-style WordPress setups SBOM cleanly. Traditional WordPress with zip-installed plugins and themes does not. For those sites, combine plugin inventory exports, file integrity monitoring, and manual plugin audits. SBOM standards are still catching up with CMS plugin ecosystems that bypass package managers.

Build supply chain visibility into your next release

SBOMs and supply chain security are no longer optional extras for teams shipping production PHP, Laravel, or eCommerce systems. Start with one project: add CycloneDX generation to CI, store artefacts per release, and wire composer audit into your merge pipeline. Expand to container and frontend SBOMs once the PHP path works. If you need help integrating SBOM workflows into an existing Deployer or GitLab setup, contact us to review your pipeline—or browse the security and DevOps archives for related guides on CSP for Laravel apps and OAuth hardening.

Frequently Asked Questions

An SBOM is a structured inventory of every software component in your application—packages, versions, suppliers, and how they connect. Supply chain attacks target dependencies you may not know exist: compromised npm packages, typosquatted Composer libraries, malicious CI actions. When a CVE hits, that inventory is the difference between a same-day patch and a weekend breach. On legal-tech portals and client portals I maintain, third-party audits increasingly ask for dependency transparency. You cannot defend what you cannot see.

A lockfile pins versions for one ecosystem and is consumed by package managers during install. An SBOM is a standardised, cross-ecosystem document with supplier metadata, licence data, and dependency graphs for security tools and auditors. You generate SBOMs from lockfiles—they are not interchangeable.

Not universally, but US federal procurement increasingly expects SBOMs under Executive Order 14028. The EU Cyber Resilience Act will require software transparency for EU-market products. Private enterprise RFPs follow the same trend.

Two standards dominate: SPDX and CycloneDX. Both satisfy NTIA minimum elements and export JSON. For most web teams I work with, CycloneDX is the practical default—security scanners like Dependency-Track, Grype, and Snyk ingest it cleanly. SPDX shines when license obligations matter, such as GPL contamination in a commercial plugin. You can generate both from the same build if a client requires SPDX and your pipeline prefers CycloneDX. Store them as release artefacts alongside checksums, keyed to the lockfile at release time.

Generation belongs in CI, not on developer laptops. Install cyclonedx/cyclonedx-php-composer as a dev dependency with Composer 2.10, then run vendor/bin/cyclonedx-php-composer against composer.lock to output CycloneDX JSON. Run composer audit in parallel—that is SCA, not an SBOM, but both belong in the pipeline. A Laravel 13 app with 80 direct Composer packages may pull 400 transitive dependencies. Never generate from composer.json; version ranges are not versions. Commit neither file to git by default—attach them to CI job artefacts tagged with git SHA and deployment environment.

Frontend dependencies need their own SBOM separate from PHP. Use Syft to scan package-lock.json without executing install scripts: syft scan file:package-lock.json -o cyclonedx-json. Pin the Syft version in your CI image. A typical stack using npm 12 and Vite 8.x adds another dependency tree on top of Composer. Merge PHP and JS SBOMs at release time, or store separately and reference both in release notes. Merged SBOMs simplify client handoffs for secure client portals with document sharing.

Yes. Lockfiles miss OS packages inside container images. Even if you only use Docker for CI runners, scan the image itself. Trivy and Syft both emit CycloneDX: syft scan docker:myapp:tag or trivy image --format cyclonedx. Fewer base-image packages means a shorter SBOM and fewer CVEs to triage—distroless images reduce attack surface. Generate SBOMs and supply chain security scans during CI before any production deploy completes.

Regenerate on every release that reaches production. For high-risk applications—payment portals, legal document systems, healthcare-adjacent workflows—also regenerate on a fixed schedule such as weekly. Any time a critical CVE publishes against your stack, regenerate immediately after patching to confirm the fix appears in the inventory. Supply chain security is continuous; new CVEs publish daily. An SBOM without a response process is shelfware.

Subscribe to advisories via GitHub Dependabot or GitLab dependency scanning. Import the release SBOM into OWASP Dependency-Track or run Grype against the saved JSON. Match published CVEs to your components, triage by exploitability—a critical CVE in a dev-only package differs from one in a payment callback handler. Patch, update the lockfile, regenerate the SBOM, redeploy. Account for PHP-FPM opcache serving stale code until reload on Linux production servers. If you cannot patch immediately, publish a VEX statement explaining why the CVE does not affect your deployment.

Four failures show up repeatedly on projects I audit. Generating from composer.json instead of composer.lock produces fantasy data. Direct-only SBOMs miss roughly 90% of your attack surface—verify your exporter includes transitive packages. An SBOM with no git SHA is useless during incident response; store artefacts keyed to immutable release identifiers. Treating SBOM as a one-time checkbox stalls programmes—schedule weekly composer audit runs and monthly full regeneration. Ignoring CI/CD supply chain means GitLab runner plugins and GitHub Actions remain unscanned.

Partially. Composer-based Bedrock-style WordPress setups SBOM cleanly through the same CycloneDX PHP tooling. Traditional WordPress with zip-installed plugins and themes does not— a compromised premium plugin bypasses your PHP lockfile entirely. For those sites, combine plugin inventory exports, file integrity monitoring, staged updates, and manual plugin audits. SBOM standards are still catching up with CMS plugin ecosystems that bypass package managers. See the WordPress security hardening checklist for operational controls that complement SBOM data.

SBOMs inventory components; SCA finds CVEs; SLSA proves build integrity—three pillars of supply chain security. An SBOM feeds Software Composition Analysis tools that prioritise fixes, but does not replace scanning. Composer 2.10 exposes vulnerability data via composer audit—that is SCA, not an SBOM. Pair SBOM generation with SLSA-style build provenance for full supply chain coverage. Integrate SCA with quality gates from SonarQube or Snyk. SBOM-driven SCA complements both SAST and DAST approaches.

Verify these in any export before handing it to a client or auditor. Component name and version for every direct and transitive dependency. Package URL or CPE where available—Composer uses pkg:composer/vendor/package@version. Dependency graph edges showing which package pulled which child. SBOM author tool name and creation timestamp. Hash of the source artefact, such as a container digest or git commit SHA. These align with NTIA minimum elements: supplier name, component name, version, unique identifiers, dependency relationships, author, and timestamp. Validate exports with the JSON formatter during development—malformed JSON breaks automated importers silently.

CI, always. Laptops drift; CI uses locked dependencies and reproducible commands. The pattern I use on Deployer 7 plus GitLab CI pipelines mirrors shift-left DevSecOps: generate during CI before any production deploy completes. Attach artefacts to the CI job store or release bucket, never regenerate from source months later—the lockfile at release time is the truth. On sister sites sharing Deployer 7 pipelines, I attach artefacts to GitLab job IDs for traceability. The goal is additive security, not a parallel release process.

Supply chain risk does not stop at dependencies. A vulnerable JWT library listed in your SBOM matters only if your API exposes it to attackers—cross-reference SBOM findings with your API security checklist and JWT vulnerability patterns. Server-level hardening reduces blast radius when a dependency exploit succeeds. Apply controls from the Ubuntu security hardening guide and extend SBOM generation to the host or container OS layer, not just application lockfiles. For WooCommerce 11.1 and Magento 2.4.x merchants, plugin and marketplace extension supply chains add risk beyond Composer that SBOMs alone cannot fully cover.

Share this article

0 Comments

Leave a comment

Your email is not published. Comments appear once they have been read. Sign in to have your details filled in.

Quick Contact Options
Choose how you want to connect me: