---
title: "Code and the software supply chain"
description: "Open source dependencies, CVEs, SCA and SAST, SBOMs, secrets, supply chain attacks, SLSA, Sigstore and the Cyber Resilience Act, explained simply."
url: https://krakenshield.eu/knowledge/a-to-z/12-code-and-software-supply-chain/
lang: en
updated: 2026-10-02
publisher: KrakenShield (KRAKEN HOLDING SAS)
overview: https://krakenshield.eu/llms.txt
---
# Code and the software supply chain
> Open source dependencies, CVEs, SCA and SAST, SBOMs, secrets, supply chain attacks, SLSA, Sigstore and the Cyber Resilience Act, explained simply.

Protecting your systems Chapter 12

Open source dependencies, CVEs, SCA and SAST, SBOMs, secrets, supply chain attacks, SLSA, Sigstore and the Cyber Resilience Act, explained simply.

## What you will learn

- Understand why open source dependencies are a risk in their own right
- Tell SCA, SAST, DAST and IAST apart, and know when to use each
- Produce and use an SBOM in CycloneDX or SPDX format
- Learn the lessons of Log4Shell, SolarWinds, xz-utils and poisoned packages
- Prioritise fixes with CVSS, EPSS and the KEV catalogue
- Know what the Cyber Resilience Act requires of software vendors

## Your software is mostly other people’s code

When a team builds an application, it does not write everything itself. It assembles open source libraries: a module to handle dates, another to generate PDFs, a complete web framework. Each of these dependencies pulls in others (“transitive” dependencies), so a modern application routinely ships hundreds of components, most of which nobody ever consciously chose.

That is a strength: nobody reinvents the wheel. It is also a risk: a flaw in a small library used everywhere becomes a flaw in thousands of companies at the same moment. And an attacker who poisons a popular component gets into everyone who installs it.

> **Nestor Former hacker turned defender:** In my day, we went after companies one at a time. Today the smartest attackers go after what everyone downloads: one door, and thousands of houses behind it.

## Vulnerabilities, CVEs and patches

When a flaw is discovered in a piece of software, it receives a unique identifier, a [CVE](https://krakenshield.eu/knowledge/glossary/cve/) (for example CVE-2021-44228). That number lets everyone talk about the same flaw: the vendor publishing the fix, the tool detecting it, the team that has to apply it. CVEs are listed in public databases, including the US NVD and, since May 2025, the European Vulnerability Database (EUVD) run by ENISA.

The cycle looks simple: the flaw is reported, the vendor publishes a fix, you apply it. Everything hinges on the last step. To apply a patch, you first need to know that you use the affected component, where, and in which version.

### Log4Shell, the lesson of 2021

On 24 November 2021, an Alibaba Cloud engineer reported a flaw to the Apache Software Foundation in Log4j, a Java logging library found in a vast amount of software. Made public on 9 December, the flaw, nicknamed Log4Shell, let an unauthenticated remote attacker take control of a machine. The fix came out the next day, but exploitation started straight away: five days later, Cloudflare was seeing 400 attempts per second. Then the real headache began, as thousands of companies discovered they had no idea where Log4j was hiding in their systems.

33,000 hours

*spent by a single US federal department responding to Log4j*

Source: Cyber Safety Review Board, July 2022 report

In its report, the US Cyber Safety Review Board described Log4j as an “endemic vulnerability”: vulnerable versions will remain in use for many years to come, perhaps a decade or longer.

## SCA, SAST, DAST, IAST: four ways to look

[SCA](https://krakenshield.eu/knowledge/glossary/sca/) (software composition analysis) and [SAST](https://krakenshield.eu/knowledge/glossary/sast/) (static analysis) examine the code before it goes live. [DAST](https://krakenshield.eu/knowledge/glossary/dast/) (dynamic analysis, see chapter 11) and IAST (interactive analysis) observe the running application.

| Method | What it examines | What it finds | What it misses |
| --- | --- | --- | --- |
| SCA | The list of your dependencies and their versions | Vulnerable components, problematic licences | Flaws in your own code |
| SAST | Your source code, without running it | Injection, secrets, bad practices, as code is written | Configuration issues; produces false positives |
| DAST | The running application, from the outside | What an attacker actually sees | The exact place in the code at fault |
| IAST | The application from the inside, during testing | Flaws actually reached, with the line of code | Whatever the tests do not exercise |

The four complement each other. For a small or mid-sized company, a sensible order of battle is SCA first (fast, few false positives, immediate gains), then secret detection, then SAST, then DAST. This is the principle behind KrakenShield’s code analysis: an agent installed on your premises runs SCA and SAST and produces the SBOM, without your source code ever leaving the company.

## The SBOM: the list of ingredients

An [SBOM](https://krakenshield.eu/knowledge/glossary/sbom/) (software bill of materials) is the equivalent of the ingredients list on a packet of biscuits. For each component it records the name, version, supplier, a cryptographic hash, the licence and the dependency relationships. With an up-to-date SBOM, the question “are we affected by Log4Shell?” is settled with a search, not three weeks of investigation.

Two formats dominate:

- **CycloneDX** , backed by OWASP and standardised by Ecma International (ECMA-424), which can also describe SaaS services, hardware or AI models;
- **SPDX** , backed by the Linux Foundation and now the international standard ISO/IEC 5962:2021.

An SBOM is complemented by a VEX document, which states whether a vulnerability present in a component is actually exploitable in your product. In September 2025, CISA, the NSA and 19 international cybersecurity organisations published a shared vision of the SBOM, describing it as software’s “ingredients list”.

> **Tip**
> Tip
> 
> **Ask your suppliers for an SBOM.** For every critical piece of software you buy, require in the contract an up-to-date SBOM with every release, in CycloneDX or SPDX format. The day a major flaw breaks, you will know within minutes which products are affected.

## Secrets in the code

Database password, API key, cloud token: a secret written into code sooner or later ends up in a Git repository, a backup, a developer’s laptop, and sometimes a public repository.

28.6 million

*new secrets detected in public GitHub commits in 2025, up 34% in a year*

Source: GitGuardian, State of Secrets Sprawl 2026

Worse, according to the same study, 64% of the secrets found in 2022 were still valid four years later. Good [secrets management](https://krakenshield.eu/knowledge/glossary/secrets-management/) habits:

- keep secrets in a dedicated vault that supplies them to the application at run time;
- stop secrets before they leave, with an automatic check on every commit;
- if a secret leaks, **revoke and replace** it: deleting the commit is not enough, as the history and copies keep it;
- prefer short-lived credentials, for example identity federation between your CI pipeline and your cloud.

## When the attack comes through your suppliers

A [supply chain attack](https://krakenshield.eu/knowledge/glossary/supply-chain-attack/) does not target your code but what you receive in good faith: an update, a library, a build tool.

### SolarWinds (2020)

From February 2020, attackers attributed to Russia’s foreign intelligence service slipped malicious code into updates of Orion, SolarWinds’ IT monitoring software. Nearly 18,000 customers received a compromised update, distributed by the vendor itself. The security firm FireEye spotted the intrusion at the end of 2020, and the US cybersecurity agency CISA issued an emergency directive on 13 December 2020.

### xz-utils (2024)

On 29 March 2024, engineer Andres Freund noticed that SSH logins on his test machine were using too much CPU and taking about half a second longer. Digging deeper, he found a backdoor in xz-utils, a compression library present in almost every Linux distribution. The malicious code, hidden in test files and in the release archives of versions 5.6.0 and 5.6.1, had been introduced by a contributor who had patiently earned the project’s trust for more than two years. The chance discovery came before those versions reached most stable distributions.

### Poisoned npm and PyPI packages

Public package registries (npm for JavaScript, PyPI for Python) have become prime targets:

- in September 2025, the Shai-Hulud worm compromised more than 500 npm packages. It stole developers’ GitHub tokens and cloud keys, published them, then used the stolen access to inject itself automatically into other packages;
- in March 2026, attackers rewrote 76 of the 77 version tags of the GitHub Action for Trivy, a widely used open source vulnerability scanner. The pipelines using it ran, before the normal scan, a program that stole their secrets. According to PyPI, a token exposed by this attack was used to publish poisoned versions of the Python library litellm, downloaded more than 119,000 times in two and a half hours before being quarantined;
- other attacks bet on typos: a package with a name almost identical to a popular one waits for a developer’s slip.

> **Nestor Former hacker turned defender:** Why force a hundred doors when you can poison the well everyone drinks from? And the Trivy affair proves it: even the security tool can be the Trojan horse.

## Defending yourself: provenance, signing and hygiene

- **SLSA** (Supply-chain Levels for Software Artifacts, pronounced “salsa”) is an OpenSSF framework that defines increasing levels of assurance about how software is built: automated, isolated builds, and a provenance attestation proving which source code produced which binary.
- **Sigstore** lets you sign software without managing a long-lived private key: a short-lived certificate is tied to the signer’s identity, and every signature is recorded in a public transparency log. npm, PyPI, Maven Central and Kubernetes rely on it.
- **Day-to-day dependency hygiene** :
  
  - lock files with hashes, so you install exactly what was tested;
  - CI actions pinned to a commit hash rather than a version tag that can be moved (the Trivy lesson);
  - a delay of a few days before adopting a brand-new version, as PyPI recommends;
  - publishing your own packages with short-lived credentials, and MFA on registry accounts;
  - fewer dependencies: every component you add is one more supplier.

## Prioritising: CVSS, EPSS and KEV

No team can fix everything at once. Three indicators help you choose. The [CVSS score](https://krakenshield.eu/knowledge/glossary/cvss/) measures a flaw’s technical severity from 0 to 10; version 4.0 dates from November 2023. It does not measure risk: the specification itself invites you to combine it with each organisation’s context. [EPSS](https://krakenshield.eu/knowledge/glossary/epss/), published daily by FIRST, estimates the probability that a CVE will be exploited in the next 30 days. Finally, CISA’s [KEV](https://krakenshield.eu/knowledge/glossary/kev/) catalogue lists flaws whose exploitation has been confirmed: more than 1,700 at the start of October 2026.

A simple method:

1. first the flaws listed in KEV, starting with internet-facing systems;
2. then those with a high EPSS;
3. then critical and high CVSS scores;
4. always taking context into account: is the vulnerable function actually called? Can the system be reached from outside?

## The Cyber Resilience Act: what changes for vendors

The [Cyber Resilience Act](https://krakenshield.eu/knowledge/glossary/cyber-resilience-act/) (Regulation (EU) 2024/2847) sets cybersecurity requirements for products with digital elements sold in the EU: software, connected devices, equipment. It entered into force on 10 December 2024 and applies in two stages:

- **since 11 September 2026** , manufacturers must report any actively exploited vulnerability and any severe incident affecting their products, through ENISA’s single reporting platform: an early warning within 24 hours, a notification within 72 hours, then a final report no later than 14 days after a fix becomes available (one month after the notification for a severe incident);
- **from 11 December 2027** , all requirements apply, with CE marking: security by default, free security updates throughout the support period (as a rule at least five years), vulnerability handling, a coordinated disclosure policy, and an SBOM covering at least top-level dependencies.

Fines can reach €15 million or 2.5% of worldwide turnover. A pure SaaS service generally falls under NIS2 rather than the CRA.

> **What the law says**
> What the law says
> 
> **In France, an obligation already exists.** Article L2321-4-1 of the French Defence Code, introduced by the 2023 military programming law, requires software publishers to notify ANSSI, the national cybersecurity agency, of significant vulnerabilities affecting their products, and of incidents likely to affect them significantly. The CRA adds to this at European level.

## DevSecOps: shifting security left

[DevSecOps](https://krakenshield.eu/knowledge/glossary/devsecops/) means building security into every stage of development, rather than bolting it on just before release. People speak of “shifting left”: on a timeline running from design (on the left) to operations (on the right), you move checks to the left, where a fix costs minutes rather than weeks.

| Stage | Security check |
| --- | --- |
| Design | Threat modelling, OWASP ASVS requirements |
| Writing code | Analysis in the editor, secret detection before commit |
| Review | Peer review, SAST on every merge request |
| Continuous integration | SCA that blocks on KEV-listed flaws, SBOM generation |
| Pre-production | DAST, access control tests |
| Production | Watch for new CVEs in SBOM components, patching, logging |

NIST’s Secure Software Development Framework (SSDF, publication SP 800-218) organises these practices: a good basis for structuring your approach without starting from scratch.

> **Nestor Former hacker turned defender:** A flaw stopped by an automatic check before the code is merged is a flaw I will never find in a penetration test. Believe me, it’s the best way to put me out of a job.

## Key takeaways

1. A modern application is mostly other people’s code: without an inventory (SBOM), you cannot quickly tell whether a flaw affects you.
2. SCA, SAST, DAST and IAST complement each other: each one sees what the others miss.
3. A secret published in a repository must be revoked and replaced: deleting the commit is not enough.
4. Prioritise with the KEV catalogue and EPSS, not just the CVSS score: an exploited flaw comes before a theoretical one.
5. Since 11 September 2026, the Cyber Resilience Act has required manufacturers to report actively exploited vulnerabilities in their products within 24 hours.

## Were you paying attention?

Three questions to check, no score, no account.

## Sources

- [Regulation (EU) 2024/2847, Cyber Resilience Act, EUR-Lex](https://eur-lex.europa.eu/eli/reg/2024/2847/oj)
- [European Commission, Cyber Resilience Act summary](https://digital-strategy.ec.europa.eu/en/policies/cra-summary)
- [ENISA, The CRA Single Reporting Platform is launched](https://www.enisa.europa.eu/news/the-cra-single-reporting-platform-is-launched)
- [Légifrance, French Defence Code, Article L2321-4-1 (in French)](https://www.legifrance.gouv.fr/codes/article_lc/LEGIARTI000047920584)
- [Cyber Safety Review Board, Review of the December 2021 Log4j Event (July 2022)](https://www.cisa.gov/sites/default/files/publications/CSRB-Report-on-Log4-July-11-2022_508.pdf)
- [GAO, SolarWinds Cyberattack Demands Significant Federal and Private-Sector Response (April 2021)](https://www.gao.gov/blog/solarwinds-cyberattack-demands-significant-federal-and-private-sector-response-infographic)
- [CISA, Reported Supply Chain Compromise Affecting XZ Utils, CVE-2024-3094 (March 2024)](https://www.cisa.gov/news-events/alerts/2024/03/29/reported-supply-chain-compromise-affecting-xz-utils-data-compression-library-cve-2024-3094)
- [CISA, Widespread Supply Chain Compromise Impacting npm Ecosystem (September 2025)](https://www.cisa.gov/news-events/alerts/2025/09/23/widespread-supply-chain-compromise-impacting-npm-ecosystem)
- [PyPI, Incident report: LiteLLM/Telnyx supply-chain attacks (April 2026)](https://blog.pypi.org/posts/2026-04-02-incident-report-litellm-telnyx-supply-chain-attack/)
- [Aqua Security, Trivy supply chain attack: what you need to know (2026)](https://www.aquasec.com/blog/trivy-supply-chain-attack-what-you-need-to-know/)
- [CISA, Known Exploited Vulnerabilities (KEV) Catalog](https://www.cisa.gov/known-exploited-vulnerabilities-catalog)
- [FIRST, Exploit Prediction Scoring System (EPSS)](https://www.first.org/epss/)
- [CISA, NSA and partners, A Shared Vision of SBOM for Cybersecurity (September 2025)](https://www.cisa.gov/resources-tools/resources/shared-vision-software-bill-materials-sbom-cybersecurity)
- [OpenSSF, SLSA (Supply-chain Levels for Software Artifacts)](https://slsa.dev/)
- [GitGuardian, State of Secrets Sprawl 2026](https://www.gitguardian.com/state-of-secrets-sprawl-report-2026)

## Preparing for the CISSP?

This chapter is a foundation for domains 6 and 8 of our CISSP preparation, which adds everything else the exam asks for.

[All chapters](https://krakenshield.eu/knowledge/a-to-z/)
