Most organisations pull open source packages straight from public registries into developer laptops and CI runners, so a single typosquatted, hijacked or confused dependency can execute code inside the build with access to every secret it holds. The Secure Supply Chain Consumption Framework (S2C2F), maintained in the OpenSSF Supply Chain Integrity Working Group, defines how to consume open source safely: eight practices, 25 requirements and four maturity levels, each tied to real attack types. This guide explains every requirement, how to assess your maturity, how to implement Levels 1 to 3 in a typical enterprise, and how S2C2F relates to SLSA and the OSPS Baseline. It is for AppSec, developer platform and open source programme teams. For the wider landscape see the Software Supply Chain Levels Comparison.
Key takeaways
- S2C2F is about consumption, not production. Its FAQ is explicit that it does not cover securing your DevOps workflows, build infrastructure, your own code or containers; it covers how OSS dependencies such as npm, PyPI, Maven and NuGet packages enter your workflow.
- Control the front door first. Levels 1 and 2 (repository manager, scanning, inventory, automated updates, locked package source configuration, integrity checks) remove most of the everyday risk.
- Level 3 is where malicious packages are stopped. Malware scanning, deny lists, provenance verification and an enforced curated feed address typosquatting, account takeover and dependency confusion.
- Level 4 is for crown jewels. The specification calls rebuilding OSS in a trusted environment an aspirational north star; apply it to your most critical dependencies only.
- Know its status. The specification's change record ends at v1.1 (October 2022). It remains a Working Group activity, and the SLSA working draft's Dependency Track now builds on its attestable requirements.
What S2C2F is and where it came from
S2C2F began at Microsoft and was contributed to the OpenSSF in 2022; the specification's change record shows v1.0 on 1 August 2022 and v1.1 on 19 October 2022, when references to the "Microsoft OSS SSC Framework" were replaced. The FAQ describes three core concepts: control all artifact inputs, continuous process improvement, and scale. The specification is licensed under the Community Specification License 1.0 and is split into a solution-agnostic set of practices and a maturity-based implementation guide with example tools.
- Status checked 27 October 2026: the OpenSSF Supply Chain Integrity Working Group README lists S2C2F among its activities. It does not appear in the OpenSSF TAC projects table or on the openssf.org projects page, and the GitHub repository's most recent commit was in May 2025. Treat it as a stable, published practice model rather than a fast-moving specification.
- Relationship to SLSA: the S2C2F FAQ calls it a bridge to producer-focused frameworks such as SLSA. The SLSA working draft (not yet released) defines a Dependency Track whose Dependency Ingestion Provenance imports the attestable subset of S2C2F requirements and refers organisational ones to the OSPS Baseline.
The eight practices and 25 requirements
| Practice | ID | Level | Requirement (from the specification) |
|---|---|---|---|
| Ingest it | ING-1 | L1 | Use public package managers trusted by your organisation |
| ING-2 | L1 | Use an OSS binary repository manager solution | |
| ING-3 | L3 | Have a deny list capability to block known malicious OSS from being consumed | |
| ING-4 | L3 | Mirror a copy of all OSS source code to an internal location | |
| Scan it | SCA-1 | L1 | Scan OSS for known vulnerabilities |
| SCA-2 | L1 | Scan OSS for licences | |
| SCA-3 | L2 | Scan OSS to determine if it is end-of-life | |
| SCA-4 | L3 | Scan OSS for malware | |
| SCA-5 | L3 | Perform proactive security analysis of OSS | |
| Inventory it | INV-1 | L1 | Maintain an automated inventory of all OSS used in development |
| INV-2 | L2 | Have an OSS incident response plan | |
| Update it | UPD-1 | L1 | Update vulnerable OSS manually |
| UPD-2 | L2 | Enable automated OSS updates | |
| UPD-3 | L2 | Display OSS vulnerabilities in the developer contribution flow (pull requests); prerequisite: two-person PR reviews enforced | |
| Audit it | AUD-1 | L3 | Verify the provenance of your OSS |
| AUD-2 | L2 | Audit that developers consume OSS through the approved ingestion method | |
| AUD-3 | L2 | Validate integrity of the OSS you consume into your build | |
| AUD-4 | L4 | Validate SBOMs of OSS you consume into your build | |
| Enforce it | ENF-1 | L2 | Securely configure package source files (nuget.config, .npmrc, pip.conf, pom.xml) |
| ENF-2 | L3 | Enforce usage of a curated OSS feed that enhances trust | |
| Rebuild it | REB-1 | L4 | Rebuild OSS in a trusted build environment, or validate it is reproducibly built |
| REB-2 | L4 | Digitally sign the OSS you rebuild | |
| REB-3 | L4 | Generate SBOMs for OSS you rebuild | |
| REB-4 | L4 | Digitally sign the SBOMs you produce | |
| Fix it and upstream | FIX-1 | L4 | Fix a zero-day in the code, rebuild, deploy internally and confidentially contribute the fix upstream |
The four maturity levels
- Level 1: the specification describes this as the most common set of OSS security capabilities today: a package caching solution, an OSS inventory, plus scanning and updating.
- Level 2: shift left by securing ingestion configuration, cutting time to patch and responding to incidents. The specification uses the 2020 SaltStack vulnerability, exploited within three days of disclosure, to argue for automated updates.
- Level 3: proactive security analysis of your most used OSS and reduced risk of consuming malicious packages, with malware scanning before packages are downloaded.
- Level 4: rebuild OSS on trusted infrastructure to defend against build-time attacks by sophisticated adversaries. The specification says it has a high cost relative to risk at scale and is feasible for the most critical dependencies of the most critical projects.
The specification notes that different projects may sit at different levels. Set a target level per system class (for example, Level 2 everywhere, Level 3 for production build systems, Level 4 for a handful of critical components) rather than one organisation-wide number.
Threats S2C2F is designed against
The specification maps each threat to requirements and the level that first mitigates it. A selection, with the S2C2F mapping:
| Threat | S2C2F requirements | Level |
|---|---|---|
| Accidental vulnerabilities in inherited OSS | UPD-2, UPD-3 | L2 |
| Compromised distribution mirror | AUD-3 | L2 |
| Dependency confusion and package substitution | ENF-1, ENF-2 | L3 |
| Typosquatted lookalike packages | AUD-1, ENF-2, SCA-4 | L3 |
| Package manager account takeover with no change to the source repository | AUD-1, ENF-2, SCA-4 | L3 |
| New malicious transitive dependency added | SCA-4, ENF-2 | L3 |
| Upstream package removed (left-pad style) | ING-2, ING-4 | L3 |
| End-of-life components no longer patched | SCA-3 | L2 |
| Compiler or build-time compromise upstream | REB-1 | L4 |
| Package tampered after build, before consumption | AUD-3, AUD-4 | L4 |
| Upstream fix not available in time | FIX-1 | L4 |
| Upstream relicensing | SCA-2 | L1 |
The pattern of recent incidents fits this table. In the ChainDrop npm worm, a hijacked maintainer account pushed a poisoned release through the project's own workflow, and a preinstall script stole CI and cloud credentials before republishing to hundreds of packages. Provenance alone did not help, because the build path was legitimate; malware scanning (SCA-4), a curated feed with a delay on new versions (ENF-2) and a fast incident plan (INV-2) are the controls that limit the blast radius. See the Malicious Package and Dependency Confusion Guide.
Implementing Levels 1 and 2
- Stand up a repository manager (ING-2): proxy npm, PyPI, Maven Central, NuGet and container registries through one internal service so every download is logged, cached and policy-controlled. This also keeps builds working if an upstream package disappears.
- Point every client at it (ENF-1): commit
.npmrc,pip.conf,nuget.config, Mavensettings.xmland Gradle repository settings that name only the internal source. The specification cites NuGet package source mapping, a single upstream feed, and version pinning with lock files as ways to block dependency confusion. Avoid mixing an internal index with a public one in the same resolver configuration. - Use lock files and verify hashes (AUD-3):
package-lock.json,packages.lock.json, hash-pinned Python requirements and Go checksums let the package client validate integrity. The specification notes this is usually performed by the language package client, so the job is making sure it is on and not bypassed. - Scan for vulnerabilities, licences and end-of-life (SCA-1, SCA-2, SCA-3): use a software composition analysis tool that pulls from more sources than CVEs alone, and flag unmaintained or end-of-life components. OpenSSF Scorecard's maintained check is one signal the reference implementation suggests for SCA-3.
- Automate inventory (INV-1): build the inventory from dependency graphs or SBOMs generated in CI, so you can answer "who uses package X version Y" in minutes. See the SBOM Guide.
- Automate updates (UPD-2, UPD-3): enable automated dependency update pull requests and show vulnerability findings in the pull request, with two-person review enforced as the specification's prerequisite. See the Dependency Update Automation Guide.
- Find bypasses (AUD-2): search repositories for vendored binaries and copied source, and alert on builds that reach public registries directly rather than through the repository manager.
- Write the OSS incident plan (INV-2): who decides to block a package, how to purge it from caches, developer machines and production, how to roll back versions, and which credentials to rotate. The Malicious Open Source Package Response Playbook is a ready starting point.
Implementing Level 3
- Malware scanning before download (SCA-4): scan new package versions at the repository manager, not after install. Install scripts (
preinstall,postinstall) and obfuscated code in new releases are strong signals. The S2C2F GitHub reference implementation points to OpenSSF Package Analysis as an example of dynamic analysis. - Deny list (ING-3): the ability to block a named package or version across the organisation within minutes, fed by threat intelligence and the OpenSSF Malicious Packages data where useful.
- Curated feed (ENF-2): developers and CI consume only from a feed that applies policy: malware verdicts, allow and deny lists, metadata checks and, commonly, a cooling-off period before brand new versions become available. The specification says developers should not be allowed to consume OSS outside the curated feed.
- Provenance verification (AUD-1): check that a package traces back to its claimed repository, using registry provenance attestations where ecosystems provide them. See the npm Trusted Publishing and Provenance Guide and the Sigstore Guide. Remember ChainDrop: provenance proves the build path, not that the publishing identity was safe.
- Source mirroring and proactive analysis (ING-4, SCA-5): mirror source for your most used components and run static analysis, fuzzing or manual review, disclosing findings responsibly upstream.
Level 4 and the rebuild decision
Rebuilding OSS (REB-1 to REB-4) mitigates build-time attacks of the kind seen at CCleaner and SolarWinds, and the gap between reviewed source and shipped artifacts. The XZ Utils backdoor lived in release tarballs and build macros rather than the public git source, which is exactly the gap that rebuilding from source, or confirming a reproducible build, closes. The cost is real: you take on build maintenance, signing and SBOM generation for every rebuilt component. Choose candidates by criticality and exposure, for example cryptographic libraries, compression libraries linked into network daemons, and components in your release toolchain.
- Decision guide: rebuild when a component runs with high privilege or handles untrusted input in production, has a small maintainer base, and has artifacts that differ from tagged source. Otherwise verify provenance and hashes and rely on Level 3 controls.
- FIX-1: keep a documented path to patch, rebuild and deploy a private fix for a critical zero-day, with confidential upstream disclosure, and remove the fork once upstream releases.
Where identity fits
S2C2F controls protect the build, and the build is full of machine identities. The Codecov breach shows why: a tampered CI script sent every environment variable, including API tokens, cloud keys and signing keys, to an attacker, and was caught only when a customer checked the published checksum, which is the AUD-3 integrity control in action. Limit the secrets available to dependency installation steps, run installs without network credentials where possible, prefer short-lived federated tokens for CI, and inventory every identity that can publish packages or change repository manager policy. See the CI/CD Pipeline Identity Security Guide.
Assessing your maturity
The specification recommends assessing at organisation level, across a diverse sample of development teams, in three steps: prepare, perform the assessment through interviews, and plan improvements by standardising process and tooling. Its 21 example questions include:
- How do you consume OSS (package cache,
curl,git clone, checked-in code) and from where? - Do you mix internal-only and external packages, or list multiple feeds in one package source file? Both increase dependency confusion exposure.
- Do you use lock files? How do you inventory OSS, and when in the life cycle do vulnerabilities surface?
- What is your mean time to remediate, and is updating manual or automated?
- Do you scan for malware before use, can you block a known-bad package, and do you clone or rebuild OSS internally?
- Do you have an incident response plan for consuming a malicious component?
Score each team per requirement, take the lowest fully met level as that team's level, and report the distribution rather than an average.
Measuring progress
| Metric | Requirement | Target direction |
|---|---|---|
| Share of package downloads served through the repository manager | ING-2, ENF-2, AUD-2 | 100% for CI; rising for developer machines |
| Repositories with locked package source configuration and lock files | ENF-1, AUD-3 | 100% |
| Median time to remediate critical OSS vulnerabilities | UPD-2 | Falling, within policy SLA |
| Time from malicious package disclosure to organisation-wide block | ING-3, INV-2 | Minutes to hours |
| Components in inventory with end-of-life status | SCA-3 | Falling |
| Critical components with verified provenance or rebuilt from source | AUD-1, REB-1 | Rising |
Framework mapping
| S2C2F requirement | Mapping published in the S2C2F appendix |
|---|---|
| SCA-1 | NIST SP 800-218 RV.1.1; SP 800-161 SA-10, SR-3, SR-4; OWASP SCVS 5.4 |
| SCA-3 | SP 800-218 PW.4.1 |
| SCA-5 | SP 800-218 PW.4.4 |
| INV-2 | SP 800-218 RV.2.2 |
| AUD-1 | SLSA v1.0 distribute provenance; OWASP SCVS 1.10, 6.1 |
| ENF-1, ENF-2 | SP 800-218 PO.5.2 |
| REB-2, REB-3 | SP 800-218 PS.2.1, PS.3.2 |
Beyond the published mappings, S2C2F supports NIST CSF 2.0 GV.SC (Cybersecurity Supply Chain Risk Management), SP 800-53 SR-4 Provenance and SR-11 Component Authenticity, ISO/IEC 27001:2022 A.5.21 Managing information security in the ICT supply chain, and CIS Controls v8.1 Control 16 Application Software Security. In MITRE ATT&CK the consumer-side threat is T1195.001 Compromise Software Dependencies and Development Tools.
Common failure patterns
- Repository manager without enforcement: a proxy exists, but CI images and developer machines still resolve directly from public registries.
- Mixed feeds: internal and public indexes in the same resolver configuration, the classic dependency confusion setup that ENF-1 targets.
- Scanning after install: malware checks run in the pipeline after
npm installorpip installhas already executed install scripts with CI credentials in scope. - No block switch: no deny list, so a known malicious version keeps being served from cache for days while teams fix it one repository at a time.
- Provenance as proof of safety: treating a signed or provenance-backed release as safe when the publishing account itself was compromised.
- Level 4 everywhere, Level 2 nowhere: rebuilding a few components while basic configuration and update automation are missing across most teams.
Practitioner checklist
- Route all OSS consumption through a repository manager and block direct registry access from CI.
- Commit locked package source configuration and lock files in every repository.
- Run vulnerability, licence and end-of-life scanning with results shown in pull requests.
- Automate dependency updates with two-person review enforced.
- Maintain an automated, queryable OSS inventory built from CI.
- Write and exercise an OSS incident plan covering block, purge, roll back and credential rotation.
- Scan new versions for malware at the repository manager and keep an organisation-wide deny list.
- Enforce a curated feed with a cooling-off period for new releases on production build systems.
- Verify provenance where ecosystems offer it, and pick a short list of critical components for rebuild or reproducibility checks.
- Strip secrets from dependency installation steps and use short-lived CI credentials.
Standards and references
- OpenSSF: Secure Supply Chain Consumption Framework (S2C2F) Specification
- OpenSSF: S2C2F Frequently Asked Questions
- OpenSSF: S2C2F Suggested Reference Implementation for GitHub
- OpenSSF: Supply Chain Integrity Working Group
- OpenSSF: SLSA Working Draft Dependency Track
- NIST: SP 800-218 Secure Software Development Framework Version 1.1
Related NHI Mgmt Group resources: Software Supply Chain Levels Comparison · OWASP CI/CD Top 10 CICD-SEC-3 Dependency Chain Abuse Guide · Malicious Package and Dependency Confusion Guide · Software Supply Chain Maturity Model