SEC11-BP06 Centralize services for packages and dependencies
Every third-party package brings its own vulnerabilities, sub-dependencies, and risk of disappearing or being tampered with. Route dependencies through a central, controlled source so you can scan them, approve them, and keep building when public repositories are unavailable.
Desired outcome:
-
Your organization has visibility into every third-party dependency across its applications.
-
Your teams add new dependencies deliberately, weighing security and maintenance before adopting them.
-
Your applications keep building and deploying even when an upstream public repository is unavailable.
-
You have an approval process for new dependencies that matches your organization's risk tolerance.
Common anti-patterns:
-
Developers pull dependencies straight from public repositories, tying their ability to build to the availability and integrity of those repositories.
-
Teams stand up a central repository without deciding which security controls it needs or how to configure them.
-
Developers add dependencies with no review of security, stability, size, sub-dependencies, or license.
-
The approval process is so slow or strict that developers bypass the central repository to get what they need.
-
No one reviews dependencies over time to update outdated ones or remove those no longer used.
Benefits of establishing this best practice:
-
Your software supply chain is protected from harmful or tampered packages, and package usage is visible.
-
Package distribution stays efficient while security controls remain in place.
-
A newly disclosed vulnerability can be traced to every application that uses the affected component.
Level of risk exposed if this best practice is not established: Medium
Implementation guidance
A dependency can carry a known vulnerability, pull in sub-dependencies you never chose, or ship under a license that conflicts with your obligations. It can also be replaced by a harmful version through a typosquatting or account-takeover attack. Pulling packages directly from public repositories ties your build to infrastructure you do not control. An upstream service disruption or a withdrawn package can stop your delivery.
A central package repository fetches, scans, and caches packages,
so your builds pull from it instead of public ones. This acts a
central place to apply vulnerability scanning, enforce license
policy, and control which upstream sources you trust. On AWS,
Amazon CodeArtifact
If approval is too slow or too strict, developers bypass the repository and the uncontrolled sourcing returns. If it is too loose, the repository does not add enough protection. Set a clear, fast policy by defining acceptance criteria (security history, maintenance status, code size, sub-dependencies, license) and providing a quick path for common cases.
A package that was safe at adoption can have a vulnerability
disclosed against it later. Monitor dependencies continuously for
newly disclosed vulnerabilities, use of unapproved sources, and
prohibited licenses.
Amazon Inspector
Plan for a
compromised third-party package
Implementation steps
-
Define a dependency policy: Set the criteria for accepting a package, including security history, maintenance status, size, sub-dependencies, and license. Document the approval path and keep it fast enough that teams do not bypass it.
-
Stand up a central package repository: Configure Amazon CodeArtifact
or your organization's approved repository as the single source for dependencies. Apply access controls, enable package origin control, and point developer machines and pipelines at it. -
Scan incoming packages: Enable vulnerability scanning on packages entering the repository, and enforce license and policy checks before a package becomes available to teams.
-
Add automated checks to the pipeline: Integrate Amazon Inspector scans into your CI/CD pipeline, and fail or flag builds that pull affected versions or violate policy. Apply a Code Security scan configuration to the repositories themselves, so you catch a vulnerable dependency before a build starts.
-
Monitor existing dependencies continuously: Configure alerts for newly disclosed vulnerabilities in dependencies already in use, and establish a regular cadence to update outdated packages and remove unused ones. Decide in advance which credentials and secrets you rotate when a package already in use is found to be harmful.
-
Train developers on dependency risk: Educate teams on supply chain threats and on how to evaluate and select packages responsibly, so the policy is applied with understanding rather than resistance.
Resources
Related best practices:
Related documents:
Related videos:
Related examples:
Related tools: