Skip to content

Commit

Permalink
chore(container_analysis): update sample to illustrate AR style urls
Browse files Browse the repository at this point in the history
  • Loading branch information
donmccasland authored Oct 21, 2020
1 parent d23896f commit 208db6a
Showing 1 changed file with 9 additions and 3 deletions.
12 changes: 9 additions & 3 deletions google-cloud-container_analysis/samples/sample.rb
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,10 @@ def delete_note note_id:, project_id:
def create_occurrence resource_url:, note_id:, occurrence_project:, note_project:
# [START containeranalysis_create_occurrence]
# resource_url = "The URL of the resource associated with the occurrence."
# # e.g. https://gcr.io/project/image@sha256:123
# # If you are using Google Container Registry
# # e.g. https://gcr.io/project/repo/image@sha256:123
# # If you are using Google Artifact Registry
# # e.g. https://LOCATION-docker.pkg.dev/project/repo/image@sha256:123
# note_id = "The identifier of the note associated with the occurrence"
# occurrence_project = "The Google Cloud project ID for the new occurrence"
# note_project = "The Google Cloud project ID of the associated note"
Expand Down Expand Up @@ -320,8 +323,11 @@ def find_vulnerabilities_for_image resource_url:, project_id:

def find_high_severity_vulnerabilities_for_image resource_url:, project_id:
# [START containeranalysis_filter_vulnerability_occurrences]
# resource_url = "The URL of the resource associated with the occurrence,
# e.g. https://gcr.io/project/image@sha256:123"
# resource_url = "The URL of the resource associated with the occurrence."
# # If you are using Google Container Registry
# # e.g. https://gcr.io/project/repo/image@sha256:123
# # If you are using Google Artifact Registry
# # e.g. https://LOCATION-docker.pkg.dev/project/repo/image@sha256:123
# project_id = "The Google Cloud project ID of the vulnerabilities to find"

require "google/cloud/container_analysis"
Expand Down

0 comments on commit 208db6a

Please sign in to comment.