article --summary
The summary
This post explains why builds that pull open source packages straight from public registries carry supply chain risk, and how a policy gate can stop vulnerable or malicious dependencies before they reach an image. The author describes a setup where every pip install in a CodeBuild job resolves through a curated JFrog Artifactory repository, so a blocked package fails the build before anything is pushed to Amazon ECR.
The reader will learn how the pipeline is organized: a buildspec that orchestrates pre-build, build, and post-build scripts, a Dockerfile whose dependency install is the curated step, and Secrets Manager handling for the JFrog token. The example policy blocks any package version with a CVSS score of 9.0 or higher, and a post-build script reports the blocked package with its CVE identifiers and suggested fix versions.
The prerequisites cover an AWS account, a JFrog subscription that includes Curation, and the steps to configure remote and virtual PyPI repositories with a Block Critical CVEs policy.
Editorial note: This is a summary of an article first published by AWS DevOps Blog. The full piece is on their site.