-
Notifications
You must be signed in to change notification settings - Fork 6.7k
Container Analysis samples #2232
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from 25 commits
2eefd56
4510418
210451c
121796a
84caf87
17269c2
f688b38
4669433
0894f76
c5cb60a
132fc5c
d5498f1
2e70dd2
ca20894
104c27a
e2a7d35
37a6247
8144f75
0c2e311
de15238
bed1dcb
95ba536
2940dda
fdd94cc
6c252b3
e8f79f8
67f2b0f
601dbb5
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1 @@ | ||
| venv* |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,59 @@ | ||
| <img src="https://avatars2.githubusercontent.com/u/2810941?v=3&s=96" alt="Google | ||
| Cloud Platform logo" title="Google Cloud Platform" align="right" height="96" | ||
| width="96"/> | ||
|
|
||
| # Google Cloud Container Analysis Samples | ||
|
|
||
|
|
||
| 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. | ||
|
|
||
|
|
||
| ## Description | ||
|
|
||
| These samples show how to use the [Google Cloud Container Analysis Client Library](https://cloud.google.com/container-registry/docs/reference/libraries). | ||
|
|
||
| ## Build and Run | ||
| 1. **Enable APIs** - [Enable the Container Analysis API](https://console.cloud.google.com/flows/enableapi?apiid=containeranalysis.googleapis.com) | ||
| and create a new project or select an existing project. | ||
| 1. **Install and Initialize Cloud SDK** | ||
| Follow instructions from the available [quickstarts](https://cloud.google.com/sdk/docs/quickstarts) | ||
| 1. **Clone the repo** and cd into this directory | ||
|
|
||
| ``` | ||
| $ git clone https://github.com/GoogleCloudPlatform/python-docs-samples | ||
| $ cd python-docs-samples/container-registry/container-analysis | ||
| ``` | ||
|
|
||
| 1. **Install Dependencies** | ||
|
|
||
| ``` | ||
| $ python3 -m venv ./venv | ||
| $ source ./venv/bin/activate | ||
| $ pip install -r requirements.txt | ||
daniel-sanche marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
| ``` | ||
|
|
||
| 1. **Set Environment Variables** | ||
|
|
||
| ``` | ||
| $ export GOOGLE_CLOUD_PROJECT="YOUR_PROJECT_ID" | ||
|
||
| ``` | ||
|
|
||
| 1. **Run Tiests** | ||
daniel-sanche marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
|
|
||
| ``` | ||
| $ python -m pytest ./samples_test.py | ||
| ``` | ||
|
|
||
| ## Contributing changes | ||
|
|
||
| * See [CONTRIBUTING.md](../../CONTRIBUTING.md) | ||
|
|
||
| ## Licensing | ||
|
|
||
| * See [LICENSE](../../LICENSE) | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,6 @@ | ||
| google-cloud-pubsub == 0.30.0 | ||
| google-cloud-containeranalysis == 0.1.0 | ||
| grafeas == 0.1.0 | ||
| pytest | ||
| flaky | ||
| mock |
Uh oh!
There was an error while loading. Please reload this page.