diff --git a/container-analysis/snippets/createNote.js b/container-analysis/snippets/createNote.js index 8190d9618b..6abf822a2a 100644 --- a/container-analysis/snippets/createNote.js +++ b/container-analysis/snippets/createNote.js @@ -1,3 +1,19 @@ +// Copyright 2019 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +'use strict'; + // sample-metadata: // title: Create Note // description: Creates a Note with specified ID diff --git a/container-analysis/snippets/createOccurrence.js b/container-analysis/snippets/createOccurrence.js index e4dabc4f14..d593acf877 100644 --- a/container-analysis/snippets/createOccurrence.js +++ b/container-analysis/snippets/createOccurrence.js @@ -1,3 +1,19 @@ +// Copyright 2019 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +'use strict'; + // sample-metadata: // title: Create Occurrence // description: Creates an Occurrence of a Note and attaches it as a metadata to an image diff --git a/container-analysis/snippets/deleteNote.js b/container-analysis/snippets/deleteNote.js index dfce8628b6..a0c8a10782 100644 --- a/container-analysis/snippets/deleteNote.js +++ b/container-analysis/snippets/deleteNote.js @@ -1,3 +1,19 @@ +// Copyright 2019 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +'use strict'; + // sample-metadata: // title: Delete Note // description: Deletes a specified Note diff --git a/container-analysis/snippets/deleteOccurrence.js b/container-analysis/snippets/deleteOccurrence.js index a9640f8017..400b2659ff 100644 --- a/container-analysis/snippets/deleteOccurrence.js +++ b/container-analysis/snippets/deleteOccurrence.js @@ -1,3 +1,19 @@ +// Copyright 2019 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +'use strict'; + // sample-metadata: // title: Delete Occurrence // description: Deletes a specified Occurrence diff --git a/container-analysis/snippets/getDiscoveryInfo.js b/container-analysis/snippets/getDiscoveryInfo.js index 64c76c61f5..047d2ab9c2 100644 --- a/container-analysis/snippets/getDiscoveryInfo.js +++ b/container-analysis/snippets/getDiscoveryInfo.js @@ -1,3 +1,19 @@ +// Copyright 2019 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +'use strict'; + // sample-metadata: // title: Get Discovery Info // description: Gets all Discovery Occurrences attached to specified image diff --git a/container-analysis/snippets/getNote.js b/container-analysis/snippets/getNote.js index 66d7508a02..a1d3630545 100644 --- a/container-analysis/snippets/getNote.js +++ b/container-analysis/snippets/getNote.js @@ -1,3 +1,19 @@ +// Copyright 2019 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +'use strict'; + // sample-metadata: // title: Get Note // description: Retrieves and prints a specified note diff --git a/container-analysis/snippets/getOccurrence.js b/container-analysis/snippets/getOccurrence.js index a7f92d1fcc..a3dc8292a4 100644 --- a/container-analysis/snippets/getOccurrence.js +++ b/container-analysis/snippets/getOccurrence.js @@ -1,3 +1,19 @@ +// Copyright 2019 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +'use strict'; + // sample-metadata: // title: Get Occurrence // description: Retrieves and prints a specified Occurrence diff --git a/container-analysis/snippets/highVulnerabilitiesForImage.js b/container-analysis/snippets/highVulnerabilitiesForImage.js index 52698a5bfb..05dc80bc27 100644 --- a/container-analysis/snippets/highVulnerabilitiesForImage.js +++ b/container-analysis/snippets/highVulnerabilitiesForImage.js @@ -1,3 +1,19 @@ +// Copyright 2019 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +'use strict'; + // sample-metadata: // title: Get High Vulnerabilities for Image // description: Retrieves all Vulnerability Occurrences of High Severity from Specified Image diff --git a/container-analysis/snippets/occurrencePubSub.js b/container-analysis/snippets/occurrencePubSub.js index 50322ebd0b..3bd44b67bf 100644 --- a/container-analysis/snippets/occurrencePubSub.js +++ b/container-analysis/snippets/occurrencePubSub.js @@ -1,3 +1,19 @@ +// Copyright 2019 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +'use strict'; + // sample-metadata: // title: Occurrence PubSub // description: Polls a specified PubSub subscription for Occurrences. Requires a subscription to a topic named 'container-analysis-occurrences-v1' diff --git a/container-analysis/snippets/occurrencesForImage.js b/container-analysis/snippets/occurrencesForImage.js index 30e721973a..fb559db569 100644 --- a/container-analysis/snippets/occurrencesForImage.js +++ b/container-analysis/snippets/occurrencesForImage.js @@ -1,3 +1,19 @@ +// Copyright 2019 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +'use strict'; + // sample-metadata: // title: Occurrences for Image // description: Retrieves all Occurrences attached to the metadata of a specified image diff --git a/container-analysis/snippets/occurrencesForNote.js b/container-analysis/snippets/occurrencesForNote.js index f3c5180814..594c4ec443 100644 --- a/container-analysis/snippets/occurrencesForNote.js +++ b/container-analysis/snippets/occurrencesForNote.js @@ -1,3 +1,19 @@ +// Copyright 2019 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +'use strict'; + // sample-metadata: // title: Occurrences for Note // description: Retrieves all Occurrences of a specified Note diff --git a/container-analysis/snippets/pollDiscoveryOccurrenceFinished.js b/container-analysis/snippets/pollDiscoveryOccurrenceFinished.js index 6e72175541..b7fb16b805 100644 --- a/container-analysis/snippets/pollDiscoveryOccurrenceFinished.js +++ b/container-analysis/snippets/pollDiscoveryOccurrenceFinished.js @@ -1,3 +1,19 @@ +// Copyright 2019 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +'use strict'; + // sample-metadata: // title: Poll Discovery Occurrence Finished // description: Waits for a Discovery Occurrence to reach a terminal state diff --git a/container-analysis/snippets/quickstart.js b/container-analysis/snippets/quickstart.js index 27d50bfe10..f5490a3931 100644 --- a/container-analysis/snippets/quickstart.js +++ b/container-analysis/snippets/quickstart.js @@ -1,3 +1,19 @@ +// Copyright 2019 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +'use strict'; + // sample-metadata: // title: Quickstart // description: fetching an instance of Grafeas and creating a note. diff --git a/container-analysis/snippets/test/containerAnalysis.test.js b/container-analysis/snippets/test/containerAnalysis.test.js index 54291b1e4c..5ab073e8e2 100644 --- a/container-analysis/snippets/test/containerAnalysis.test.js +++ b/container-analysis/snippets/test/containerAnalysis.test.js @@ -1,3 +1,19 @@ +// Copyright 2019 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +'use strict'; + const {assert} = require('chai'); const cp = require('child_process'); const uuid = require(`uuid`); diff --git a/container-analysis/snippets/vulnerabilityOccurrencesForImage.js b/container-analysis/snippets/vulnerabilityOccurrencesForImage.js index 0379a1dacc..6a0cfc6158 100644 --- a/container-analysis/snippets/vulnerabilityOccurrencesForImage.js +++ b/container-analysis/snippets/vulnerabilityOccurrencesForImage.js @@ -1,3 +1,19 @@ +// Copyright 2019 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +'use strict'; + // sample-metadata: // title: Vulnerability Occurrences for Image // description: Retrieves all Vulnerability Occurrences attached to a specified image