From bd022b3e910e31fb59949c6e862c3daec84964a5 Mon Sep 17 00:00:00 2001 From: mrjoelkamp Date: Thu, 17 Oct 2024 13:48:16 -0500 Subject: [PATCH 1/3] chore: add license headers --- Dockerfile | 13 +++++++++++++ Makefile | 13 +++++++++++++ main.go | 15 +++++++++++++++ main_test.go | 15 +++++++++++++++ pkg/handler/mutate.go | 15 +++++++++++++++ pkg/handler/validate.go | 15 +++++++++++++++ pkg/utils/utils.go | 15 +++++++++++++++ scripts/generate-tls-cert.sh | 15 +++++++++++++++ template/bash.txt | 13 +++++++++++++ template/dockerfile.txt | 13 +++++++++++++ template/go.txt | 15 +++++++++++++++ template/makefile.txt | 13 +++++++++++++ 12 files changed, 170 insertions(+) create mode 100644 template/bash.txt create mode 100644 template/dockerfile.txt create mode 100644 template/go.txt create mode 100644 template/makefile.txt diff --git a/Dockerfile b/Dockerfile index fcedeab..eb33197 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,3 +1,16 @@ +# Copyright 2024 Docker attest-provider authors +# +# 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 BUILDERIMAGE="golang:1.22" ARG BASEIMAGE="gcr.io/distroless/static:nonroot" diff --git a/Makefile b/Makefile index 5523a2c..dc02277 100644 --- a/Makefile +++ b/Makefile @@ -1,3 +1,16 @@ +# Copyright 2024 Docker attest-provider authors +# +# 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. REPOSITORY ?= docker/attest-provider IMG := $(REPOSITORY):dev diff --git a/main.go b/main.go index cc841b0..274b29e 100644 --- a/main.go +++ b/main.go @@ -1,3 +1,18 @@ +/* + Copyright 2024 Docker attest-provider authors + + 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/main_test.go b/main_test.go index f7fb812..3a69401 100644 --- a/main_test.go +++ b/main_test.go @@ -1,3 +1,18 @@ +/* + Copyright 2024 Docker attest-provider authors + + 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/pkg/handler/mutate.go b/pkg/handler/mutate.go index e21ef5a..706b61a 100644 --- a/pkg/handler/mutate.go +++ b/pkg/handler/mutate.go @@ -1,3 +1,18 @@ +/* + Copyright 2024 Docker attest-provider authors + + 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 handler import ( diff --git a/pkg/handler/validate.go b/pkg/handler/validate.go index fa78cf4..dadd06e 100644 --- a/pkg/handler/validate.go +++ b/pkg/handler/validate.go @@ -1,3 +1,18 @@ +/* + Copyright 2024 Docker attest-provider authors + + 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 handler import ( diff --git a/pkg/utils/utils.go b/pkg/utils/utils.go index 87fcfa2..6bee4cb 100644 --- a/pkg/utils/utils.go +++ b/pkg/utils/utils.go @@ -1,3 +1,18 @@ +/* + Copyright 2024 Docker attest-provider authors + + 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 utils import ( diff --git a/scripts/generate-tls-cert.sh b/scripts/generate-tls-cert.sh index a8586ab..4a165d7 100755 --- a/scripts/generate-tls-cert.sh +++ b/scripts/generate-tls-cert.sh @@ -1,5 +1,20 @@ #!/usr/bin/env bash +# Copyright 2024 Docker attest-provider authors + +# 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. + + set -o errexit set -o nounset set -o pipefail diff --git a/template/bash.txt b/template/bash.txt new file mode 100644 index 0000000..f6d9a61 --- /dev/null +++ b/template/bash.txt @@ -0,0 +1,13 @@ +# Copyright 2024 Docker attest-provider authors + +# 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. diff --git a/template/dockerfile.txt b/template/dockerfile.txt new file mode 100644 index 0000000..72a6fa8 --- /dev/null +++ b/template/dockerfile.txt @@ -0,0 +1,13 @@ +# Copyright 2024 Docker attest-provider authors +# +# 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. diff --git a/template/go.txt b/template/go.txt new file mode 100644 index 0000000..4752b96 --- /dev/null +++ b/template/go.txt @@ -0,0 +1,15 @@ +/* + Copyright 2024 Docker attest-provider authors + + 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. +*/ diff --git a/template/makefile.txt b/template/makefile.txt new file mode 100644 index 0000000..72a6fa8 --- /dev/null +++ b/template/makefile.txt @@ -0,0 +1,13 @@ +# Copyright 2024 Docker attest-provider authors +# +# 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. From 425161028fa42f8d4efff2f685caf22811e7e171 Mon Sep 17 00:00:00 2001 From: mrjoelkamp Date: Thu, 17 Oct 2024 14:05:42 -0500 Subject: [PATCH 2/3] chore: add notice --- NOTICE | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 NOTICE diff --git a/NOTICE b/NOTICE new file mode 100644 index 0000000..4d13e30 --- /dev/null +++ b/NOTICE @@ -0,0 +1,15 @@ +Docker attest-provider +Copyright 2024 Docker attest-provider authors + +This product includes software developed at Docker, Inc. (https://www.docker.com). + +The following is courtesy of our legal counsel: + +Use and transfer of Docker may be subject to certain restrictions by the +United States and other governments. +It is your responsibility to ensure that your use and/or transfer does not +violate applicable laws. + +For more information, please see https://www.bis.doc.gov + +See also https://www.apache.org/dev/crypto.html and/or seek legal counsel. From 8a9489fcade722ae23f7d591ddb7fba7cdf6cd47 Mon Sep 17 00:00:00 2001 From: mrjoelkamp Date: Fri, 18 Oct 2024 09:33:52 -0500 Subject: [PATCH 3/3] refactor: remove copyright year; add newline --- Dockerfile | 2 +- Makefile | 2 +- NOTICE | 2 +- main.go | 3 ++- main_test.go | 3 ++- pkg/handler/mutate.go | 3 ++- pkg/handler/validate.go | 3 ++- pkg/utils/utils.go | 3 ++- scripts/generate-tls-cert.sh | 2 +- template/bash.txt | 2 +- template/dockerfile.txt | 2 +- template/go.txt | 3 ++- template/makefile.txt | 2 +- 13 files changed, 19 insertions(+), 13 deletions(-) diff --git a/Dockerfile b/Dockerfile index eb33197..b30a984 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,4 +1,4 @@ -# Copyright 2024 Docker attest-provider authors +# Copyright Docker attest-provider authors # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/Makefile b/Makefile index dc02277..8954a11 100644 --- a/Makefile +++ b/Makefile @@ -1,4 +1,4 @@ -# Copyright 2024 Docker attest-provider authors +# Copyright Docker attest-provider authors # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/NOTICE b/NOTICE index 4d13e30..f730b82 100644 --- a/NOTICE +++ b/NOTICE @@ -1,5 +1,5 @@ Docker attest-provider -Copyright 2024 Docker attest-provider authors +Copyright Docker attest-provider authors This product includes software developed at Docker, Inc. (https://www.docker.com). diff --git a/main.go b/main.go index 274b29e..1fcbd93 100644 --- a/main.go +++ b/main.go @@ -1,5 +1,5 @@ /* - Copyright 2024 Docker attest-provider authors + Copyright Docker attest-provider authors Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -13,6 +13,7 @@ See the License for the specific language governing permissions and limitations under the License. */ + package main import ( diff --git a/main_test.go b/main_test.go index 3a69401..4552ad5 100644 --- a/main_test.go +++ b/main_test.go @@ -1,5 +1,5 @@ /* - Copyright 2024 Docker attest-provider authors + Copyright Docker attest-provider authors Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -13,6 +13,7 @@ See the License for the specific language governing permissions and limitations under the License. */ + package main import ( diff --git a/pkg/handler/mutate.go b/pkg/handler/mutate.go index 706b61a..61bd70b 100644 --- a/pkg/handler/mutate.go +++ b/pkg/handler/mutate.go @@ -1,5 +1,5 @@ /* - Copyright 2024 Docker attest-provider authors + Copyright Docker attest-provider authors Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -13,6 +13,7 @@ See the License for the specific language governing permissions and limitations under the License. */ + package handler import ( diff --git a/pkg/handler/validate.go b/pkg/handler/validate.go index dadd06e..412dc5b 100644 --- a/pkg/handler/validate.go +++ b/pkg/handler/validate.go @@ -1,5 +1,5 @@ /* - Copyright 2024 Docker attest-provider authors + Copyright Docker attest-provider authors Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -13,6 +13,7 @@ See the License for the specific language governing permissions and limitations under the License. */ + package handler import ( diff --git a/pkg/utils/utils.go b/pkg/utils/utils.go index 6bee4cb..9d6419b 100644 --- a/pkg/utils/utils.go +++ b/pkg/utils/utils.go @@ -1,5 +1,5 @@ /* - Copyright 2024 Docker attest-provider authors + Copyright Docker attest-provider authors Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -13,6 +13,7 @@ See the License for the specific language governing permissions and limitations under the License. */ + package utils import ( diff --git a/scripts/generate-tls-cert.sh b/scripts/generate-tls-cert.sh index 4a165d7..c0c7b82 100755 --- a/scripts/generate-tls-cert.sh +++ b/scripts/generate-tls-cert.sh @@ -1,6 +1,6 @@ #!/usr/bin/env bash -# Copyright 2024 Docker attest-provider authors +# Copyright Docker attest-provider authors # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/template/bash.txt b/template/bash.txt index f6d9a61..5ca1ba8 100644 --- a/template/bash.txt +++ b/template/bash.txt @@ -1,4 +1,4 @@ -# Copyright 2024 Docker attest-provider authors +# Copyright Docker attest-provider authors # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/template/dockerfile.txt b/template/dockerfile.txt index 72a6fa8..bfbf0aa 100644 --- a/template/dockerfile.txt +++ b/template/dockerfile.txt @@ -1,4 +1,4 @@ -# Copyright 2024 Docker attest-provider authors +# Copyright Docker attest-provider authors # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/template/go.txt b/template/go.txt index 4752b96..1076ea9 100644 --- a/template/go.txt +++ b/template/go.txt @@ -1,5 +1,5 @@ /* - Copyright 2024 Docker attest-provider authors + Copyright Docker attest-provider authors Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -13,3 +13,4 @@ See the License for the specific language governing permissions and limitations under the License. */ + diff --git a/template/makefile.txt b/template/makefile.txt index 72a6fa8..bfbf0aa 100644 --- a/template/makefile.txt +++ b/template/makefile.txt @@ -1,4 +1,4 @@ -# Copyright 2024 Docker attest-provider authors +# Copyright Docker attest-provider authors # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License.