Security for Legal SaaS

Episode 47 · Module 10 · Infrastructure

Supply Chain Security — Dependencies, SBOM and Build Provenance

19 May 2026 · 8:47 · Security for Legal SaaS

8:47 8:47

A modern legal SaaS platform — a contract review tool, a case management system, a document automation service — is built on hundreds or thousands of open-source packages. The Express web framework. React for the frontend. A PDF parsing library. An encryption library. An ORM for database access. Each of those packages depends on other packages, which depend on others still. A typical Node.js application has between 500 and 1,500 transitive dependencies — packages your code never imports directly but which are pulled in by packages you do use.

Today’s Lesson

Security for Legal SaaS — Episode 47: Supply Chain Security — Dependencies, SBOM and Build Provenance

You Didn't Write 95% of Your Application's Code

A modern legal SaaS platform — a contract review tool, a case management system, a document automation service — is built on hundreds or thousands of open-source packages. The Express web framework. React for the frontend. A PDF parsing library. An encryption library. An ORM for database access. Each of those packages depends on other packages, which depend on others still. A typical Node.js application has between 500 and 1,500 transitive dependencies — packages your code never imports directly but which are pulled in by packages you do use.

You didn't audit those dependencies. You probably haven't read their source code. And yet they run with the same privileges as your own code, processing the same client data, accessing the same databases.

Software supply chain attacks more than doubled globally in 2025 1, with over 70% of organisations reporting at least one incident linked to third-party software. Global costs reached $60 billion and are projected to hit $138 billion by 2031. The attacks are not hypothetical. They have names.

The Attacks That Changed Everything

SolarWinds (2020)

Attackers compromised the build system for SolarWinds' Orion network monitoring platform. They injected a backdoor — called SUNBURST — into legitimate software updates. Over 18,000 organisations, including US government agencies, installed the compromised update through their normal patch management process. The attack was not in the source code repository. It was injected during the build process itself, making it invisible to code review.

Log4Shell (2021)

Log4Shell (CVE-2021-44228) 2 was a critical remote code execution vulnerability in Log4j — a ubiquitous Java logging library. The vulnerability existed for years in a library that was a transitive dependency of thousands of applications. When disclosed, many organisations could not even determine whether they were affected, because they didn't know Log4j was buried in their dependency tree.

xz-utils (2024)

A threat actor spent years building trust as a maintainer of the xz compression library — a critical component in virtually every Linux distribution. After gaining commit access through sustained social engineering, they injected a sophisticated backdoor into the library. The attack targeted OpenSSH authentication and was discovered by accident when a developer noticed unusual performance characteristics. The code had already been included in several Linux distribution pre-release builds.

The pattern: SolarWinds attacked the build process. Log4Shell exploited a hidden transitive dependency. xz-utils compromised a trusted maintainer. Three different vectors, one lesson: your software supply chain is an attack surface, and you cannot secure it by trusting people or processes you don't verify.

Software Bill of Materials (SBOM)

An SBOM is a comprehensive inventory of every software component in your application — direct dependencies, transitive dependencies, their versions, licences, and origins. It answers the question Log4Shell made urgent: what's actually in our software?

The US Executive Order 14028 on Improving Cybersecurity 3 requires SBOMs for federal software procurement. CISA's 2025 minimum elements 4 for an SBOM include: author, supplier, component name, version, dependencies, unique identifier, and timestamp.

Two standard formats dominate:

Format Origin Best For
SPDX Linux Foundation Licence compliance + security
CycloneDX OWASP Security-focused, includes vulnerability data

Generating an SBOM is now a single command in most ecosystems:

bash
# Node.js
npx @cyclonedx/cyclonedx-npm --output-file sbom.json

# Python
cyclonedx-py requirements --format json -o sbom.json

For legal SaaS platforms, the SBOM serves multiple purposes. Security teams use it to track which components have known vulnerabilities. Legal teams use it to verify licence compliance — an open-source library with an AGPL licence in your proprietary SaaS product is a legal risk, not just a technical one. And when a new vulnerability is disclosed, the SBOM lets you answer "are we affected?" in minutes instead of days.

Dependency Scanning — Automated Vigilance

An SBOM tells you what you have. Dependency scanning tells you what's wrong with it. Tools like Dependabot 5, Snyk 6, and OSV (Open Source Vulnerabilities) 7 continuously monitor your dependencies against vulnerability databases and alert you — or automatically create pull requests — when a vulnerability is found.

The Practical DevSecOps guide to SBOM vs SLSA 8 emphasises that dependency scanning must be continuous, not one-time: "An SBOM generated at build time captures a snapshot. Continuous scanning catches vulnerabilities discovered after deployment."

A practical dependency scanning policy:

  1. Automated PR updates — tools like Dependabot create pull requests for dependency updates. Review and merge them promptly.
  2. Vulnerability thresholds — block deployments with critical or high CVEs. Set deadlines for medium CVEs.
  3. Licence scanning — flag dependencies with incompatible licences before they reach production.
  4. Transitive dependency auditing — don't just scan your direct dependencies. Scan the full tree. Log4Shell was a transitive dependency in most affected applications.

Lock Files and Reproducible Builds

A lock file (e.g., `package-lock.json` for npm, `poetry.lock` for Python, `Cargo.lock` for Rust) records the exact version of every dependency — direct and transitive — that was used when the application was last built and tested. Without a lock file, running `npm install` on two different machines might install different dependency versions, because version ranges (`^1.2.3`) allow minor and patch updates.

This is not just a reliability concern. It is a security concern. If an attacker publishes a malicious version of a dependency that falls within your version range, and your build process does not use a lock file, the malicious version can be pulled in silently.

Always commit your lock files to version control. Always use deterministic install commands (`npm ci`, not `npm install`) in your CI/CD pipeline. This ensures that you deploy exactly what you tested — not whatever the latest published version happens to be.

Build Provenance — SLSA and Signed Attestations

SBOMs tell you what is in the software. SLSA (Supply-chain Levels for Software Artifacts) 9 tells you how the software was built — and whether you can trust that the build process was not tampered with. SLSA defines four levels of build integrity:

Level Requirements What It Proves
SLSA 1 Documentation of the build process You know how it was built
SLSA 2 Build service generates signed provenance Tamper-evident build record
SLSA 3 Hardened build platform, non-falsifiable provenance Build process itself is protected
SLSA 4 Two-person review, hermetic builds Highest assurance of build integrity

SLSA Level 2 is achievable for most teams in two to four weeks 1 using hosted build services like GitHub Actions or Google Cloud Build. At Level 2, the build service generates a signed provenance attestation — a cryptographic document recording what source code was built, by which build system, producing which artifacts. This is the build-process equivalent of the AI output provenance chains we discussed in Episode 43.

Sigstore 10 provides the infrastructure for keyless signing of both build provenance and artifacts. The build system authenticates via its OIDC identity (the same OpenID Connect we covered in Episode 20), receives a short-lived certificate from Fulcio (Sigstore's certificate authority), signs the provenance attestation, and records the signature in Rekor (Sigstore's tamper-evident transparency log). No long-lived keys to manage, rotate, or leak.

The Legal Exposure

When a dependency in your legal SaaS platform has a known vulnerability and you shipped it anyway, the question is no longer just technical — it's legal. Research on supply chain security obligations 11 notes that awareness of a vulnerability coupled with failure to remediate creates a duty-of-care exposure. If a breach exploits a CVE that was publicly disclosed months before your patch, your response to "why wasn't this fixed?" needs a better answer than "we didn't know it was in our dependency tree."

ABA Model Rule 1.6(c) requires reasonable efforts to prevent unauthorised access to client information. Running a legal SaaS platform with known, unpatched vulnerabilities in your dependencies is difficult to characterise as "reasonable efforts." An SBOM and continuous dependency scanning are your evidence that you took the supply chain seriously.

Key takeaway: You own the security of every line of code in your application — including the code you didn't write. SBOMs give you visibility. Dependency scanning gives you alerts. Lock files give you reproducibility. SLSA and Sigstore give you build provenance. Together, they transform your supply chain from a blind spot into a managed risk. Without them, you are shipping software you cannot fully describe, built from components you cannot fully verify.

What's Next

Next episode, we look at environment configuration and secure defaults — how to ensure that the difference between your staging and production environments is credentials and scale, not security controls.

Sources & references

  1. Software Supply Chain Security in 2025: SBOMs, SLSA & Sigstore — Faith Forge Labs
  2. CVE-2021-44228 (Log4Shell) — National Vulnerability Database
  3. Executive Order 14028 — Improving the Nation's Cybersecurity — NIST
  4. Software Bill of Materials — CISA
  5. Dependabot — GitHub
  6. Snyk — Developer-First Security
  7. OSV — Open Source Vulnerabilities
  8. SBOM vs SLSA: Software Supply Chain Security Comparison — Practical DevSecOps
  9. SLSA — Supply-chain Levels for Software Artifacts
  10. Sigstore Documentation
  11. Software Supply Chain Security After SolarWinds and XZ Utils — SoftwareSeni
  12. SLSA Framework: The Definitive Guide — Practical DevSecOps