From 0d679c76440afbe051e54a47b6b40237a92d66f5 Mon Sep 17 00:00:00 2001 From: Guillaume Lours Date: Mon, 20 Jul 2020 11:27:21 +0200 Subject: [PATCH] Add license headers to existing files Signed-off-by: Guillaume Lours --- Dockerfile | 19 ++++++++++++++++++- Makefile | 13 +++++++++++++ cmd/docker-scan/job_windows.go | 16 ++++++++++++++++ cmd/docker-scan/main.go | 16 ++++++++++++++++ config/config.go | 16 ++++++++++++++++ e2e/auth_test.go | 16 ++++++++++++++++ e2e/main_test.go | 16 ++++++++++++++++ e2e/plugin_test.go | 16 ++++++++++++++++ e2e/scan_test.go | 16 ++++++++++++++++ e2e/version_test.go | 16 ++++++++++++++++ internal/authentication/authenticator.go | 16 ++++++++++++++++ internal/authentication/authenticator_test.go | 16 ++++++++++++++++ internal/hub/hub.go | 16 ++++++++++++++++ internal/hub/instances.go | 16 ++++++++++++++++ internal/hub/instances_test.go | 16 ++++++++++++++++ internal/provider/error.go | 16 ++++++++++++++++ internal/provider/error_test.go | 16 ++++++++++++++++ internal/provider/provider.go | 16 ++++++++++++++++ internal/provider/snyk.go | 16 ++++++++++++++++ internal/provider/snyk_test.go | 16 ++++++++++++++++ internal/version.go | 16 ++++++++++++++++ internal/version_test.go | 16 ++++++++++++++++ scripts/validate/fileheader | 2 +- scripts/validate/template/go.txt | 1 + 24 files changed, 353 insertions(+), 2 deletions(-) diff --git a/Dockerfile b/Dockerfile index 4202c78..400cb11 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,4 +1,21 @@ -# syntax = docker/dockerfile:experimental +# syntax=docker/dockerfile:experimental + + +# Copyright 2020 Docker Inc. + +# 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 + +# http://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. + + ARG GO_VERSION=1.14.3 ARG CLI_VERSION=19.03.9 ARG ALPINE_VERSION=3.12.0 diff --git a/Makefile b/Makefile index 535ab82..c36f156 100644 --- a/Makefile +++ b/Makefile @@ -1,3 +1,16 @@ +# Copyright 2020 Docker Inc. + +# 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 + +# http://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. include vars.mk export DOCKER_BUILDKIT=1 diff --git a/cmd/docker-scan/job_windows.go b/cmd/docker-scan/job_windows.go index cf6f26b..4d9755c 100644 --- a/cmd/docker-scan/job_windows.go +++ b/cmd/docker-scan/job_windows.go @@ -1,3 +1,19 @@ +/* + Copyright 2020 Docker Inc. + + 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 + + http://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. +*/ + /* Copyright 2020 Docker, Inc. Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/cmd/docker-scan/main.go b/cmd/docker-scan/main.go index d65605d..a172cbd 100644 --- a/cmd/docker-scan/main.go +++ b/cmd/docker-scan/main.go @@ -1,3 +1,19 @@ +/* + Copyright 2020 Docker Inc. + + 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 + + http://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. +*/ + package main import ( diff --git a/config/config.go b/config/config.go index f4948b7..be9bf60 100644 --- a/config/config.go +++ b/config/config.go @@ -1,3 +1,19 @@ +/* + Copyright 2020 Docker Inc. + + 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 + + http://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. +*/ + package config import ( diff --git a/e2e/auth_test.go b/e2e/auth_test.go index a2f4a1c..8213237 100644 --- a/e2e/auth_test.go +++ b/e2e/auth_test.go @@ -1,3 +1,19 @@ +/* + Copyright 2020 Docker Inc. + + 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 + + http://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. +*/ + package e2e import ( diff --git a/e2e/main_test.go b/e2e/main_test.go index 5b12c19..246972a 100644 --- a/e2e/main_test.go +++ b/e2e/main_test.go @@ -1,3 +1,19 @@ +/* + Copyright 2020 Docker Inc. + + 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 + + http://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. +*/ + package e2e import ( diff --git a/e2e/plugin_test.go b/e2e/plugin_test.go index 633d043..4ea3350 100644 --- a/e2e/plugin_test.go +++ b/e2e/plugin_test.go @@ -1,3 +1,19 @@ +/* + Copyright 2020 Docker Inc. + + 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 + + http://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. +*/ + package e2e import ( diff --git a/e2e/scan_test.go b/e2e/scan_test.go index f9117bf..a6a578c 100644 --- a/e2e/scan_test.go +++ b/e2e/scan_test.go @@ -1,3 +1,19 @@ +/* + Copyright 2020 Docker Inc. + + 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 + + http://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. +*/ + package e2e import ( diff --git a/e2e/version_test.go b/e2e/version_test.go index bf107ca..dfeff6c 100644 --- a/e2e/version_test.go +++ b/e2e/version_test.go @@ -1,3 +1,19 @@ +/* + Copyright 2020 Docker Inc. + + 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 + + http://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. +*/ + package e2e import ( diff --git a/internal/authentication/authenticator.go b/internal/authentication/authenticator.go index 85f9c0e..ff181ae 100644 --- a/internal/authentication/authenticator.go +++ b/internal/authentication/authenticator.go @@ -1,3 +1,19 @@ +/* + Copyright 2020 Docker Inc. + + 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 + + http://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. +*/ + package authentication import ( diff --git a/internal/authentication/authenticator_test.go b/internal/authentication/authenticator_test.go index 360aff1..8483729 100644 --- a/internal/authentication/authenticator_test.go +++ b/internal/authentication/authenticator_test.go @@ -1,3 +1,19 @@ +/* + Copyright 2020 Docker Inc. + + 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 + + http://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. +*/ + package authentication import ( diff --git a/internal/hub/hub.go b/internal/hub/hub.go index a3facd4..4ba4b6f 100644 --- a/internal/hub/hub.go +++ b/internal/hub/hub.go @@ -1,3 +1,19 @@ +/* + Copyright 2020 Docker Inc. + + 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 + + http://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. +*/ + package hub import ( diff --git a/internal/hub/instances.go b/internal/hub/instances.go index 1dbbe2a..930ed3a 100644 --- a/internal/hub/instances.go +++ b/internal/hub/instances.go @@ -1,3 +1,19 @@ +/* + Copyright 2020 Docker Inc. + + 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 + + http://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. +*/ + package hub import ( diff --git a/internal/hub/instances_test.go b/internal/hub/instances_test.go index 4518339..7d09bc4 100644 --- a/internal/hub/instances_test.go +++ b/internal/hub/instances_test.go @@ -1,3 +1,19 @@ +/* + Copyright 2020 Docker Inc. + + 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 + + http://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. +*/ + package hub import ( diff --git a/internal/provider/error.go b/internal/provider/error.go index e364c20..c73db77 100644 --- a/internal/provider/error.go +++ b/internal/provider/error.go @@ -1,3 +1,19 @@ +/* + Copyright 2020 Docker Inc. + + 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 + + http://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. +*/ + package provider import "fmt" diff --git a/internal/provider/error_test.go b/internal/provider/error_test.go index a498748..ab057ef 100644 --- a/internal/provider/error_test.go +++ b/internal/provider/error_test.go @@ -1,3 +1,19 @@ +/* + Copyright 2020 Docker Inc. + + 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 + + http://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. +*/ + package provider import ( diff --git a/internal/provider/provider.go b/internal/provider/provider.go index 4f01c1d..3903cfe 100644 --- a/internal/provider/provider.go +++ b/internal/provider/provider.go @@ -1,3 +1,19 @@ +/* + Copyright 2020 Docker Inc. + + 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 + + http://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. +*/ + package provider // Provider abstracts a scan provider diff --git a/internal/provider/snyk.go b/internal/provider/snyk.go index 45167a0..576d568 100644 --- a/internal/provider/snyk.go +++ b/internal/provider/snyk.go @@ -1,3 +1,19 @@ +/* + Copyright 2020 Docker Inc. + + 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 + + http://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. +*/ + package provider import ( diff --git a/internal/provider/snyk_test.go b/internal/provider/snyk_test.go index 9b453e0..e35807a 100644 --- a/internal/provider/snyk_test.go +++ b/internal/provider/snyk_test.go @@ -1,3 +1,19 @@ +/* + Copyright 2020 Docker Inc. + + 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 + + http://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. +*/ + package provider var ( diff --git a/internal/version.go b/internal/version.go index b11b0df..9c083ef 100644 --- a/internal/version.go +++ b/internal/version.go @@ -1,3 +1,19 @@ +/* + Copyright 2020 Docker Inc. + + 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 + + http://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. +*/ + package internal import ( diff --git a/internal/version_test.go b/internal/version_test.go index db6747d..9b5413d 100644 --- a/internal/version_test.go +++ b/internal/version_test.go @@ -1,3 +1,19 @@ +/* + Copyright 2020 Docker Inc. + + 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 + + http://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. +*/ + package internal import ( diff --git a/scripts/validate/fileheader b/scripts/validate/fileheader index 8a252cc..662d4a6 100755 --- a/scripts/validate/fileheader +++ b/scripts/validate/fileheader @@ -25,4 +25,4 @@ fi BASEPATH="${1-}" -ltag -t "${BASEPATH}scripts/validate/template" -excludes "validate testdata" --check \ No newline at end of file +ltag -t "${BASEPATH}scripts/validate/template" -excludes "validate testdata" --check -v \ No newline at end of file diff --git a/scripts/validate/template/go.txt b/scripts/validate/template/go.txt index 66ca803..6cb4a11 100644 --- a/scripts/validate/template/go.txt +++ b/scripts/validate/template/go.txt @@ -13,3 +13,4 @@ See the License for the specific language governing permissions and limitations under the License. */ +