Table of contents
TL;DR overview
What is the software supply chain?
Why do you need software supply chain security, and why is it important?
How can attackers use the supply chain in modern workflows?
What is an example of a software supply chain security attack?
How do software supply chain attacks cascade?
Why traditional AppSec misses modern supply chain attacks
Three entry points where your software supply chain can be exploited
Best practices to keep your software supply chain secure
How SonarQube helps secure the software supply chain
Start your free trial
Verify all code. Find and fix issues faster with SonarQube.
开始使用TL;DR overview
- Comprehensive protection: Software supply chain security protects the code, dependencies, credentials, tools, pipelines, and processes used to create and deliver software.
- Targeted attacks: Modern supply chain attacks increasingly target open-source packages, CI/CD workflows, exposed secrets, and AI-assisted development environments.
- Beyond CVEs: Traditional scanning is necessary but insufficient. It often misses malicious packages, misconfigured pipelines, hard-coded secrets, or unsafe interactions between application code and third-party libraries.
- Integrated approach: Strong security requires visibility, prevention, developer workflow integration, and continuous verification across the entire software development lifecycle.
What is the software supply chain?
The software supply chain includes every component, process, tool, and contributor involved in creating and delivering software. This includes the code developers write, the open-source packages they import, the package registries they rely on, the CI/CD systems that build and deploy applications, and the infrastructure and credentials used throughout the development lifecycle.
In modern software development, very little software is built entirely from scratch. Teams depend heavily on open-source libraries, third-party packages, build tools, container images, infrastructure-as-code files, and automated pipelines. These components accelerate delivery, but they also introduce risk from outside the organization’s direct control.
That complexity creates efficiency, but it also creates exposure. If one trusted component is compromised, the impact can spread far beyond the original project. A vulnerable library, leaked token, or insecure workflow can create risk across every software application that depends on it.
Why do you need software supply chain security, and why is it important?
Software supply chain security is vital because attackers no longer need to breach your application code directly to reach your users, data, or production systems. They can compromise something your software already trusts.
That trusted path might be an open-source dependency, a CI/CD pipeline workflow, a secret stored in code, or an AI coding assistant configuration file. Once attackers gain access to one part of the chain, they can use it to move downstream into builds, releases, and runtime environments.
The risk is broader than known vulnerabilities. While scanning for CVEs in legitimate packages is important, modern attacks often involve intentionally malicious packages, exposed secrets, or application code that interacts with third-party libraries in risky ways.
For organizations, the consequences can include credential theft, unauthorized access, and loss of customer trust. Software supply chain security reduces that risk by providing visibility, enforcing quality gates before risky code moves forward, and helping software developers fix issues early in their workflow.
How can attackers use the supply chain in modern workflows?
Modern software workflows are highly connected. Developers use open-source packages, automated CI/CD pipelines, cloud credentials, package registries, AI coding tools, and infrastructure-as-code templates every day. Attackers target these trusted workflows because compromising one link can create access to many downstream systems.
1. Compromising open-source packages
Attackers may publish malicious packages, compromise maintainer accounts, or insert backdoors into legitimate package updates. These packages can appear normal, pass tests, and continue to function while silently stealing credentials, opening remote access, or exfiltrating data. For example:
- Exploiting transitive dependencies: Most applications depend not only on direct dependencies, but also on transitive dependencies—the packages those packages depend on. Attackers can exploit vulnerabilities or malicious behavior deep in the dependency tree, where teams may have limited visibility. This makes dependency inventory and reachability analysis important. Not every vulnerability has the same impact; the real question is whether vulnerable code is actually present, reachable, and used by the application.
2. Stealing secrets from code and pipelines
Hard-coded secrets, API keys, tokens, database passwords, and cloud credentials are high-value targets. If a secret reaches a repository, pull request, CI/CD log, or build environment, attackers may be able to use it to access internal systems or publish malicious artifacts.
Once a secret is committed, deleting it from the visible file is not enough. Teams may need to revoke the credential, rotate it, investigate exposure, and remove it from Git history.
3. Abusing CI/CD misconfigurations
CI/CD pipelines often have access to source code, secrets, build artifacts, package publishing credentials, and deployment environments. Misconfigured workflows can give attackers a path to steal secrets, tamper with builds, or publish compromised packages.
Common risks include overly permissive workflow triggers, unpinned external actions, script injection, parameter injection, and unsafe execution of untrusted code.
4. Targeting AI-assisted development
AI coding tools introduce a new supply chain surface. Assistant configuration files, coding rules, local environment context, and generated code can all influence what enters the codebase.
Emerging risks include hidden instructions in AI coding assistant configuration files, unsafe generated code, risky dependency suggestions, and secret leakage through AI coding agents. These risks matter because AI tools can influence code generation at scale, sometimes before a human reviewer notices the issue.
5. Using trusted workflows to cascade the attack
The most damaging supply chain attacks are designed to cascade. Attackers look for a weak link, use it to reach a more valuable target, and then push malicious code through trusted systems.
That weak link might be a compromised package, a vulnerable build script, an exposed credential, a misconfigured pipeline, or an unreviewed package update. Once the attacker is inside the trusted workflow, the compromise can spread quickly across downstream applications and environments.
What is an example of a software supply chain security attack?
Software supply chain attacks have moved beyond the traditional hacks using vulnerabilities into more complex and sophisticated attacks. Here are two recent and significant examples of how these attacks manifest across the software supply chain:
The TeamPCP "Trivy" compromise: Exposure of customer "crown jewels"
While the attack targeted a software development tool, the actual victims were the millions of people whose data resided in the databases managed by those organizations.
- Direct customer risk: Because attackers stole "crown jewel" secrets like AWS access keys and database credentials, they gained the "keys to the kingdom." This gave unauthorized parties the ability to access, download, or delete private customer records, financial information, and personal identities stored in the cloud.
- Trust erosion: Thousands of organizations unknowingly ran poisoned code that sent their most sensitive administrative passwords to hackers. For the end customer, this meant their data was hosted in an environment where the "locks on the doors" had been handed directly to a criminal group (TeamPCP).
- Cascading service failures: As the attackers used stolen credentials to pivot into other major projects, customers experienced a "domino effect" of insecurity, where a breach in one service they used led to the compromise of several others.
The Axios npm compromise: Massive endpoint infection
This attack moved from a code library directly onto the personal and professional devices of end users worldwide.
- Device takeover: Because Axios is a foundational building block for millions of websites and apps, the "payload" was delivered directly to the systems of unsuspecting members of the public. Users who simply updated their software or visited affected platforms were exposed to a remote access trojan (RAT).
- Loss of privacy and control: For the end customer, this meant a total loss of digital privacy. A RAT allows attackers to spy through webcams, log keystrokes (stealing passwords and credit card numbers), and access local files on Windows, macOS, and Linux systems.
- Scale of impact: With 100 million weekly downloads, the "blast radius" for the public was unprecedented. Any customer using an application that failed to verify its updates became a potential target for identity theft and device hijacking, turning a standard software update into a personal security crisis.
How do software supply chain attacks cascade?
Software supply chain attacks are dangerous because they rarely stop at the first compromised component. Attackers target trusted parts of the development ecosystem—such as packages, build tools, CI/CD pipelines, secrets, or maintainer accounts—because those systems often connect to many downstream applications and environments.
Once a trusted component is compromised, the attack can spread through normal development and release workflows. A malicious package can be pulled into an application. A leaked token can unlock a build system. A poisoned CI/CD workflow can alter release artifacts. A compromised package maintainer account can push malicious updates to thousands of users.
This creates a cascade effect: one weak link can become a path into many repositories, applications, customers, and production systems.
Common cascade paths include:
- Dependency cascade: A malicious or vulnerable package is imported into one application, then spreads through shared libraries, templates, or downstream services.
- Transitive dependency cascade: A compromised package several layers deep in the dependency tree reaches applications that never directly selected it.
- Credential cascade: A hard-coded secret or leaked token gives attackers access to repositories, cloud systems, package registries, or CI/CD platforms.
- Pipeline cascade: A compromised build workflow modifies artifacts, injects malicious code, or publishes tampered releases.
- AI workflow cascade: Unsafe AI-generated code, poisoned instructions, or exposed context enters the codebase and scales across teams through repeated use.
The core risk is trust. Modern software delivery depends on trusted automation. When attackers compromise that trust, malicious changes can move quickly and quietly through the same systems teams use to ship code faster.
Why traditional AppSec misses modern supply chain attacks
Traditional application security was designed to find vulnerabilities in application code. That is still essential, but modern supply chain attacks often happen outside the boundaries of conventional AppSec.
A traditional AppSec program may scan for insecure coding patterns, known vulnerabilities, or runtime weaknesses. But supply chain attacks frequently involve risks that do not look like classic application vulnerabilities.
For example, a malicious package may not have a CVE assigned to it. A stolen token may not appear as a code vulnerability. A misconfigured CI/CD workflow may not be visible to a traditional SAST tool. A package may function correctly while also exfiltrating data. An AI coding assistant configuration file may introduce unsafe behavior without looking like normal source code.
This is why modern supply chain security needs broader coverage across code, dependencies, secrets, pipelines, and software developer workflows.
Traditional AppSec can miss supply chain risk because it often focuses on:
- Known vulnerabilities, not malicious intent: CVE scanning identifies vulnerable packages, but intentionally malicious packages may not appear in vulnerability databases.
- Application code, not build and release systems: Many attacks target CI/CD workflows, package publishing processes, and build artifacts rather than the application logic itself.
- Direct dependencies, not the full dependency graph: Risk can hide in transitive dependencies several layers deep.
- Post-commit scanning, not prevention: Finding secrets or malicious packages after they reach the repository may be too late. Teams may already need to rotate credentials, rewrite Git history, or investigate exposure.
- Security dashboards, not software developer workflows: If findings are surfaced too late or outside the developer’s workflow, issues are less likely to be fixed before code moves forward.
- Developer-authored code, not AI-influenced code: AI coding tools can generate code, suggest dependencies, expose context, or follow hidden instructions. These workflows need code verification just like human-written code.
Modern supply chain security does not replace AppSec. It extends it. Teams still need strong code security, but they also need controls that verify the components, credentials, automation, and AI-assisted workflows that shape how software is built and shipped.
What are the three entry points where your software supply chain can be exploited?
Attackers typically exploit the software supply chain through three major entry points: dependencies, credentials, and delivery workflows. Each one is trusted by development teams, deeply connected to the SDLC, and capable of creating downstream impact if compromised.
1. Dependencies: Open-source and third-party packages
Modern applications rely heavily on open source libraries, frameworks, package managers, container images, and third-party components. These dependencies help teams build faster, but they also create a direct path into the application.
Attackers can exploit this entry point :
This entry point is especially risky because software developers may trust packages by default, and a single dependency can be reused across many applications.
2. Credentials: Secrets, tokens, and access keys
Secrets are one of the fastest ways for attackers to move from code to systems. API keys, cloud credentials, database passwords, OAuth tokens, and signing keys can accidentally appear in source code, configuration files, logs, pull requests, or CI/CD environments.
Attackers can exploit this entry point
This entry point is dangerous because once a secret is committed or leaked, removing it from the visible file is not enough. Teams may need to revoke the credential, rotate it, investigate exposure, and remove it from Git history.
3. Delivery workflows: CI/CD, build systems, and automation
CI/CD pipelines are trusted pathways from source code to production. They often have access to repositories, secrets, build artifacts, deployment environments, and package publishing systems. That makes them high-value targets.
Attackers can exploit this entry point.
This entry point is especially powerful because compromised automation can make malicious changes look legitimate. If attackers can manipulate the build or release process, they may not need to alter the source code directly.
Why these three entry points matter
These three entry points are connected. A malicious dependency can steal a secret. A leaked token can compromise a CI/CD pipeline. A poisoned pipeline can publish a compromised artifact. That is how supply chain attacks cascade.
Securing the software supply chain requires visibility and enforcement across all three:
- Dependencies: Know what you use and whether it is vulnerable, malicious, or reachable.
- Credentials: Detect and prevent secrets before they enter the repository.
- Delivery workflows: Secure the pipelines and automation that build, test, and release software.
Best practices to keep your software supply chain secure
Strong supply chain security requires more than a single scanner. It requires layered controls across code, dependencies, secrets, pipelines, and developer workflows.
1. Maintain an accurate software inventory
You cannot secure what you cannot see. Maintain a current inventory of third-party libraries, transitive dependencies, package versions, licenses, and security status. A software bill of materials, or SBOM, helps teams quickly identify affected components during vulnerability or breach events.
2. Scan dependencies for vulnerabilities and malicious packages
Use software composition analysis to identify known vulnerabilities in direct and transitive dependencies. But do not stop at CVEs. Modern supply chain security should also detect malicious packages, suspicious package behavior, and risky dependency patterns.
3. Prioritize vulnerabilities based on reachability
Not every dependency vulnerability creates the same risk. Prioritize issues based on whether vulnerable code is actually reachable from your application. Reachability analysis helps reduce noise and gives developers a clearer path to fixing the vulnerabilities that matter most.
4. Detect secrets before they reach the repository
Prevent secrets from entering Git history whenever possible. Once a secret is committed, teams may need to rotate credentials, rewrite history, and investigate where the secret may have spread. Use IDE-based detection, pre-commit checks, CLI scanning, and CI/CD enforcement to catch secrets early.
5. Secure CI/CD workflows
Review pipeline definitions with the same rigor as application code. Pin external actions and tasks to trusted versions. Avoid overly permissive triggers. Limit workflow permissions. Validate parameters. Prevent script injection. Protect build and publishing credentials.
6. Enforce policy with quality gates
Supply chain findings should not live only in dashboards. They should influence whether code can move forward. Use quality gates to enforce policies for critical vulnerabilities, malicious packages, exposed secrets, license violations, and unsafe code patterns.
7. Review how your code interacts with third-party libraries
Dependency risk is not limited to the dependency itself. Risk can also emerge from the way your application uses that dependency. Advanced SAST can help identify unsafe data flows between your code and third-party libraries, including complex injection vulnerabilities that traditional scanners may miss.
8. Monitor AI coding workflows
AI-assisted development should be treated as part of the software supply chain. Review configuration files that influence AI-generated code. Scan for hidden instructions, suspicious Unicode characters, exposed secrets, and unsafe generated code before it enters the repository.
9. Train developers on secure dependency use
Developers make daily decisions about which packages to use, when to upgrade, how to handle secrets, and how to respond to security findings. Training helps teams recognize risky package behavior, avoid committing secrets, understand pipeline risks, and respond quickly when a dependency issue appears.
10. Build an incident response process for supply chain events
Even strong controls cannot eliminate all risk. Teams need a clear process for responding when a dependency, credential, package, or pipeline is compromised. That process should include ownership, communication paths, credential rotation, dependency replacement, build artifact review, release rollback, SBOM analysis, and customer notification criteria.
How SonarQube helps secure the software supply chain
SonarQube is the zero trust, multi-layered code verification platform that helps teams secure the software supply chain across code, dependencies, secrets, and developer workflows.
Rather than treating supply chain security as a downstream audit, SonarQube brings deterministic analysis directly into the developer workflow. The analysis is transparent, consistent, and repeatable—every finding is explained with the exact rule, code location, and data flow trace.
With SonarQube Advanced Security, teams can:
- Identify vulnerable and malicious open-source dependencies
- Detect hard-coded secrets before they reach Git history
- Generate and maintain SBOMs for application visibility
- Enforce license compliance
- Analyze how application code interacts with third-party libraries
- Detect risky CI/CD pipeline configurations
- Surface findings directly in pull requests
- Enforce policy through quality gates
This helps developers fix issues earlier, gives security teams stronger governance, and helps organizations reduce supply chain risk without slowing delivery.
Conclusion
The modern software supply chain is no longer just a list of third-party dependencies. It includes every package, credential, pipeline, AI tool, configuration file, and workflow that helps software get built and shipped.
Attackers understand this. They target the trusted systems that developers rely on every day because those systems create scale. One compromised dependency or exposed credential can become a path into many downstream environments.
Software supply chain security helps teams reduce that risk by improving visibility, detecting vulnerabilities and malicious packages, preventing secrets exposure, securing pipelines, and enforcing policy directly in the developer workflow.
The goal is not just to find risk later. It is to stop unsafe code, compromised dependencies, and exposed credentials before they move forward.
