Software Composition Analysis
Identify vulnerable, unmaintained or non-compliant third-party dependencies in your builds.
BeginnerDependency ScanningApplicationSupply Chain
Where it fits in the lifecycle
- Plan
- Code
- Build
- Test
- Release
- Deploy
- Operate
- Monitor
- Code Static analysis, secret detection and secure coding practices.
- Build Dependency scanning, image scanning, SBOM generation and signing.
Overview
Most application code is third-party code. SCA resolves the dependency graph from lockfiles or built artefacts and matches components against vulnerability databases and licence policy.
Why it matters
Dependency vulnerabilities are the most common route into an application, and transitive dependencies are invisible without tooling. SCA also underpins licence compliance and SBOM generation.
How it works
- 01The scanner parses lockfiles or inspects the built artefact.
- 02Components are normalised to package URLs (purls).
- 03Purls are matched against advisory databases such as OSV, GHSA and vendor feeds.
- 04Reachability or fix-availability data is used to prioritise remediation.
Common tools
TrivyOWASP Dependency-CheckSnykGrypeGitHubGitLabPythonDocker
Implementation examples
bashTrivy filesystem scan
trivy fs --scanners vuln,license --severity HIGH,CRITICAL .yamlFail the job on fixable criticals
sca: stage: test script: - trivy fs --exit-code 1 --ignore-unfixed --severity CRITICAL .Best practices
- Scan lockfiles, not manifests, so transitive versions are exact.
- Automate dependency updates so remediation is routine.
- Prioritise by fix availability and exploitability, not raw CVSS.
Common mistakes
- Only scanning direct dependencies.
- Suppressing findings globally instead of per component with an expiry.
Hands-on labs
- Lab 06 — Build a Secure CI/CD Pipeline
Assemble a pipeline containing SAST, SCA, secret detection, container scanning, SBOM generation and a security gate.
- Lab 10 — Triage Vulnerability Findings
Take raw scanner output and produce a prioritised, owner-assigned remediation list.