diff --git a/samples/snippets/requirements.txt b/samples/snippets/requirements.txt index 32e0def..7e75181 100644 --- a/samples/snippets/requirements.txt +++ b/samples/snippets/requirements.txt @@ -1,6 +1,6 @@ google-cloud-pubsub==1.4.3 google-cloud-containeranalysis==0.3.1 -grafeas==0.1.0 +grafeas==0.4.0 pytest==5.3.0; python_version > "3.0" pytest==4.6.6; python_version < "3.0" flaky==3.6.1 diff --git a/samples/snippets/samples.py b/samples/snippets/samples.py index 2eeda1c..c663e4d 100644 --- a/samples/snippets/samples.py +++ b/samples/snippets/samples.py @@ -32,7 +32,7 @@ def create_note(note_id, project_id): { 'affected_cpe_uri': 'your-uri-here', 'affected_package': 'your-package-here', - 'min_affected_version': { + 'affected_version_start': { 'kind': Version.VersionKind.MINIMUM }, 'fixed_version': { @@ -88,7 +88,7 @@ def create_occurrence(resource_url, note_id, occurrence_project, note_project): { 'affected_cpe_uri': 'your-uri-here', 'affected_package': 'your-package-here', - 'min_affected_version': { + 'affected_version': { 'kind': Version.VersionKind.MINIMUM }, 'fixed_version': { diff --git a/samples/snippets/samples_test.py b/samples/snippets/samples_test.py index a8552e5..535544e 100644 --- a/samples/snippets/samples_test.py +++ b/samples/snippets/samples_test.py @@ -267,7 +267,7 @@ def test_find_high_severity_vulnerabilities(self): { 'affected_cpe_uri': 'your-uri-here', 'affected_package': 'your-package-here', - 'min_affected_version': { + 'affected_version_start': { 'kind': Version.VersionKind.MINIMUM }, 'fixed_version': { @@ -288,7 +288,7 @@ def test_find_high_severity_vulnerabilities(self): { 'affected_cpe_uri': 'your-uri-here', 'affected_package': 'your-package-here', - 'min_affected_version': { + 'affected_version': { 'kind': Version.VersionKind.MINIMUM }, 'fixed_version': {