Container Analysis scans container images stored in Container Registry for vulnerabilities. Continuous automated analysis of containers keep you informed about known vulnerabilities so that you can review and address issues before deployment.
Additionally, third-party metadata providers can use Container Analysis to store and retrieve additional metadata for their customers' images, such as packages installed in an image.
These samples show how to use the Google Cloud Container Analysis Client Library.
-
Enable APIs
- Enable the Container Analysis API and create a new project or select an existing project.
-
Install and Initialize Cloud SDK
- Follow instructions from the available quickstarts
-
Authenticate with GCP
- Typically, you should authenticate using a service account key
-
Clone the repo and cd into this directory
git clone https://github.com/GoogleCloudPlatform/python-docs-samples cd python-docs-samples
-
Set Environment Variables
export GCLOUD_PROJECT="YOUR_PROJECT_ID"
-
Run Tests
nox -s "py36(sample='./containeranalysis')"
- See CONTRIBUTING.md
- See LICENSE