diff --git a/.boilerplates/boilerplate.css.txt b/.boilerplates/boilerplate.css.txt new file mode 100644 index 0000000000..d6e26f2bbf --- /dev/null +++ b/.boilerplates/boilerplate.css.txt @@ -0,0 +1,4 @@ +/* + SPDX-FileCopyrightText: Copyright YYYY The Minder Authors + SPDX-License-Identifier: Apache-2.0 +*/ diff --git a/.boilerplates/boilerplate.go.txt b/.boilerplates/boilerplate.go.txt new file mode 100644 index 0000000000..3434fbd2c0 --- /dev/null +++ b/.boilerplates/boilerplate.go.txt @@ -0,0 +1,2 @@ +// SPDX-FileCopyrightText: Copyright YYYY The Minder Authors +// SPDX-License-Identifier: Apache-2.0 diff --git a/.boilerplates/boilerplate.html.txt b/.boilerplates/boilerplate.html.txt new file mode 100644 index 0000000000..adad0c6aae --- /dev/null +++ b/.boilerplates/boilerplate.html.txt @@ -0,0 +1,4 @@ + diff --git a/.boilerplates/boilerplate.sh.txt b/.boilerplates/boilerplate.sh.txt new file mode 100644 index 0000000000..ba316dd3df --- /dev/null +++ b/.boilerplates/boilerplate.sh.txt @@ -0,0 +1,2 @@ +# SPDX-FileCopyrightText: Copyright YYYY The Minder Authors +# SPDX-License-Identifier: Apache-2.0 diff --git a/.boilerplates/boilerplate.sql.txt b/.boilerplates/boilerplate.sql.txt new file mode 100644 index 0000000000..484ef90d1e --- /dev/null +++ b/.boilerplates/boilerplate.sql.txt @@ -0,0 +1,2 @@ +-- SPDX-FileCopyrightText: Copyright YYYY The Minder Authors +-- SPDX-License-Identifier: Apache-2.0 diff --git a/.boilerplates/boilerplate.yaml.txt b/.boilerplates/boilerplate.yaml.txt new file mode 100644 index 0000000000..ba316dd3df --- /dev/null +++ b/.boilerplates/boilerplate.yaml.txt @@ -0,0 +1,2 @@ +# SPDX-FileCopyrightText: Copyright YYYY The Minder Authors +# SPDX-License-Identifier: Apache-2.0 diff --git a/.boilerplates/boilerplate.yml.txt b/.boilerplates/boilerplate.yml.txt new file mode 100644 index 0000000000..ba316dd3df --- /dev/null +++ b/.boilerplates/boilerplate.yml.txt @@ -0,0 +1,2 @@ +# SPDX-FileCopyrightText: Copyright YYYY The Minder Authors +# SPDX-License-Identifier: Apache-2.0 diff --git a/.clusterfuzzlite/Dockerfile b/.clusterfuzzlite/Dockerfile index a050951ef2..2825033528 100644 --- a/.clusterfuzzlite/Dockerfile +++ b/.clusterfuzzlite/Dockerfile @@ -1,18 +1,5 @@ -# Copyright 2024 Stacklok, 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. -# -################################################################################ +# SPDX-FileCopyrightText: Copyright 2024 The Minder Authors +# SPDX-License-Identifier: Apache-2.0 FROM gcr.io/oss-fuzz-base/base-builder-go COPY . $SRC/minder diff --git a/.clusterfuzzlite/build.sh b/.clusterfuzzlite/build.sh index 3fabb68ee6..b18d0427dd 100755 --- a/.clusterfuzzlite/build.sh +++ b/.clusterfuzzlite/build.sh @@ -1,19 +1,6 @@ #!/bin/bash -eu -# Copyright 2024 Stacklok, 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. -# -################################################################################ +# SPDX-FileCopyrightText: Copyright 2024 The Minder Authors +# SPDX-License-Identifier: Apache-2.0 # Download dependency and let the Go package manager do all the work printf "package main\nimport _ \"github.com/AdamKorcz/go-118-fuzz-build/testing\"\n" > ./cmd/cli/register.go diff --git a/.clusterfuzzlite/project.yaml b/.clusterfuzzlite/project.yaml index 4f2ee4d973..6c02983ff4 100644 --- a/.clusterfuzzlite/project.yaml +++ b/.clusterfuzzlite/project.yaml @@ -1 +1,4 @@ +# SPDX-FileCopyrightText: Copyright 2024 The Minder Authors +# SPDX-License-Identifier: Apache-2.0 + language: go diff --git a/.github/ISSUE_TEMPLATE/bug_report.yml b/.github/ISSUE_TEMPLATE/bug_report.yml index b44fe62a6f..493422edbf 100644 --- a/.github/ISSUE_TEMPLATE/bug_report.yml +++ b/.github/ISSUE_TEMPLATE/bug_report.yml @@ -1,3 +1,6 @@ +# SPDX-FileCopyrightText: Copyright 2023 The Minder Authors +# SPDX-License-Identifier: Apache-2.0 + name: Report a bug description: Tell us about a bug or issue you may have identified. title: "Provide a general summary of the issue" diff --git a/.github/ISSUE_TEMPLATE/config.yml b/.github/ISSUE_TEMPLATE/config.yml index b0abcdbe7f..a5645ece62 100644 --- a/.github/ISSUE_TEMPLATE/config.yml +++ b/.github/ISSUE_TEMPLATE/config.yml @@ -1,3 +1,6 @@ +# SPDX-FileCopyrightText: Copyright 2023 The Minder Authors +# SPDX-License-Identifier: Apache-2.0 + contact_links: - name: Ask the community url: https://discord.com/invite/RkzVuTp3WK diff --git a/.github/ISSUE_TEMPLATE/enhancement.yml b/.github/ISSUE_TEMPLATE/enhancement.yml index 18c4b9c86a..a1dbc08437 100644 --- a/.github/ISSUE_TEMPLATE/enhancement.yml +++ b/.github/ISSUE_TEMPLATE/enhancement.yml @@ -1,3 +1,6 @@ +# SPDX-FileCopyrightText: Copyright 2023 The Minder Authors +# SPDX-License-Identifier: Apache-2.0 + name: Feature request description: Suggest new or updated features to include in Minder. title: "Suggest a new feature" diff --git a/.github/dependabot.yml b/.github/dependabot.yml index 2cad317cae..e08a6b35b9 100644 --- a/.github/dependabot.yml +++ b/.github/dependabot.yml @@ -1,17 +1,5 @@ -# -# Copyright 2023 Stacklok, 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. +# SPDX-FileCopyrightText: Copyright 2023 The Minder Authors +# SPDX-License-Identifier: Apache-2.0 version: 2 updates: diff --git a/.github/workflows/boilerplates.yaml b/.github/workflows/boilerplates.yaml new file mode 100644 index 0000000000..9e537cd886 --- /dev/null +++ b/.github/workflows/boilerplates.yaml @@ -0,0 +1,50 @@ +# SPDX-FileCopyrightText: Copyright 2024 The Minder Authors +# SPDX-License-Identifier: Apache-2.0 + +name: Boilerplate + +on: + pull_request: + branches: [ 'main', 'release-*' ] + +jobs: + + check: + name: Boilerplate Check + runs-on: ubuntu-latest + strategy: + fail-fast: false + matrix: + extension: + - go + - sh + - yaml + - yml + - html + - css + + include: + - extension: go + language: Go + - extension: sh + language: Bash + - extension: yaml + language: YAML + - extension: yml + language: YAML + - extension: html + language: HTML + - extension: css + language: CSS + - extension: sql + language: SQL + + steps: + - name: Check out code + uses: actions/checkout@eef61447b9ff4aafe5dcd4e0bbf5d482be7e7871 # v4.2.1 + + - uses: chainguard-dev/actions/boilerplate@main + with: + extension: ${{ matrix.extension }} + language: ${{ matrix.language }} + exclude: "/mock/|internal/db/|client.gen.go|.pb(.gw)?.go|docs/docs/|internal/auth/keycloak/client/" diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 0680161b67..f3989ee437 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -1,3 +1,6 @@ +# SPDX-FileCopyrightText: Copyright 2023 The Minder Authors +# SPDX-License-Identifier: Apache-2.0 + on: workflow_call: jobs: diff --git a/.github/workflows/chart-publish.yml b/.github/workflows/chart-publish.yml index 3c09a846c2..c0a54238c2 100644 --- a/.github/workflows/chart-publish.yml +++ b/.github/workflows/chart-publish.yml @@ -1,3 +1,6 @@ +# SPDX-FileCopyrightText: Copyright 2023 The Minder Authors +# SPDX-License-Identifier: Apache-2.0 + # Post-submit and daily build and publish of the Helm chart and Docker container # This is a separate workflow than image-build.yml because image-build.yml is # run in the PR context, and those runs aren't allowed package:write permissions if diff --git a/.github/workflows/cifuzz.yml b/.github/workflows/cifuzz.yml index d67df69412..8e61c13550 100644 --- a/.github/workflows/cifuzz.yml +++ b/.github/workflows/cifuzz.yml @@ -1,3 +1,6 @@ +# SPDX-FileCopyrightText: Copyright 2023 The Minder Authors +# SPDX-License-Identifier: Apache-2.0 + name: ClusterFuzzLite PR fuzzing on: workflow_dispatch: diff --git a/.github/workflows/codeql.yml b/.github/workflows/codeql.yml index ad238720d5..0b3cea891f 100644 --- a/.github/workflows/codeql.yml +++ b/.github/workflows/codeql.yml @@ -1,3 +1,6 @@ +# SPDX-FileCopyrightText: Copyright 2023 The Minder Authors +# SPDX-License-Identifier: Apache-2.0 + # For most projects, this workflow file will not need changing; you simply need # to commit it to your repository. # diff --git a/.github/workflows/compose-migrate.yml b/.github/workflows/compose-migrate.yml index df39b33b5f..b6dd344245 100644 --- a/.github/workflows/compose-migrate.yml +++ b/.github/workflows/compose-migrate.yml @@ -1,3 +1,6 @@ +# SPDX-FileCopyrightText: Copyright 2023 The Minder Authors +# SPDX-License-Identifier: Apache-2.0 + # This test verifies that the docker-compose.yml file is valid and that the # containers can be started and stopped. It also verifies the database migrations. name: Compose Migrate test diff --git a/.github/workflows/deploy-doc.yml b/.github/workflows/deploy-doc.yml index 985a4a0773..816ada1f5e 100644 --- a/.github/workflows/deploy-doc.yml +++ b/.github/workflows/deploy-doc.yml @@ -1,3 +1,6 @@ +# SPDX-FileCopyrightText: Copyright 2023 The Minder Authors +# SPDX-License-Identifier: Apache-2.0 + name: Deploy docs to GitHub Pages on: workflow_dispatch: diff --git a/.github/workflows/generation.yml b/.github/workflows/generation.yml index 6fb6fabe72..56f6f0be06 100644 --- a/.github/workflows/generation.yml +++ b/.github/workflows/generation.yml @@ -1,3 +1,6 @@ +# SPDX-FileCopyrightText: Copyright 2023 The Minder Authors +# SPDX-License-Identifier: Apache-2.0 + name: Code Generation on: push: diff --git a/.github/workflows/image-build.yml b/.github/workflows/image-build.yml index 9baf4c2eab..827ecf1d90 100644 --- a/.github/workflows/image-build.yml +++ b/.github/workflows/image-build.yml @@ -1,3 +1,6 @@ +# SPDX-FileCopyrightText: Copyright 2023 The Minder Authors +# SPDX-License-Identifier: Apache-2.0 + on: workflow_call: {} jobs: diff --git a/.github/workflows/license-check.yml b/.github/workflows/license-check.yml index 5bbf970e08..b9783c2a04 100644 --- a/.github/workflows/license-check.yml +++ b/.github/workflows/license-check.yml @@ -1,3 +1,6 @@ +# SPDX-FileCopyrightText: Copyright 2023 The Minder Authors +# SPDX-License-Identifier: Apache-2.0 + on: workflow_call: jobs: diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index 875534b13d..9a4c4e118d 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -1,3 +1,6 @@ +# SPDX-FileCopyrightText: Copyright 2023 The Minder Authors +# SPDX-License-Identifier: Apache-2.0 + name: Lint on: workflow_call: diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 1a2cfce2b9..c8483a25e7 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -1,17 +1,5 @@ -# -# Copyright 2023 Stacklok, 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. +# SPDX-FileCopyrightText: Copyright 2023 The Minder Authors +# SPDX-License-Identifier: Apache-2.0 # These set of workflows run on every push to the main branch name: Main diff --git a/.github/workflows/migrate-touch.yml b/.github/workflows/migrate-touch.yml index bd646befc1..030cd17d42 100644 --- a/.github/workflows/migrate-touch.yml +++ b/.github/workflows/migrate-touch.yml @@ -1,3 +1,6 @@ +# SPDX-FileCopyrightText: Copyright 2023 The Minder Authors +# SPDX-License-Identifier: Apache-2.0 + # This test verifies that Pull Requests don't touch the merged database migrations. # Folks should now only be adding new migrations to the `database/migrations/` directory. name: Database Migrations Untouched diff --git a/.github/workflows/pr-check.yml b/.github/workflows/pr-check.yml index 74acd544f7..12091a2551 100644 --- a/.github/workflows/pr-check.yml +++ b/.github/workflows/pr-check.yml @@ -1,3 +1,6 @@ +# SPDX-FileCopyrightText: Copyright 2023 The Minder Authors +# SPDX-License-Identifier: Apache-2.0 + name: Pull Request Validation on: pull_request: diff --git a/.github/workflows/pr.yml b/.github/workflows/pr.yml index f7ab476e59..e5f7a39a85 100644 --- a/.github/workflows/pr.yml +++ b/.github/workflows/pr.yml @@ -1,17 +1,5 @@ -# -# Copyright 2023 Stacklok, 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. +# SPDX-FileCopyrightText: Copyright 2023 The Minder Authors +# SPDX-License-Identifier: Apache-2.0 # These set of workflows run on every pull request name: PR diff --git a/.github/workflows/releaser.yml b/.github/workflows/releaser.yml index 4f3d782a46..48a05c29cd 100644 --- a/.github/workflows/releaser.yml +++ b/.github/workflows/releaser.yml @@ -1,18 +1,6 @@ -# -# Copyright 2023 Stacklok, 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. -# +# SPDX-FileCopyrightText: Copyright 2023 The Minder Authors +# SPDX-License-Identifier: Apache-2.0 + # This workflow compiles your minder server and client using a SLSA3 compliant # build and then verifies the provenance of the built artifacts. # It releases the following architectures: amd64, arm64, and armv7 on Linux, @@ -79,7 +67,6 @@ jobs: args: release --clean env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - HOMEBREW_TAP_GITHUB_TOKEN: ${{ secrets.HOMEBREW_TAP_GITHUB_TOKEN }} WINGET_GITHUB_TOKEN: ${{ secrets.WINGET_GITHUB_TOKEN }} VERSION: ${{ needs.ldflags_args.outputs.version }} COMMIT: ${{ needs.ldflags_args.outputs.commit }} diff --git a/.github/workflows/security.yml b/.github/workflows/security.yml index dc45936ea2..cf0ad4e791 100644 --- a/.github/workflows/security.yml +++ b/.github/workflows/security.yml @@ -1,3 +1,6 @@ +# SPDX-FileCopyrightText: Copyright 2023 The Minder Authors +# SPDX-License-Identifier: Apache-2.0 + on: workflow_call: jobs: diff --git a/.github/workflows/stalebot.yml b/.github/workflows/stalebot.yml index 91c83efd2c..e9a87cde1d 100644 --- a/.github/workflows/stalebot.yml +++ b/.github/workflows/stalebot.yml @@ -1,17 +1,5 @@ -# -# Copyright 2023 Stacklok, 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. +# SPDX-FileCopyrightText: Copyright 2023 The Minder Authors +# SPDX-License-Identifier: Apache-2.0 # This action closes stale issues and PRs that have had no activity for a period of time. # Issues: diff --git a/.github/workflows/tags.yml b/.github/workflows/tags.yml index 6d6029e682..3e5205c241 100644 --- a/.github/workflows/tags.yml +++ b/.github/workflows/tags.yml @@ -1,17 +1,5 @@ -# -# Copyright 2023 Stacklok, 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. +# SPDX-FileCopyrightText: Copyright 2023 The Minder Authors +# SPDX-License-Identifier: Apache-2.0 name: Tags diff --git a/.github/workflows/test-deploy-doc.yml b/.github/workflows/test-deploy-doc.yml index a140111882..66fb388e46 100644 --- a/.github/workflows/test-deploy-doc.yml +++ b/.github/workflows/test-deploy-doc.yml @@ -1,3 +1,6 @@ +# SPDX-FileCopyrightText: Copyright 2023 The Minder Authors +# SPDX-License-Identifier: Apache-2.0 + name: Test documentation on: workflow_call: diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index a029ed4562..ccd1df9cca 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -1,3 +1,6 @@ +# SPDX-FileCopyrightText: Copyright 2023 The Minder Authors +# SPDX-License-Identifier: Apache-2.0 + on: workflow_call: workflow_dispatch: diff --git a/.github/workflows/update-docs-cli.yml b/.github/workflows/update-docs-cli.yml index 1d0127eff9..b7d3be5d25 100644 --- a/.github/workflows/update-docs-cli.yml +++ b/.github/workflows/update-docs-cli.yml @@ -1,3 +1,6 @@ +# SPDX-FileCopyrightText: Copyright 2023 The Minder Authors +# SPDX-License-Identifier: Apache-2.0 + name: Update docs for client on: push: diff --git a/.github/workflows/update-docs-dbschema.yml b/.github/workflows/update-docs-dbschema.yml index 3b0079c86e..3126361cb9 100644 --- a/.github/workflows/update-docs-dbschema.yml +++ b/.github/workflows/update-docs-dbschema.yml @@ -1,3 +1,6 @@ +# SPDX-FileCopyrightText: Copyright 2023 The Minder Authors +# SPDX-License-Identifier: Apache-2.0 + name: Build dbschema if needed on: workflow_dispatch: diff --git a/.github/workflows/update-docs-helm.yml b/.github/workflows/update-docs-helm.yml index 5df03d1090..060501344a 100644 --- a/.github/workflows/update-docs-helm.yml +++ b/.github/workflows/update-docs-helm.yml @@ -1,3 +1,6 @@ +# SPDX-FileCopyrightText: Copyright 2023 The Minder Authors +# SPDX-License-Identifier: Apache-2.0 + name: Update docs for helm on: push: diff --git a/.golangci.yml b/.golangci.yml index 89af554653..1674c70999 100644 --- a/.golangci.yml +++ b/.golangci.yml @@ -1,3 +1,6 @@ +# SPDX-FileCopyrightText: Copyright 2023 The Minder Authors +# SPDX-License-Identifier: Apache-2.0 + run: issues-exit-code: 1 timeout: 5m diff --git a/.goreleaser.yaml b/.goreleaser.yaml index c72a84bd5f..c38974095d 100644 --- a/.goreleaser.yaml +++ b/.goreleaser.yaml @@ -1,3 +1,6 @@ +# SPDX-FileCopyrightText: Copyright 2024 The Minder Authors +# SPDX-License-Identifier: Apache-2.0 + # This is an example .goreleaser.yml file with some sensible defaults. # Make sure to check the documentation at https://goreleaser.com @@ -41,20 +44,6 @@ archives: format_overrides: - goos: windows format: zip -# This section defines how to release to homebrew. -brews: - - homepage: 'https://github.com/mindersec/minder' - description: 'minder is the client CLI for interacting with Minder by Stacklok.' - directory: Formula - commit_author: - name: stacklokbot - email: info@stacklok.com - repository: - owner: stacklok - name: homebrew-tap - token: "{{ .Env.HOMEBREW_TAP_GITHUB_TOKEN }}" - test: | - system "#{bin}/minder --help" # This section defines how to release to winget. winget: - name: minder diff --git a/.mk/build.mk b/.mk/build.mk index b7a941b8a8..2c67c7e7e6 100644 --- a/.mk/build.mk +++ b/.mk/build.mk @@ -1,17 +1,5 @@ -# -# Copyright 2023 Stacklok, 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. +# SPDX-FileCopyrightText: Copyright 2023 The Minder Authors +# SPDX-License-Identifier: Apache-2.0 .PHONY: build build: build-minder-cli build-minder-server build-mindev build-reminder-server ## build all binaries diff --git a/.mk/db.mk b/.mk/db.mk index 9db892cca4..bea6fcad0a 100644 --- a/.mk/db.mk +++ b/.mk/db.mk @@ -1,17 +1,5 @@ -# -# Copyright 2023 Stacklok, 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. +# SPDX-FileCopyrightText: Copyright 2023 The Minder Authors +# SPDX-License-Identifier: Apache-2.0 .PHONY: migrateup migrateup: ## run migrate up diff --git a/.mk/develop.mk b/.mk/develop.mk index a34fab1129..f5ee4f3020 100644 --- a/.mk/develop.mk +++ b/.mk/develop.mk @@ -1,17 +1,5 @@ -# -# Copyright 2023 Stacklok, 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. +# SPDX-FileCopyrightText: Copyright 2023 The Minder Authors +# SPDX-License-Identifier: Apache-2.0 DOCKERARCH := $(shell uname -m | sed 's/x86_64/amd64/' | sed 's/aarch64/arm64/') diff --git a/.mk/gen.mk b/.mk/gen.mk index 84a9f824eb..d94578bd26 100644 --- a/.mk/gen.mk +++ b/.mk/gen.mk @@ -1,17 +1,5 @@ -# -# Copyright 2023 Stacklok, 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. +# SPDX-FileCopyrightText: Copyright 2023 The Minder Authors +# SPDX-License-Identifier: Apache-2.0 .PHONY: clean-gen clean-gen: ## clean generated files diff --git a/.mk/helm.mk b/.mk/helm.mk index 1b2a294a54..84acefbda6 100644 --- a/.mk/helm.mk +++ b/.mk/helm.mk @@ -1,17 +1,5 @@ -# -# Copyright 2023 Stacklok, 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. +# SPDX-FileCopyrightText: Copyright 2023 The Minder Authors +# SPDX-License-Identifier: Apache-2.0 .PHONY: helm helm: ## build the helm chart to a local archive, using ko for the image build diff --git a/.mk/identity.mk b/.mk/identity.mk index 9c78923110..6d9d7114de 100644 --- a/.mk/identity.mk +++ b/.mk/identity.mk @@ -1,17 +1,5 @@ -# -# Copyright 2023 Stacklok, 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. +# SPDX-FileCopyrightText: Copyright 2023 The Minder Authors +# SPDX-License-Identifier: Apache-2.0 .PHONY: github-login password-login github-login: ## setup GitHub login on Keycloak @@ -31,4 +19,4 @@ endif password-login: @echo "Setting up password login..." @$(CONTAINER) exec -it keycloak_container /opt/keycloak/bin/kcadm.sh create users -r stacklok -s username=testuser -s enabled=true -s email=testuser@example.com -s 'attributes.Demo=["value"]' - @$(CONTAINER) exec -it keycloak_container /opt/keycloak/bin/kcadm.sh set-password -r stacklok --username testuser --new-password tester \ No newline at end of file + @$(CONTAINER) exec -it keycloak_container /opt/keycloak/bin/kcadm.sh set-password -r stacklok --username testuser --new-password tester diff --git a/.mk/test.mk b/.mk/test.mk index 38024a4d0c..f5b8cd96a8 100644 --- a/.mk/test.mk +++ b/.mk/test.mk @@ -1,17 +1,5 @@ -# -# Copyright 2023 Stacklok, 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. +# SPDX-FileCopyrightText: Copyright 2023 The Minder Authors +# SPDX-License-Identifier: Apache-2.0 # exclude auto-generated DB code as well as mocks # in future, we may want to parse these from a file instead of hardcoding them diff --git a/.trivy.yml b/.trivy.yml index ce5281e411..52a67fbd92 100644 --- a/.trivy.yml +++ b/.trivy.yml @@ -1,3 +1,6 @@ +# SPDX-FileCopyrightText: Copyright 2023 The Minder Authors +# SPDX-License-Identifier: Apache-2.0 + --- exit-code: 1 severity: diff --git a/Makefile b/Makefile index 7a8634dfd0..f14ee13c12 100644 --- a/Makefile +++ b/Makefile @@ -1,17 +1,5 @@ -# -# Copyright 2023 Stacklok, 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. +# SPDX-FileCopyrightText: Copyright 2023 The Minder Authors +# SPDX-License-Identifier: Apache-2.0 default: help diff --git a/README.md b/README.md index dc97ec7903..fc976f014d 100644 --- a/README.md +++ b/README.md @@ -54,7 +54,7 @@ Choose your preferred method to install `minder`: Make sure you have [Homebrew](https://brew.sh/) installed. ```bash -brew install stacklok/tap/minder +brew install minder ``` ### Windows (Winget) diff --git a/buf.gen.yaml b/buf.gen.yaml index 7ca9372cb0..58dd7cdce5 100644 --- a/buf.gen.yaml +++ b/buf.gen.yaml @@ -1,17 +1,5 @@ -# -# Copyright 2023 Stacklok, 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. +# SPDX-FileCopyrightText: Copyright 2023 The Minder Authors +# SPDX-License-Identifier: Apache-2.0 version: v1 plugins: diff --git a/buf.work.yaml b/buf.work.yaml index 8b88d561bf..e0ed3eccfd 100644 --- a/buf.work.yaml +++ b/buf.work.yaml @@ -1,17 +1,5 @@ -# -# Copyright 2023 Stacklok, 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. +# SPDX-FileCopyrightText: Copyright 2023 The Minder Authors +# SPDX-License-Identifier: Apache-2.0 version: v1 directories: diff --git a/cmd/cli/app/artifact/artifact.go b/cmd/cli/app/artifact/artifact.go index 07c9336a16..3030d4f471 100644 --- a/cmd/cli/app/artifact/artifact.go +++ b/cmd/cli/app/artifact/artifact.go @@ -1,17 +1,5 @@ -// -// Copyright 2023 Stacklok, 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. +// SPDX-FileCopyrightText: Copyright 2023 The Minder Authors +// SPDX-License-Identifier: Apache-2.0 // Package artifact provides the artifact subcommands package artifact diff --git a/cmd/cli/app/artifact/artifact_get.go b/cmd/cli/app/artifact/artifact_get.go index 735432ec02..5490491a54 100644 --- a/cmd/cli/app/artifact/artifact_get.go +++ b/cmd/cli/app/artifact/artifact_get.go @@ -1,17 +1,5 @@ -// -// Copyright 2023 Stacklok, 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. +// SPDX-FileCopyrightText: Copyright 2023 The Minder Authors +// SPDX-License-Identifier: Apache-2.0 package artifact diff --git a/cmd/cli/app/artifact/artifact_list.go b/cmd/cli/app/artifact/artifact_list.go index a6eda36c48..3e2e7d6295 100644 --- a/cmd/cli/app/artifact/artifact_list.go +++ b/cmd/cli/app/artifact/artifact_list.go @@ -1,17 +1,5 @@ -// -// Copyright 2023 Stacklok, 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. +// SPDX-FileCopyrightText: Copyright 2023 The Minder Authors +// SPDX-License-Identifier: Apache-2.0 package artifact diff --git a/cmd/cli/app/auth/auth.go b/cmd/cli/app/auth/auth.go index 0b5e360c1f..94e619ecf8 100644 --- a/cmd/cli/app/auth/auth.go +++ b/cmd/cli/app/auth/auth.go @@ -1,17 +1,5 @@ -// -// Copyright 2023 Stacklok, 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. +// SPDX-FileCopyrightText: Copyright 2023 The Minder Authors +// SPDX-License-Identifier: Apache-2.0 // Package auth provides the auth command project for the minder CLI. package auth diff --git a/cmd/cli/app/auth/auth_delete.go b/cmd/cli/app/auth/auth_delete.go index ab4d4f52e3..55bbb251a8 100644 --- a/cmd/cli/app/auth/auth_delete.go +++ b/cmd/cli/app/auth/auth_delete.go @@ -1,17 +1,5 @@ -// -// Copyright 2023 Stacklok, 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. +// SPDX-FileCopyrightText: Copyright 2023 The Minder Authors +// SPDX-License-Identifier: Apache-2.0 package auth diff --git a/cmd/cli/app/auth/auth_login.go b/cmd/cli/app/auth/auth_login.go index 8cb9af95b7..faddf27847 100644 --- a/cmd/cli/app/auth/auth_login.go +++ b/cmd/cli/app/auth/auth_login.go @@ -1,17 +1,5 @@ -// -// Copyright 2023 Stacklok, 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. +// SPDX-FileCopyrightText: Copyright 2023 The Minder Authors +// SPDX-License-Identifier: Apache-2.0 package auth diff --git a/cmd/cli/app/auth/auth_logout.go b/cmd/cli/app/auth/auth_logout.go index fa347f6df4..90f5b0e0a8 100644 --- a/cmd/cli/app/auth/auth_logout.go +++ b/cmd/cli/app/auth/auth_logout.go @@ -1,17 +1,5 @@ -// -// Copyright 2023 Stacklok, 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. +// SPDX-FileCopyrightText: Copyright 2023 The Minder Authors +// SPDX-License-Identifier: Apache-2.0 package auth diff --git a/cmd/cli/app/auth/auth_test.go b/cmd/cli/app/auth/auth_test.go index 107b78d61a..23df2a08d8 100644 --- a/cmd/cli/app/auth/auth_test.go +++ b/cmd/cli/app/auth/auth_test.go @@ -1,17 +1,5 @@ -// -// Copyright 2023 Stacklok, 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. +// SPDX-FileCopyrightText: Copyright 2023 The Minder Authors +// SPDX-License-Identifier: Apache-2.0 package auth diff --git a/cmd/cli/app/auth/auth_token.go b/cmd/cli/app/auth/auth_token.go index 6b321dd42c..e1ce117256 100644 --- a/cmd/cli/app/auth/auth_token.go +++ b/cmd/cli/app/auth/auth_token.go @@ -1,17 +1,5 @@ -// -// Copyright 2024 Stacklok, 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. +// SPDX-FileCopyrightText: Copyright 2024 The Minder Authors +// SPDX-License-Identifier: Apache-2.0 package auth diff --git a/cmd/cli/app/auth/auth_whoami.go b/cmd/cli/app/auth/auth_whoami.go index f99335e253..2ce3627c84 100644 --- a/cmd/cli/app/auth/auth_whoami.go +++ b/cmd/cli/app/auth/auth_whoami.go @@ -1,17 +1,5 @@ -// -// Copyright 2023 Stacklok, 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. +// SPDX-FileCopyrightText: Copyright 2023 The Minder Authors +// SPDX-License-Identifier: Apache-2.0 package auth diff --git a/cmd/cli/app/auth/common.go b/cmd/cli/app/auth/common.go index 5d74a94658..a92d2b490f 100644 --- a/cmd/cli/app/auth/common.go +++ b/cmd/cli/app/auth/common.go @@ -1,16 +1,5 @@ -// Copyright 2023 Stacklok, 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. +// SPDX-FileCopyrightText: Copyright 2023 The Minder Authors +// SPDX-License-Identifier: Apache-2.0 package auth diff --git a/cmd/cli/app/auth/invite/invite.go b/cmd/cli/app/auth/invite/invite.go index 446a84c383..f560fe4ddd 100644 --- a/cmd/cli/app/auth/invite/invite.go +++ b/cmd/cli/app/auth/invite/invite.go @@ -1,17 +1,5 @@ -// -// Copyright 2024 Stacklok, 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. +// SPDX-FileCopyrightText: Copyright 2024 The Minder Authors +// SPDX-License-Identifier: Apache-2.0 // Package invite provides the auth invite command for the minder CLI. package invite diff --git a/cmd/cli/app/auth/invite/invite_accept.go b/cmd/cli/app/auth/invite/invite_accept.go index 5484c3ee7a..28c2114dbe 100644 --- a/cmd/cli/app/auth/invite/invite_accept.go +++ b/cmd/cli/app/auth/invite/invite_accept.go @@ -1,17 +1,5 @@ -// -// Copyright 2023 Stacklok, 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. +// SPDX-FileCopyrightText: Copyright 2023 The Minder Authors +// SPDX-License-Identifier: Apache-2.0 // Package invite provides the auth invite command for the minder CLI. package invite diff --git a/cmd/cli/app/auth/invite/invite_decline.go b/cmd/cli/app/auth/invite/invite_decline.go index 215319b00c..26266c1067 100644 --- a/cmd/cli/app/auth/invite/invite_decline.go +++ b/cmd/cli/app/auth/invite/invite_decline.go @@ -1,17 +1,5 @@ -// -// Copyright 2023 Stacklok, 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. +// SPDX-FileCopyrightText: Copyright 2023 The Minder Authors +// SPDX-License-Identifier: Apache-2.0 // Package invite provides the auth invite command for the minder CLI. package invite diff --git a/cmd/cli/app/auth/invite/invite_get.go b/cmd/cli/app/auth/invite/invite_get.go index 2e47ef43ea..0c239f1e55 100644 --- a/cmd/cli/app/auth/invite/invite_get.go +++ b/cmd/cli/app/auth/invite/invite_get.go @@ -1,17 +1,5 @@ -// -// Copyright 2023 Stacklok, 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. +// SPDX-FileCopyrightText: Copyright 2023 The Minder Authors +// SPDX-License-Identifier: Apache-2.0 // Package invite provides the auth invite command for the minder CLI. package invite diff --git a/cmd/cli/app/auth/invite/invite_list.go b/cmd/cli/app/auth/invite/invite_list.go index 759996cc56..f2c8a78241 100644 --- a/cmd/cli/app/auth/invite/invite_list.go +++ b/cmd/cli/app/auth/invite/invite_list.go @@ -1,17 +1,5 @@ -// -// Copyright 2023 Stacklok, 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. +// SPDX-FileCopyrightText: Copyright 2023 The Minder Authors +// SPDX-License-Identifier: Apache-2.0 // Package invite provides the auth invite command for the minder CLI. package invite diff --git a/cmd/cli/app/auth/offline_token/offline.go b/cmd/cli/app/auth/offline_token/offline.go index d0a5cb8397..bd87e3f7f1 100644 --- a/cmd/cli/app/auth/offline_token/offline.go +++ b/cmd/cli/app/auth/offline_token/offline.go @@ -1,17 +1,5 @@ -// -// Copyright 2024 Stacklok, 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. +// SPDX-FileCopyrightText: Copyright 2024 The Minder Authors +// SPDX-License-Identifier: Apache-2.0 // Package offline_token provides the auth offline_token command for the minder CLI. package offline_token diff --git a/cmd/cli/app/auth/offline_token/offline_get.go b/cmd/cli/app/auth/offline_token/offline_get.go index 2b409db3b1..fcbf5b63ce 100644 --- a/cmd/cli/app/auth/offline_token/offline_get.go +++ b/cmd/cli/app/auth/offline_token/offline_get.go @@ -1,17 +1,5 @@ -// -// Copyright 2024 Stacklok, 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. +// SPDX-FileCopyrightText: Copyright 2024 The Minder Authors +// SPDX-License-Identifier: Apache-2.0 // Package offline_token provides the auth offline_token command for the minder CLI.\ package offline_token diff --git a/cmd/cli/app/auth/offline_token/offline_revoke.go b/cmd/cli/app/auth/offline_token/offline_revoke.go index ad2d3a4609..145ced0570 100644 --- a/cmd/cli/app/auth/offline_token/offline_revoke.go +++ b/cmd/cli/app/auth/offline_token/offline_revoke.go @@ -1,17 +1,5 @@ -// -// Copyright 2024 Stacklok, 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. +// SPDX-FileCopyrightText: Copyright 2024 The Minder Authors +// SPDX-License-Identifier: Apache-2.0 // Package offline_token provides the auth offline_token command for the minder CLI. package offline_token diff --git a/cmd/cli/app/auth/offline_token/offline_use.go b/cmd/cli/app/auth/offline_token/offline_use.go index 9897a41cb9..678545d4b9 100644 --- a/cmd/cli/app/auth/offline_token/offline_use.go +++ b/cmd/cli/app/auth/offline_token/offline_use.go @@ -1,17 +1,5 @@ -// -// Copyright 2024 Stacklok, 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. +// SPDX-FileCopyrightText: Copyright 2024 The Minder Authors +// SPDX-License-Identifier: Apache-2.0 // Package offline_token provides the auth offline_token command for the minder CLI. package offline_token diff --git a/cmd/cli/app/common/table_render.go b/cmd/cli/app/common/table_render.go index 539b158483..5df0e59633 100644 --- a/cmd/cli/app/common/table_render.go +++ b/cmd/cli/app/common/table_render.go @@ -1,16 +1,5 @@ -// Copyright 2024 Stacklok, 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. +// SPDX-FileCopyrightText: Copyright 2024 The Minder Authors +// SPDX-License-Identifier: Apache-2.0 // Package common contains logic shared between multiple subcommands package common diff --git a/cmd/cli/app/docs/docs.go b/cmd/cli/app/docs/docs.go index df2ba01207..cbff495e3c 100644 --- a/cmd/cli/app/docs/docs.go +++ b/cmd/cli/app/docs/docs.go @@ -1,17 +1,5 @@ -// -// Copyright 2023 Stacklok, 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. +// SPDX-FileCopyrightText: Copyright 2023 The Minder Authors +// SPDX-License-Identifier: Apache-2.0 // Package apply provides the apply command for the minder CLI package apply diff --git a/cmd/cli/app/history/history.go b/cmd/cli/app/history/history.go index 28901503e7..13ea473950 100644 --- a/cmd/cli/app/history/history.go +++ b/cmd/cli/app/history/history.go @@ -1,16 +1,5 @@ -// Copyright 2024 Stacklok, 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. +// SPDX-FileCopyrightText: Copyright 2024 The Minder Authors +// SPDX-License-Identifier: Apache-2.0 // Package history provides the CLI subcommand for managing profile statuses package history diff --git a/cmd/cli/app/history/history_list.go b/cmd/cli/app/history/history_list.go index a42966d674..b62afef1be 100644 --- a/cmd/cli/app/history/history_list.go +++ b/cmd/cli/app/history/history_list.go @@ -1,16 +1,5 @@ -// Copyright 2024 Stacklok, 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. +// SPDX-FileCopyrightText: Copyright 2024 The Minder Authors +// SPDX-License-Identifier: Apache-2.0 package history diff --git a/cmd/cli/app/profile/apply.go b/cmd/cli/app/profile/apply.go index 31d6c5ce72..840e2a48ea 100644 --- a/cmd/cli/app/profile/apply.go +++ b/cmd/cli/app/profile/apply.go @@ -1,17 +1,5 @@ -// -// Copyright 2023 Stacklok, 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. +// SPDX-FileCopyrightText: Copyright 2023 The Minder Authors +// SPDX-License-Identifier: Apache-2.0 package profile diff --git a/cmd/cli/app/profile/common.go b/cmd/cli/app/profile/common.go index b58236a141..6fa3d5cab0 100644 --- a/cmd/cli/app/profile/common.go +++ b/cmd/cli/app/profile/common.go @@ -1,16 +1,5 @@ -// Copyright 2023 Stacklok, 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. +// SPDX-FileCopyrightText: Copyright 2023 The Minder Authors +// SPDX-License-Identifier: Apache-2.0 package profile diff --git a/cmd/cli/app/profile/create.go b/cmd/cli/app/profile/create.go index 55e197d7ed..00dd3e2798 100644 --- a/cmd/cli/app/profile/create.go +++ b/cmd/cli/app/profile/create.go @@ -1,17 +1,5 @@ -// -// Copyright 2023 Stacklok, 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. +// SPDX-FileCopyrightText: Copyright 2023 The Minder Authors +// SPDX-License-Identifier: Apache-2.0 package profile diff --git a/cmd/cli/app/profile/delete.go b/cmd/cli/app/profile/delete.go index bb7a07c729..8e61c94647 100644 --- a/cmd/cli/app/profile/delete.go +++ b/cmd/cli/app/profile/delete.go @@ -1,17 +1,5 @@ -// -// Copyright 2023 Stacklok, 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. +// SPDX-FileCopyrightText: Copyright 2023 The Minder Authors +// SPDX-License-Identifier: Apache-2.0 package profile diff --git a/cmd/cli/app/profile/get.go b/cmd/cli/app/profile/get.go index 2d80440251..7cc01bb628 100644 --- a/cmd/cli/app/profile/get.go +++ b/cmd/cli/app/profile/get.go @@ -1,17 +1,5 @@ -// -// Copyright 2023 Stacklok, 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. +// SPDX-FileCopyrightText: Copyright 2023 The Minder Authors +// SPDX-License-Identifier: Apache-2.0 package profile diff --git a/cmd/cli/app/profile/list.go b/cmd/cli/app/profile/list.go index 99b6489644..ae62e01b45 100644 --- a/cmd/cli/app/profile/list.go +++ b/cmd/cli/app/profile/list.go @@ -1,17 +1,5 @@ -// -// Copyright 2023 Stacklok, 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. +// SPDX-FileCopyrightText: Copyright 2023 The Minder Authors +// SPDX-License-Identifier: Apache-2.0 package profile diff --git a/cmd/cli/app/profile/profile.go b/cmd/cli/app/profile/profile.go index 6107082089..2efc00545e 100644 --- a/cmd/cli/app/profile/profile.go +++ b/cmd/cli/app/profile/profile.go @@ -1,17 +1,5 @@ -// -// Copyright 2023 Stacklok, 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. +// SPDX-FileCopyrightText: Copyright 2023 The Minder Authors +// SPDX-License-Identifier: Apache-2.0 // Package profile provides the CLI subcommand for managing profiles package profile diff --git a/cmd/cli/app/profile/status/status.go b/cmd/cli/app/profile/status/status.go index ca5af96b74..9718666cb4 100644 --- a/cmd/cli/app/profile/status/status.go +++ b/cmd/cli/app/profile/status/status.go @@ -1,17 +1,5 @@ -// -// Copyright 2023 Stacklok, 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. +// SPDX-FileCopyrightText: Copyright 2023 The Minder Authors +// SPDX-License-Identifier: Apache-2.0 // Package status provides the CLI subcommand for managing profile statuses package status diff --git a/cmd/cli/app/profile/status/status_get.go b/cmd/cli/app/profile/status/status_get.go index 1313b6e646..58d2b87e0f 100644 --- a/cmd/cli/app/profile/status/status_get.go +++ b/cmd/cli/app/profile/status/status_get.go @@ -1,17 +1,5 @@ -// -// Copyright 2023 Stacklok, 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. +// SPDX-FileCopyrightText: Copyright 2023 The Minder Authors +// SPDX-License-Identifier: Apache-2.0 package status diff --git a/cmd/cli/app/profile/status/status_list.go b/cmd/cli/app/profile/status/status_list.go index 96b8c5d551..bfa17ad049 100644 --- a/cmd/cli/app/profile/status/status_list.go +++ b/cmd/cli/app/profile/status/status_list.go @@ -1,17 +1,5 @@ -// -// Copyright 2023 Stacklok, 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. +// SPDX-FileCopyrightText: Copyright 2023 The Minder Authors +// SPDX-License-Identifier: Apache-2.0 package status diff --git a/cmd/cli/app/profile/table_render.go b/cmd/cli/app/profile/table_render.go index e8594a04fd..8ea52e7594 100644 --- a/cmd/cli/app/profile/table_render.go +++ b/cmd/cli/app/profile/table_render.go @@ -1,17 +1,5 @@ -// -// Copyright 2023 Stacklok, 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. +// SPDX-FileCopyrightText: Copyright 2023 The Minder Authors +// SPDX-License-Identifier: Apache-2.0 package profile diff --git a/cmd/cli/app/project/project.go b/cmd/cli/app/project/project.go index 0104ced7aa..4b32fcf94f 100644 --- a/cmd/cli/app/project/project.go +++ b/cmd/cli/app/project/project.go @@ -1,17 +1,5 @@ -// -// Copyright 2024 Stacklok, 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. +// SPDX-FileCopyrightText: Copyright 2024 The Minder Authors +// SPDX-License-Identifier: Apache-2.0 // Package project is the root command for the project subcommands package project diff --git a/cmd/cli/app/project/project_create.go b/cmd/cli/app/project/project_create.go index e492b01201..c62d102f57 100644 --- a/cmd/cli/app/project/project_create.go +++ b/cmd/cli/app/project/project_create.go @@ -1,17 +1,5 @@ -// -// Copyright 2024 Stacklok, 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. +// SPDX-FileCopyrightText: Copyright 2024 The Minder Authors +// SPDX-License-Identifier: Apache-2.0 package project diff --git a/cmd/cli/app/project/project_delete.go b/cmd/cli/app/project/project_delete.go index c1a6dc7d52..2a05e0c94b 100644 --- a/cmd/cli/app/project/project_delete.go +++ b/cmd/cli/app/project/project_delete.go @@ -1,17 +1,5 @@ -// -// Copyright 2024 Stacklok, 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. +// SPDX-FileCopyrightText: Copyright 2024 The Minder Authors +// SPDX-License-Identifier: Apache-2.0 package project diff --git a/cmd/cli/app/project/project_list.go b/cmd/cli/app/project/project_list.go index 29fab867ac..f2f9c3c34f 100644 --- a/cmd/cli/app/project/project_list.go +++ b/cmd/cli/app/project/project_list.go @@ -1,17 +1,5 @@ -// -// Copyright 2024 Stacklok, 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. +// SPDX-FileCopyrightText: Copyright 2024 The Minder Authors +// SPDX-License-Identifier: Apache-2.0 package project diff --git a/cmd/cli/app/project/role/role.go b/cmd/cli/app/project/role/role.go index c12085102c..7149c231e7 100644 --- a/cmd/cli/app/project/role/role.go +++ b/cmd/cli/app/project/role/role.go @@ -1,17 +1,5 @@ -// -// Copyright 2024 Stacklok, 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. +// SPDX-FileCopyrightText: Copyright 2024 The Minder Authors +// SPDX-License-Identifier: Apache-2.0 // Package role is the root command for the role subcommands package role diff --git a/cmd/cli/app/project/role/role_deny.go b/cmd/cli/app/project/role/role_deny.go index 38c26ef072..956cf46ef9 100644 --- a/cmd/cli/app/project/role/role_deny.go +++ b/cmd/cli/app/project/role/role_deny.go @@ -1,17 +1,5 @@ -// -// Copyright 2024 Stacklok, 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. +// SPDX-FileCopyrightText: Copyright 2024 The Minder Authors +// SPDX-License-Identifier: Apache-2.0 package role diff --git a/cmd/cli/app/project/role/role_grant.go b/cmd/cli/app/project/role/role_grant.go index 8d5d955667..77d02742a9 100644 --- a/cmd/cli/app/project/role/role_grant.go +++ b/cmd/cli/app/project/role/role_grant.go @@ -1,17 +1,5 @@ -// -// Copyright 2024 Stacklok, 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. +// SPDX-FileCopyrightText: Copyright 2024 The Minder Authors +// SPDX-License-Identifier: Apache-2.0 package role diff --git a/cmd/cli/app/project/role/role_grant_list.go b/cmd/cli/app/project/role/role_grant_list.go index 0ad18ccb16..882a842bb6 100644 --- a/cmd/cli/app/project/role/role_grant_list.go +++ b/cmd/cli/app/project/role/role_grant_list.go @@ -1,17 +1,5 @@ -// -// Copyright 2024 Stacklok, 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. +// SPDX-FileCopyrightText: Copyright 2024 The Minder Authors +// SPDX-License-Identifier: Apache-2.0 package role diff --git a/cmd/cli/app/project/role/role_list.go b/cmd/cli/app/project/role/role_list.go index f6e989ace0..42d06d23a9 100644 --- a/cmd/cli/app/project/role/role_list.go +++ b/cmd/cli/app/project/role/role_list.go @@ -1,17 +1,5 @@ -// -// Copyright 2024 Stacklok, 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. +// SPDX-FileCopyrightText: Copyright 2024 The Minder Authors +// SPDX-License-Identifier: Apache-2.0 package role diff --git a/cmd/cli/app/project/role/role_update.go b/cmd/cli/app/project/role/role_update.go index 4522f03092..bb814bfa84 100644 --- a/cmd/cli/app/project/role/role_update.go +++ b/cmd/cli/app/project/role/role_update.go @@ -1,17 +1,5 @@ -// -// Copyright 2024 Stacklok, 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. +// SPDX-FileCopyrightText: Copyright 2024 The Minder Authors +// SPDX-License-Identifier: Apache-2.0 package role diff --git a/cmd/cli/app/provider/provider.go b/cmd/cli/app/provider/provider.go index 37c303331d..814550c28e 100644 --- a/cmd/cli/app/provider/provider.go +++ b/cmd/cli/app/provider/provider.go @@ -1,17 +1,5 @@ -// -// Copyright 2023 Stacklok, 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. +// SPDX-FileCopyrightText: Copyright 2023 The Minder Authors +// SPDX-License-Identifier: Apache-2.0 // Package provider is the root command for the provider subcommands package provider diff --git a/cmd/cli/app/provider/provider_delete.go b/cmd/cli/app/provider/provider_delete.go index cecaec7e4c..7948e33a87 100644 --- a/cmd/cli/app/provider/provider_delete.go +++ b/cmd/cli/app/provider/provider_delete.go @@ -1,17 +1,5 @@ -// -// Copyright 2024 Stacklok, 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. +// SPDX-FileCopyrightText: Copyright 2024 The Minder Authors +// SPDX-License-Identifier: Apache-2.0 package provider diff --git a/cmd/cli/app/provider/provider_enroll.go b/cmd/cli/app/provider/provider_enroll.go index 0b989d6a23..cd37a3a863 100644 --- a/cmd/cli/app/provider/provider_enroll.go +++ b/cmd/cli/app/provider/provider_enroll.go @@ -1,17 +1,5 @@ -// -// Copyright 2023 Stacklok, 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. +// SPDX-FileCopyrightText: Copyright 2023 The Minder Authors +// SPDX-License-Identifier: Apache-2.0 package provider diff --git a/cmd/cli/app/provider/provider_get.go b/cmd/cli/app/provider/provider_get.go index 29d78b3fe3..eeee1af425 100644 --- a/cmd/cli/app/provider/provider_get.go +++ b/cmd/cli/app/provider/provider_get.go @@ -1,17 +1,5 @@ -// -// Copyright 2024 Stacklok, 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. +// SPDX-FileCopyrightText: Copyright 2024 The Minder Authors +// SPDX-License-Identifier: Apache-2.0 package provider diff --git a/cmd/cli/app/provider/provider_list.go b/cmd/cli/app/provider/provider_list.go index a33cb7d74f..77a6ccdc2e 100644 --- a/cmd/cli/app/provider/provider_list.go +++ b/cmd/cli/app/provider/provider_list.go @@ -1,17 +1,5 @@ -// -// Copyright 2024 Stacklok, 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. +// SPDX-FileCopyrightText: Copyright 2024 The Minder Authors +// SPDX-License-Identifier: Apache-2.0 package provider diff --git a/cmd/cli/app/provider/provider_update.go b/cmd/cli/app/provider/provider_update.go index ff414d2fde..fa1a01dd86 100644 --- a/cmd/cli/app/provider/provider_update.go +++ b/cmd/cli/app/provider/provider_update.go @@ -1,17 +1,5 @@ -// -// Copyright 2024 Stacklok, 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. +// SPDX-FileCopyrightText: Copyright 2024 The Minder Authors +// SPDX-License-Identifier: Apache-2.0 package provider diff --git a/cmd/cli/app/provider/provider_update_test.go b/cmd/cli/app/provider/provider_update_test.go index 0990f159d7..e6f844beec 100644 --- a/cmd/cli/app/provider/provider_update_test.go +++ b/cmd/cli/app/provider/provider_update_test.go @@ -1,17 +1,5 @@ -// -// Copyright 2024 Stacklok, 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. +// SPDX-FileCopyrightText: Copyright 2024 The Minder Authors +// SPDX-License-Identifier: Apache-2.0 package provider diff --git a/cmd/cli/app/quickstart/embed/profile.yaml b/cmd/cli/app/quickstart/embed/profile.yaml index f780689d44..467c12ceda 100644 --- a/cmd/cli/app/quickstart/embed/profile.yaml +++ b/cmd/cli/app/quickstart/embed/profile.yaml @@ -1,16 +1,6 @@ -# Copyright 2023 Stacklok, 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. +# SPDX-FileCopyrightText: Copyright 2023 The Minder Authors +# SPDX-License-Identifier: Apache-2.0 + --- # sample profile for the quickstart command version: v1 diff --git a/cmd/cli/app/quickstart/embed/secret_scanning.yaml b/cmd/cli/app/quickstart/embed/secret_scanning.yaml index 41958eb15a..173622458b 100644 --- a/cmd/cli/app/quickstart/embed/secret_scanning.yaml +++ b/cmd/cli/app/quickstart/embed/secret_scanning.yaml @@ -1,16 +1,6 @@ -# Copyright 2023 Stacklok, 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. +# SPDX-FileCopyrightText: Copyright 2023 The Minder Authors +# SPDX-License-Identifier: Apache-2.0 + --- version: v1 type: rule-type @@ -68,4 +58,4 @@ def: alert: type: security_advisory security_advisory: - severity: "medium" \ No newline at end of file + severity: "medium" diff --git a/cmd/cli/app/quickstart/quickstart.go b/cmd/cli/app/quickstart/quickstart.go index 6250083cc2..d1ca226568 100644 --- a/cmd/cli/app/quickstart/quickstart.go +++ b/cmd/cli/app/quickstart/quickstart.go @@ -1,17 +1,5 @@ -// -// Copyright 2023 Stacklok, 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. +// SPDX-FileCopyrightText: Copyright 2023 The Minder Authors +// SPDX-License-Identifier: Apache-2.0 // Package quickstart provides the quickstart command for the minder CLI // which is used to provide the means to quickly get started with minder. diff --git a/cmd/cli/app/repo/repo.go b/cmd/cli/app/repo/repo.go index 1d8983e8cb..83f8fa5e0e 100644 --- a/cmd/cli/app/repo/repo.go +++ b/cmd/cli/app/repo/repo.go @@ -1,17 +1,5 @@ -// -// Copyright 2023 Stacklok, 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. +// SPDX-FileCopyrightText: Copyright 2023 The Minder Authors +// SPDX-License-Identifier: Apache-2.0 // Package repo contains the repo logic for the control plane package repo diff --git a/cmd/cli/app/repo/repo_delete.go b/cmd/cli/app/repo/repo_delete.go index dfb97469fd..a85bfc6f0a 100644 --- a/cmd/cli/app/repo/repo_delete.go +++ b/cmd/cli/app/repo/repo_delete.go @@ -1,17 +1,5 @@ -// -// Copyright 2023 Stacklok, 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. +// SPDX-FileCopyrightText: Copyright 2023 The Minder Authors +// SPDX-License-Identifier: Apache-2.0 package repo diff --git a/cmd/cli/app/repo/repo_get.go b/cmd/cli/app/repo/repo_get.go index 2d5b2d1a97..02e3159587 100644 --- a/cmd/cli/app/repo/repo_get.go +++ b/cmd/cli/app/repo/repo_get.go @@ -1,17 +1,5 @@ -// -// Copyright 2023 Stacklok, 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. +// SPDX-FileCopyrightText: Copyright 2023 The Minder Authors +// SPDX-License-Identifier: Apache-2.0 package repo diff --git a/cmd/cli/app/repo/repo_list.go b/cmd/cli/app/repo/repo_list.go index 190ba18cc9..6d2ae1438b 100644 --- a/cmd/cli/app/repo/repo_list.go +++ b/cmd/cli/app/repo/repo_list.go @@ -1,17 +1,5 @@ -// -// Copyright 2023 Stacklok, 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. +// SPDX-FileCopyrightText: Copyright 2023 The Minder Authors +// SPDX-License-Identifier: Apache-2.0 package repo diff --git a/cmd/cli/app/repo/repo_reconcile.go b/cmd/cli/app/repo/repo_reconcile.go index 6b29861452..a3353a945e 100644 --- a/cmd/cli/app/repo/repo_reconcile.go +++ b/cmd/cli/app/repo/repo_reconcile.go @@ -1,17 +1,5 @@ -// -// Copyright 2024 Stacklok, 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. +// SPDX-FileCopyrightText: Copyright 2024 The Minder Authors +// SPDX-License-Identifier: Apache-2.0 package repo diff --git a/cmd/cli/app/repo/repo_register.go b/cmd/cli/app/repo/repo_register.go index 7585511b57..909909ed08 100644 --- a/cmd/cli/app/repo/repo_register.go +++ b/cmd/cli/app/repo/repo_register.go @@ -1,17 +1,5 @@ -// -// Copyright 2023 Stacklok, 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. +// SPDX-FileCopyrightText: Copyright 2023 The Minder Authors +// SPDX-License-Identifier: Apache-2.0 package repo diff --git a/cmd/cli/app/repo/repo_register_test.go b/cmd/cli/app/repo/repo_register_test.go index e479a5fc4f..cc66dec729 100644 --- a/cmd/cli/app/repo/repo_register_test.go +++ b/cmd/cli/app/repo/repo_register_test.go @@ -1,17 +1,5 @@ -// -// Copyright 2024 Stacklok, 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. +// SPDX-FileCopyrightText: Copyright 2024 The Minder Authors +// SPDX-License-Identifier: Apache-2.0 package repo diff --git a/cmd/cli/app/repo/repo_sts.gou b/cmd/cli/app/repo/repo_sts.gou new file mode 100644 index 0000000000..dcdc2f450e --- /dev/null +++ b/cmd/cli/app/repo/repo_sts.gou @@ -0,0 +1,106 @@ +// SPDX-FileCopyrightText: Copyright 2023 The Minder Authors +// SPDX-License-Identifier: Apache-2.0 + + +package repo + +import ( + "context" + "fmt" + "strings" + + "github.com/spf13/cobra" + "github.com/spf13/viper" + "google.golang.org/grpc" + + "github.com/stacklok/minder/cmd/cli/app" + "github.com/stacklok/minder/internal/util" + "github.com/stacklok/minder/internal/util/cli" + minderv1 "github.com/stacklok/minder/pkg/api/protobuf/go/minder/v1" +) + +var statusCmd = &cobra.Command{ + Use: "status", + Short: "Get repository evaluation status", + Long: `The repo status subcommand is used to get the evaluation status for a registered repository within Minder.`, + RunE: cli.GRPCClientWrapRunE(statusCommand), +} + +// statusCommand is the repo evaluation status subcommand +func statusCommand(ctx context.Context, cmd *cobra.Command, conn *grpc.ClientConn) error { + client := minderv1.NewEvalResultsServiceClient(conn) + + provider := viper.GetString("provider") + project := viper.GetString("project") + format := viper.GetString("output") + entityId := viper.GetString("entity") + ruletypes := viper.GetString("ruletypes") + profile := viper.GetString("profile") + labels := viper.GetString("labels") + + // Ensure the output format is supported + if !app.IsOutputFormatSupported(format) || format == app.Table { + return cli.MessageAndError(fmt.Sprintf("Output format %s not supported", format), fmt.Errorf("invalid argument")) + } + + // No longer print usage on returned error, since we've parsed our inputs + // See https://github.com/spf13/cobra/issues/340#issuecomment-374617413 + cmd.SilenceUsage = true + + // Prepare the evaluation results request + req := &minderv1.ListEvaluationResultsRequest{ + Context: &minderv1.Context{Provider: &provider, Project: &project}, + Entity: []*minderv1.EntityTypedId{{Type: minderv1.Entity_ENTITY_REPOSITORIES, Id: entityId}}, + RuleName: strings.Split(ruletypes, ","), + } + + // Set the profile or labels. Note they are set as mutually exclusive in Cobra too. + if profile != "" { + req.ProfileSelector = &minderv1.ListEvaluationResultsRequest_Profile{ + Profile: profile, + } + } else if labels != "" { + req.ProfileSelector = &minderv1.ListEvaluationResultsRequest_LabelFilter{ + LabelFilter: labels, + } + } + + // Get the evaluation results + res, err := client.ListEvaluationResults(ctx, req) + if err != nil { + return cli.MessageAndError("Error listing evaluation results", err) + } + + // Print result in JSON or YAML format + // TODO: Add table format + switch format { + case app.JSON: + out, err := util.GetJsonFromProto(res) + if err != nil { + return cli.MessageAndError("Error getting json from proto", err) + } + cmd.Println(out) + case app.YAML: + out, err := util.GetYamlFromProto(res) + if err != nil { + return cli.MessageAndError("Error getting yaml from proto", err) + } + cmd.Println(out) + } + + return nil +} + +func init() { + RepoCmd.AddCommand(statusCmd) + // Flags + statusCmd.Flags().StringP("output", "o", app.JSON, + fmt.Sprintf("Output format (one of %s)", strings.Join([]string{app.JSON, app.YAML}, ","))) + statusCmd.Flags().StringP("entity", "e", "", "Entity ID to get evaluation status for") + statusCmd.Flags().StringP("ruletypes", "r", "", "Query by ruletypes, i.e ruletypes=rule1,rule2") + statusCmd.Flags().StringP("profile", "n", "", "Query by a profile") + statusCmd.Flags().StringP("labels", "l", "", "Query by labels") + // Exclusive flags + statusCmd.MarkFlagsMutuallyExclusive("profile", "labels") + +} diff --git a/cmd/cli/app/root.go b/cmd/cli/app/root.go index b44a20d282..8d6ed4f997 100644 --- a/cmd/cli/app/root.go +++ b/cmd/cli/app/root.go @@ -1,17 +1,5 @@ -// -// Copyright 2023 Stacklok, 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. +// SPDX-FileCopyrightText: Copyright 2023 The Minder Authors +// SPDX-License-Identifier: Apache-2.0 // Package app provides the root command for the minder CLI package app diff --git a/cmd/cli/app/ruletype/common.go b/cmd/cli/app/ruletype/common.go index d989930459..aad5b45907 100644 --- a/cmd/cli/app/ruletype/common.go +++ b/cmd/cli/app/ruletype/common.go @@ -1,17 +1,5 @@ -// -// Copyright 2023 Stacklok, 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. +// SPDX-FileCopyrightText: Copyright 2023 The Minder Authors +// SPDX-License-Identifier: Apache-2.0 package ruletype @@ -104,6 +92,10 @@ func shouldSkipFile(f string) bool { ext := filepath.Ext(f) switch ext { case ".yaml", ".yml", ".json": + if cli.IsTestFile(f) { + // Skip test files. + return true + } return false default: fmt.Fprintf(os.Stderr, "Skipping file %s: not a yaml or json file\n", f) diff --git a/cmd/cli/app/ruletype/ruletype.go b/cmd/cli/app/ruletype/ruletype.go index d37077d1c8..ea87f9029b 100644 --- a/cmd/cli/app/ruletype/ruletype.go +++ b/cmd/cli/app/ruletype/ruletype.go @@ -1,17 +1,5 @@ -// -// Copyright 2023 Stacklok, 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. +// SPDX-FileCopyrightText: Copyright 2023 The Minder Authors +// SPDX-License-Identifier: Apache-2.0 // Package ruletype provides the CLI subcommand for managing rules package ruletype diff --git a/cmd/cli/app/ruletype/ruletype_apply.go b/cmd/cli/app/ruletype/ruletype_apply.go index a6ad7be608..8f1c5de7c7 100644 --- a/cmd/cli/app/ruletype/ruletype_apply.go +++ b/cmd/cli/app/ruletype/ruletype_apply.go @@ -1,17 +1,5 @@ -// -// Copyright 2023 Stacklok, 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. +// SPDX-FileCopyrightText: Copyright 2023 The Minder Authors +// SPDX-License-Identifier: Apache-2.0 package ruletype diff --git a/cmd/cli/app/ruletype/ruletype_create.go b/cmd/cli/app/ruletype/ruletype_create.go index 66acf4f9aa..edce3ff2ab 100644 --- a/cmd/cli/app/ruletype/ruletype_create.go +++ b/cmd/cli/app/ruletype/ruletype_create.go @@ -1,17 +1,5 @@ -// -// Copyright 2023 Stacklok, 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. +// SPDX-FileCopyrightText: Copyright 2023 The Minder Authors +// SPDX-License-Identifier: Apache-2.0 package ruletype diff --git a/cmd/cli/app/ruletype/ruletype_delete.go b/cmd/cli/app/ruletype/ruletype_delete.go index 1f27ee8ceb..a8417ae491 100644 --- a/cmd/cli/app/ruletype/ruletype_delete.go +++ b/cmd/cli/app/ruletype/ruletype_delete.go @@ -1,17 +1,5 @@ -// -// Copyright 2023 Stacklok, 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. +// SPDX-FileCopyrightText: Copyright 2023 The Minder Authors +// SPDX-License-Identifier: Apache-2.0 package ruletype diff --git a/cmd/cli/app/ruletype/ruletype_get.go b/cmd/cli/app/ruletype/ruletype_get.go index 666b9b7646..b032e56f02 100644 --- a/cmd/cli/app/ruletype/ruletype_get.go +++ b/cmd/cli/app/ruletype/ruletype_get.go @@ -1,17 +1,5 @@ -// -// Copyright 2023 Stacklok, 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. +// SPDX-FileCopyrightText: Copyright 2023 The Minder Authors +// SPDX-License-Identifier: Apache-2.0 package ruletype diff --git a/cmd/cli/app/ruletype/ruletype_list.go b/cmd/cli/app/ruletype/ruletype_list.go index 1be7b8087b..b9e1a74b10 100644 --- a/cmd/cli/app/ruletype/ruletype_list.go +++ b/cmd/cli/app/ruletype/ruletype_list.go @@ -1,17 +1,5 @@ -// -// Copyright 2023 Stacklok, 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. +// SPDX-FileCopyrightText: Copyright 2023 The Minder Authors +// SPDX-License-Identifier: Apache-2.0 package ruletype diff --git a/cmd/cli/app/set_project/set_project.go b/cmd/cli/app/set_project/set_project.go index e7176806ca..84f2627fb2 100644 --- a/cmd/cli/app/set_project/set_project.go +++ b/cmd/cli/app/set_project/set_project.go @@ -1,17 +1,5 @@ -// -// Copyright 2023 Stacklok, 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. +// SPDX-FileCopyrightText: Copyright 2023 The Minder Authors +// SPDX-License-Identifier: Apache-2.0 // Package set_project provides the version command for the minder CLI package set_project diff --git a/cmd/cli/app/version/version.go b/cmd/cli/app/version/version.go index 106790ae7c..4219e861bd 100644 --- a/cmd/cli/app/version/version.go +++ b/cmd/cli/app/version/version.go @@ -1,17 +1,5 @@ -// -// Copyright 2023 Stacklok, 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. +// SPDX-FileCopyrightText: Copyright 2023 The Minder Authors +// SPDX-License-Identifier: Apache-2.0 // Package version provides the version command for the minder CLI package version diff --git a/cmd/cli/main.go b/cmd/cli/main.go index b3548645d7..a279260c01 100644 --- a/cmd/cli/main.go +++ b/cmd/cli/main.go @@ -1,17 +1,5 @@ -// -// Copyright 2023 Stacklok, 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. +// SPDX-FileCopyrightText: Copyright 2023 The Minder Authors +// SPDX-License-Identifier: Apache-2.0 // Package main provides the entrypoint for the minder cli package main diff --git a/cmd/cli/main_test.go b/cmd/cli/main_test.go index 494ae20269..c0d08cdaa1 100644 --- a/cmd/cli/main_test.go +++ b/cmd/cli/main_test.go @@ -1,17 +1,5 @@ -// -// Copyright 2023 Stacklok, 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. +// SPDX-FileCopyrightText: Copyright 2023 The Minder Authors +// SPDX-License-Identifier: Apache-2.0 package main diff --git a/cmd/dev/app/bundles/build.go b/cmd/dev/app/bundles/build.go index b811b04c94..126d24ded2 100644 --- a/cmd/dev/app/bundles/build.go +++ b/cmd/dev/app/bundles/build.go @@ -1,16 +1,5 @@ -// Copyright 2024 Stacklok, 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. +// SPDX-FileCopyrightText: Copyright 2024 The Minder Authors +// SPDX-License-Identifier: Apache-2.0 package bundles diff --git a/cmd/dev/app/bundles/bundle.go b/cmd/dev/app/bundles/bundle.go index 79e1e7339a..3c8223a018 100644 --- a/cmd/dev/app/bundles/bundle.go +++ b/cmd/dev/app/bundles/bundle.go @@ -1,16 +1,5 @@ -// Copyright 2024 Stacklok, 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. +// SPDX-FileCopyrightText: Copyright 2024 The Minder Authors +// SPDX-License-Identifier: Apache-2.0 // Package bundles contains logic relating to mindpak bundles package bundles diff --git a/cmd/dev/app/image/cmd_verify.go b/cmd/dev/app/image/cmd_verify.go index fdaf114668..f5fd404ac0 100644 --- a/cmd/dev/app/image/cmd_verify.go +++ b/cmd/dev/app/image/cmd_verify.go @@ -1,16 +1,5 @@ -// Copyright 2023 Stacklok, 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. +// SPDX-FileCopyrightText: Copyright 2023 The Minder Authors +// SPDX-License-Identifier: Apache-2.0 package image diff --git a/cmd/dev/app/image/image.go b/cmd/dev/app/image/image.go index 4f8547295d..e17f0ec8a1 100644 --- a/cmd/dev/app/image/image.go +++ b/cmd/dev/app/image/image.go @@ -1,16 +1,5 @@ -// Copyright 2023 Stacklok, 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. +// SPDX-FileCopyrightText: Copyright 2023 The Minder Authors +// SPDX-License-Identifier: Apache-2.0 // Package image provides the root command for the image subcommands package image diff --git a/cmd/dev/app/image/list.go b/cmd/dev/app/image/list.go index f1e1db13fc..6bd153ed8c 100644 --- a/cmd/dev/app/image/list.go +++ b/cmd/dev/app/image/list.go @@ -1,16 +1,5 @@ -// Copyright 2023 Stacklok, 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. +// SPDX-FileCopyrightText: Copyright 2023 The Minder Authors +// SPDX-License-Identifier: Apache-2.0 package image diff --git a/cmd/dev/app/image/list_tags.go b/cmd/dev/app/image/list_tags.go index c2b294441f..327f24fdbc 100644 --- a/cmd/dev/app/image/list_tags.go +++ b/cmd/dev/app/image/list_tags.go @@ -1,16 +1,5 @@ -// Copyright 2023 Stacklok, 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. +// SPDX-FileCopyrightText: Copyright 2023 The Minder Authors +// SPDX-License-Identifier: Apache-2.0 package image diff --git a/cmd/dev/app/root.go b/cmd/dev/app/root.go index 055e0c41f6..c6ccabfe05 100644 --- a/cmd/dev/app/root.go +++ b/cmd/dev/app/root.go @@ -1,17 +1,5 @@ -// -// Copyright 2023 Stacklok, 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. +// SPDX-FileCopyrightText: Copyright 2023 The Minder Authors +// SPDX-License-Identifier: Apache-2.0 // Package app provides the root command for the mindev CLI package app diff --git a/cmd/dev/app/rule_type/lint.go b/cmd/dev/app/rule_type/lint.go index 3a6478f01f..ebd1271f35 100644 --- a/cmd/dev/app/rule_type/lint.go +++ b/cmd/dev/app/rule_type/lint.go @@ -1,16 +1,5 @@ -// Copyright 2023 Stacklok, 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. +// SPDX-FileCopyrightText: Copyright 2023 The Minder Authors +// SPDX-License-Identifier: Apache-2.0 package rule_type @@ -28,6 +17,7 @@ import ( "gopkg.in/yaml.v3" "github.com/mindersec/minder/internal/engine/eval/rego" + "github.com/mindersec/minder/internal/util/cli" minderv1 "github.com/mindersec/minder/pkg/api/protobuf/go/minder/v1" ) @@ -69,7 +59,7 @@ func lintCmdRun(cmd *cobra.Command, _ []string) error { return nil } - if filepath.Ext(path) != ".yaml" && filepath.Ext(path) != ".yml" { + if !cli.IsYAMLFileAndNotATest(path) { return nil } diff --git a/cmd/dev/app/rule_type/rttst.go b/cmd/dev/app/rule_type/rttst.go index fd99f83572..6da4fd89a4 100644 --- a/cmd/dev/app/rule_type/rttst.go +++ b/cmd/dev/app/rule_type/rttst.go @@ -1,16 +1,5 @@ -// Copyright 2023 Stacklok, 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. +// SPDX-FileCopyrightText: Copyright 2023 The Minder Authors +// SPDX-License-Identifier: Apache-2.0 package rule_type @@ -35,7 +24,6 @@ import ( "github.com/mindersec/minder/internal/engine/errors" "github.com/mindersec/minder/internal/engine/eval/rego" engif "github.com/mindersec/minder/internal/engine/interfaces" - "github.com/mindersec/minder/internal/engine/rtengine" "github.com/mindersec/minder/internal/engine/selectors" entModels "github.com/mindersec/minder/internal/entities/models" entProps "github.com/mindersec/minder/internal/entities/properties" @@ -52,6 +40,7 @@ import ( "github.com/mindersec/minder/internal/providers/telemetry" "github.com/mindersec/minder/internal/util/jsonyaml" minderv1 "github.com/mindersec/minder/pkg/api/protobuf/go/minder/v1" + "github.com/mindersec/minder/pkg/engine/v1/rtengine" provifv1 "github.com/mindersec/minder/pkg/providers/v1" ) @@ -160,7 +149,7 @@ func testCmdRun(cmd *cobra.Command, _ []string) error { off := "off" profile.Alert = &off - rules, err := rtengine.GetRulesFromProfileOfType(profile, ruletype) + rules, err := profiles.GetRulesFromProfileOfType(profile, ruletype) if err != nil { return fmt.Errorf("error getting relevant fragment: %w", err) } @@ -241,7 +230,7 @@ func runEvaluationForRules( } cmd.Printf("Profile valid according to the JSON schema!\n") - if err := val.ValidateParamsAgainstSchema(frag.GetParams()); err != nil { + if err := val.ValidateParamsAgainstSchema(frag.GetParams().AsMap()); err != nil { return fmt.Errorf("error validating params against schema: %w", err) } @@ -311,7 +300,7 @@ func selectAndEval( var evalErr error if selected { - evalErr = eng.Eval(ctx, inf, evalStatus) + evalErr = eng.Eval(ctx, inf.Entity, evalStatus.GetRule().Def, evalStatus.GetRule().Params, evalStatus) } else { evalErr = errors.NewErrEvaluationSkipped("entity not selected by selector %s", matchedSelector) } diff --git a/cmd/dev/app/rule_type/ruletype.go b/cmd/dev/app/rule_type/ruletype.go index 1d0da9645b..2fe4332b63 100644 --- a/cmd/dev/app/rule_type/ruletype.go +++ b/cmd/dev/app/rule_type/ruletype.go @@ -1,16 +1,5 @@ -// Copyright 2023 Stacklok, 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. +// SPDX-FileCopyrightText: Copyright 2023 The Minder Authors +// SPDX-License-Identifier: Apache-2.0 // Package rule_type provides the root command for the ruletype subcommands package rule_type diff --git a/cmd/dev/app/testserver/testserver.go b/cmd/dev/app/testserver/testserver.go index aa82f42656..adea43ed13 100644 --- a/cmd/dev/app/testserver/testserver.go +++ b/cmd/dev/app/testserver/testserver.go @@ -1,16 +1,5 @@ -// Copyright 2023 Stacklok, 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. +// SPDX-FileCopyrightText: Copyright 2023 The Minder Authors +// SPDX-License-Identifier: Apache-2.0 // Package testserver spawns a test server useful for integration testing. package testserver diff --git a/cmd/dev/examples/provider.yaml b/cmd/dev/examples/provider.yaml index 8c4aec534a..2336d4056e 100644 --- a/cmd/dev/examples/provider.yaml +++ b/cmd/dev/examples/provider.yaml @@ -1,17 +1,6 @@ # -# Copyright 2023 Stacklok, 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. +# SPDX-FileCopyrightText: Copyright 2023 The Minder Authors +# SPDX-License-Identifier: Apache-2.0 --- # This is a sample provider integrating minder with GitHub diff --git a/cmd/dev/examples/pull_request.yaml b/cmd/dev/examples/pull_request.yaml index 30dce27ad4..382db9b2ac 100644 --- a/cmd/dev/examples/pull_request.yaml +++ b/cmd/dev/examples/pull_request.yaml @@ -1,17 +1,6 @@ # -# Copyright 2023 Stacklok, 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. +# SPDX-FileCopyrightText: Copyright 2023 The Minder Authors +# SPDX-License-Identifier: Apache-2.0 github/pull_url: https://api.github.com/repos/jakubtestorg/bad-npm/pulls/3 github/pull_sha: bd9958a63c9b95ccc2bc0cf1eef65a87529aed16 diff --git a/cmd/dev/examples/repository.yaml b/cmd/dev/examples/repository.yaml index ca05cf7e63..f3288ab637 100644 --- a/cmd/dev/examples/repository.yaml +++ b/cmd/dev/examples/repository.yaml @@ -1,17 +1,6 @@ # -# Copyright 2023 Stacklok, 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. +# SPDX-FileCopyrightText: Copyright 2023 The Minder Authors +# SPDX-License-Identifier: Apache-2.0 --- github/repo_name: demo-repo-go diff --git a/cmd/dev/examples/versioned_artifact.yaml b/cmd/dev/examples/versioned_artifact.yaml index e7f28f2cb3..f4e91592fb 100644 --- a/cmd/dev/examples/versioned_artifact.yaml +++ b/cmd/dev/examples/versioned_artifact.yaml @@ -1,17 +1,6 @@ # -# Copyright 2023 Stacklok, 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. +# SPDX-FileCopyrightText: Copyright 2023 The Minder Authors +# SPDX-License-Identifier: Apache-2.0 upstream_id: 5482209 github/name: test diff --git a/cmd/dev/main.go b/cmd/dev/main.go index 4260d38560..75ab09e413 100644 --- a/cmd/dev/main.go +++ b/cmd/dev/main.go @@ -1,17 +1,5 @@ -// -// Copyright 2023 Stacklok, 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. +// SPDX-FileCopyrightText: Copyright 2023 The Minder Authors +// SPDX-License-Identifier: Apache-2.0 // Package main provides the entrypoint for the rule development cli package main diff --git a/cmd/reminder/app/root.go b/cmd/reminder/app/root.go index 705c0f1ffb..472b602abf 100644 --- a/cmd/reminder/app/root.go +++ b/cmd/reminder/app/root.go @@ -1,17 +1,5 @@ -// -// Copyright 2024 Stacklok, 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. +// SPDX-FileCopyrightText: Copyright 2024 The Minder Authors +// SPDX-License-Identifier: Apache-2.0 // Package app provides the cli subcommands for managing the reminder service package app diff --git a/cmd/reminder/app/start.go b/cmd/reminder/app/start.go index 1932968a0c..78cfd5723c 100644 --- a/cmd/reminder/app/start.go +++ b/cmd/reminder/app/start.go @@ -1,17 +1,5 @@ -// -// Copyright 2024 Stacklok, 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. +// SPDX-FileCopyrightText: Copyright 2024 The Minder Authors +// SPDX-License-Identifier: Apache-2.0 package app diff --git a/cmd/reminder/main.go b/cmd/reminder/main.go index cad54ded20..c262497134 100644 --- a/cmd/reminder/main.go +++ b/cmd/reminder/main.go @@ -1,16 +1,5 @@ -// Copyright 2024 Stacklok, 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. +// SPDX-FileCopyrightText: Copyright 2024 The Minder Authors +// SPDX-License-Identifier: Apache-2.0 // Package main provides the entrypoint for the reminder service package main diff --git a/cmd/server/app/common.go b/cmd/server/app/common.go index 3e159d79ad..ff2568cbde 100644 --- a/cmd/server/app/common.go +++ b/cmd/server/app/common.go @@ -1,16 +1,5 @@ -// Copyright 2024 Stacklok, 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. +// SPDX-FileCopyrightText: Copyright 2024 The Minder Authors +// SPDX-License-Identifier: Apache-2.0 package app diff --git a/cmd/server/app/encryption.go b/cmd/server/app/encryption.go index a76b57bf01..f847e3902a 100644 --- a/cmd/server/app/encryption.go +++ b/cmd/server/app/encryption.go @@ -1,16 +1,5 @@ -// Copyright 2024 Stacklok, 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. +// SPDX-FileCopyrightText: Copyright 2024 The Minder Authors +// SPDX-License-Identifier: Apache-2.0 package app diff --git a/cmd/server/app/encryption_purge_sessions.go b/cmd/server/app/encryption_purge_sessions.go index 7777bf0697..0bda63a21f 100644 --- a/cmd/server/app/encryption_purge_sessions.go +++ b/cmd/server/app/encryption_purge_sessions.go @@ -1,16 +1,5 @@ -// Copyright 2024 Stacklok, 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. +// SPDX-FileCopyrightText: Copyright 2024 The Minder Authors +// SPDX-License-Identifier: Apache-2.0 // Package app provides the entrypoint for the minder migrations package app diff --git a/cmd/server/app/encryption_rotate.go b/cmd/server/app/encryption_rotate.go index 3c44da6998..71cf07821f 100644 --- a/cmd/server/app/encryption_rotate.go +++ b/cmd/server/app/encryption_rotate.go @@ -1,16 +1,5 @@ -// Copyright 2024 Stacklok, 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. +// SPDX-FileCopyrightText: Copyright 2024 The Minder Authors +// SPDX-License-Identifier: Apache-2.0 // Package app provides the entrypoint for the minder migrations package app diff --git a/cmd/server/app/history.go b/cmd/server/app/history.go index bb89f2cafb..cee7419a7d 100644 --- a/cmd/server/app/history.go +++ b/cmd/server/app/history.go @@ -1,17 +1,5 @@ -// -// Copyright 2023 Stacklok, 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. +// SPDX-FileCopyrightText: Copyright 2023 The Minder Authors +// SPDX-License-Identifier: Apache-2.0 package app diff --git a/cmd/server/app/history_purge.go b/cmd/server/app/history_purge.go index 6dac213667..cafa5e5b5e 100644 --- a/cmd/server/app/history_purge.go +++ b/cmd/server/app/history_purge.go @@ -1,16 +1,5 @@ -// Copyright 2024 Stacklok, 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. +// SPDX-FileCopyrightText: Copyright 2024 The Minder Authors +// SPDX-License-Identifier: Apache-2.0 package app diff --git a/cmd/server/app/history_purge_test.go b/cmd/server/app/history_purge_test.go index ad030515fd..903be2fc7a 100644 --- a/cmd/server/app/history_purge_test.go +++ b/cmd/server/app/history_purge_test.go @@ -1,16 +1,5 @@ -// Copyright 2024 Stacklok, 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. +// SPDX-FileCopyrightText: Copyright 2024 The Minder Authors +// SPDX-License-Identifier: Apache-2.0 package app diff --git a/cmd/server/app/migrate.go b/cmd/server/app/migrate.go index c289f2b7fb..567e244ff7 100644 --- a/cmd/server/app/migrate.go +++ b/cmd/server/app/migrate.go @@ -1,17 +1,5 @@ -// -// Copyright 2023 Stacklok, 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. +// SPDX-FileCopyrightText: Copyright 2023 The Minder Authors +// SPDX-License-Identifier: Apache-2.0 package app diff --git a/cmd/server/app/migrate_down.go b/cmd/server/app/migrate_down.go index 966aa64cc5..cb5a088e34 100644 --- a/cmd/server/app/migrate_down.go +++ b/cmd/server/app/migrate_down.go @@ -1,17 +1,5 @@ -// -// Copyright 2023 Stacklok, 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. +// SPDX-FileCopyrightText: Copyright 2023 The Minder Authors +// SPDX-License-Identifier: Apache-2.0 package app diff --git a/cmd/server/app/migrate_up.go b/cmd/server/app/migrate_up.go index 60048b979a..3a330e5ee8 100644 --- a/cmd/server/app/migrate_up.go +++ b/cmd/server/app/migrate_up.go @@ -1,17 +1,5 @@ -// -// Copyright 2023 Stacklok, 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. +// SPDX-FileCopyrightText: Copyright 2023 The Minder Authors +// SPDX-License-Identifier: Apache-2.0 // Package app provides the entrypoint for the minder migrations package app diff --git a/cmd/server/app/migrate_version.go b/cmd/server/app/migrate_version.go index 4654d0bf88..fd59920c60 100644 --- a/cmd/server/app/migrate_version.go +++ b/cmd/server/app/migrate_version.go @@ -1,17 +1,5 @@ -// -// Copyright 2023 Stacklok, 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. +// SPDX-FileCopyrightText: Copyright 2023 The Minder Authors +// SPDX-License-Identifier: Apache-2.0 // Package app provides the entrypoint for the minder migrations package app diff --git a/cmd/server/app/root.go b/cmd/server/app/root.go index 1e6fa0e64f..971127db03 100644 --- a/cmd/server/app/root.go +++ b/cmd/server/app/root.go @@ -1,17 +1,5 @@ -// -// Copyright 2023 Stacklok, 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. +// SPDX-FileCopyrightText: Copyright 2023 The Minder Authors +// SPDX-License-Identifier: Apache-2.0 // Package app provides the cli subcommands for managing a minder control plane package app diff --git a/cmd/server/app/serve.go b/cmd/server/app/serve.go index 94eeec402a..b90e29593d 100644 --- a/cmd/server/app/serve.go +++ b/cmd/server/app/serve.go @@ -1,17 +1,5 @@ -// -// Copyright 2023 Stacklok, 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. +// SPDX-FileCopyrightText: Copyright 2023 The Minder Authors +// SPDX-License-Identifier: Apache-2.0 package app diff --git a/cmd/server/app/webhook.go b/cmd/server/app/webhook.go index f8aa563ec0..f1e2678174 100644 --- a/cmd/server/app/webhook.go +++ b/cmd/server/app/webhook.go @@ -1,17 +1,5 @@ -// -// Copyright 2023 Stacklok, 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. +// SPDX-FileCopyrightText: Copyright 2023 The Minder Authors +// SPDX-License-Identifier: Apache-2.0 package app diff --git a/cmd/server/app/webhook_update.go b/cmd/server/app/webhook_update.go index e0cfd25728..22c0dde693 100644 --- a/cmd/server/app/webhook_update.go +++ b/cmd/server/app/webhook_update.go @@ -1,17 +1,5 @@ -// -// Copyright 2023 Stacklok, 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. +// SPDX-FileCopyrightText: Copyright 2023 The Minder Authors +// SPDX-License-Identifier: Apache-2.0 package app diff --git a/cmd/server/main.go b/cmd/server/main.go index 6a0016cd32..153f1f98fd 100644 --- a/cmd/server/main.go +++ b/cmd/server/main.go @@ -1,17 +1,5 @@ -// -// Copyright 2023 Stacklok, 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. +// SPDX-FileCopyrightText: Copyright 2023 The Minder Authors +// SPDX-License-Identifier: Apache-2.0 // Package main provides the entrypoint for the minder server package main diff --git a/cmd/server/main_test.go b/cmd/server/main_test.go index 2c6c208c87..5f0d5e52ec 100644 --- a/cmd/server/main_test.go +++ b/cmd/server/main_test.go @@ -1,17 +1,5 @@ -// -// Copyright 2023 Stacklok, 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. +// SPDX-FileCopyrightText: Copyright 2023 The Minder Authors +// SPDX-License-Identifier: Apache-2.0 package main diff --git a/config/cli-local.yaml b/config/cli-local.yaml index 681f522a1e..a7c650b014 100644 --- a/config/cli-local.yaml +++ b/config/cli-local.yaml @@ -1,17 +1,5 @@ -# -# Copyright 2024 Stacklok, 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. +# SPDX-FileCopyrightText: Copyright 2024 The Minder Authors +# SPDX-License-Identifier: Apache-2.0 # This configuration defines the endpoints for the minder CLI when # communicating with a local Minder instance. diff --git a/config/cli-stacklok-staging.yaml b/config/cli-stacklok-staging.yaml index fbc910c27f..af7720a49e 100644 --- a/config/cli-stacklok-staging.yaml +++ b/config/cli-stacklok-staging.yaml @@ -1,17 +1,5 @@ -# -# Copyright 2024 Stacklok, 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. +# SPDX-FileCopyrightText: Copyright 2024 The Minder Authors +# SPDX-License-Identifier: Apache-2.0 # This configuration defines the endpoints for the minder CLI when # communicating with the staging version of the Stacklok Minder instance. @@ -29,4 +17,4 @@ grpc_server: identity: cli: issuer_url: https://auth.staging.stacklok.dev - client_id: minder-cli \ No newline at end of file + client_id: minder-cli diff --git a/config/cli-stacklok.yaml b/config/cli-stacklok.yaml index dd4110394d..7cd72104e9 100644 --- a/config/cli-stacklok.yaml +++ b/config/cli-stacklok.yaml @@ -1,17 +1,5 @@ -# -# Copyright 2024 Stacklok, 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. +# SPDX-FileCopyrightText: Copyright 2024 The Minder Authors +# SPDX-License-Identifier: Apache-2.0 # This configuration defines the endpoints for the minder CLI when # communicating with the Stacklok Minder instance. @@ -27,4 +15,4 @@ grpc_server: identity: cli: issuer_url: https://auth.stacklok.com - client_id: minder-cli \ No newline at end of file + client_id: minder-cli diff --git a/config/config.yaml.example b/config/config.yaml.example index 930f2c1746..4c59ee3884 100644 --- a/config/config.yaml.example +++ b/config/config.yaml.example @@ -1,17 +1,5 @@ -# -# Copyright 2023 Stacklok, 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. +# SPDX-FileCopyrightText: Copyright 2023 The Minder Authors +# SPDX-License-Identifier: Apache-2.0 # gRPC server configuration grpc_server: diff --git a/config/reminder-config.yaml.example b/config/reminder-config.yaml.example index 379015ca7b..2a95067d3f 100644 --- a/config/reminder-config.yaml.example +++ b/config/reminder-config.yaml.example @@ -1,17 +1,5 @@ -# -# Copyright 2024 Stacklok, 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. +# SPDX-FileCopyrightText: Copyright 2024 The Minder Authors +# SPDX-License-Identifier: Apache-2.0 recurrence: interval: "1h" diff --git a/config/server-config.yaml.example b/config/server-config.yaml.example index d08c43a18f..cfdf8b6672 100644 --- a/config/server-config.yaml.example +++ b/config/server-config.yaml.example @@ -1,17 +1,5 @@ -# -# Copyright 2023 Stacklok, 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. +# SPDX-FileCopyrightText: Copyright 2023 The Minder Authors +# SPDX-License-Identifier: Apache-2.0 # HTTP, gRPC & metrics server configuration http_server: @@ -120,4 +108,4 @@ crypto: key_id: token_key_passphrase email: - minder_url_base: "http://localhost:6463" # Change to the URL of the frontend server \ No newline at end of file + minder_url_base: "http://localhost:6463" # Change to the URL of the frontend server diff --git a/database/migrations.go b/database/migrations.go index 2b5826297a..a5b159272c 100644 --- a/database/migrations.go +++ b/database/migrations.go @@ -1,17 +1,5 @@ -// -// Copyright 2024 Stacklok, 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. +// SPDX-FileCopyrightText: Copyright 2024 The Minder Authors +// SPDX-License-Identifier: Apache-2.0 // Package database provides the database migration tooling for the minder application. package database diff --git a/database/migrations/000001_init.down.sql b/database/migrations/000001_init.down.sql index 3260037fba..f149a2737f 100644 --- a/database/migrations/000001_init.down.sql +++ b/database/migrations/000001_init.down.sql @@ -1,16 +1,5 @@ --- Copyright 2023 Stacklok, 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. +-- SPDX-FileCopyrightText: Copyright 2023 The Minder Authors +-- SPDX-License-Identifier: Apache-2.0 DROP TABLE IF EXISTS artifact_versions; diff --git a/database/migrations/000001_init.up.sql b/database/migrations/000001_init.up.sql index 6ab9473a7a..d0478cce4a 100644 --- a/database/migrations/000001_init.up.sql +++ b/database/migrations/000001_init.up.sql @@ -1,16 +1,5 @@ --- Copyright 2023 Stacklok, 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. +-- SPDX-FileCopyrightText: Copyright 2023 The Minder Authors +-- SPDX-License-Identifier: Apache-2.0 -- projects table CREATE TABLE projects ( diff --git a/database/migrations/000002_repolister_provider.down.sql b/database/migrations/000002_repolister_provider.down.sql index 008b1e595b..d64a0a9504 100644 --- a/database/migrations/000002_repolister_provider.down.sql +++ b/database/migrations/000002_repolister_provider.down.sql @@ -1,17 +1,6 @@ --- Copyright 2023 Stacklok, 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. +-- SPDX-FileCopyrightText: Copyright 2023 The Minder Authors +-- SPDX-License-Identifier: Apache-2.0 -- Postgres can't remove a value for an enum type. So, we can't really -- do a down migration. Instead, we'll just leave this here as a --- reminder that we can't remove this value. \ No newline at end of file +-- reminder that we can't remove this value. diff --git a/database/migrations/000002_repolister_provider.up.sql b/database/migrations/000002_repolister_provider.up.sql index 1cb77a1f85..07e6c25f94 100644 --- a/database/migrations/000002_repolister_provider.up.sql +++ b/database/migrations/000002_repolister_provider.up.sql @@ -1,15 +1,4 @@ --- Copyright 2023 Stacklok, 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. +-- SPDX-FileCopyrightText: Copyright 2023 The Minder Authors +-- SPDX-License-Identifier: Apache-2.0 -ALTER TYPE provider_type ADD VALUE 'repo-lister'; \ No newline at end of file +ALTER TYPE provider_type ADD VALUE 'repo-lister'; diff --git a/database/migrations/000003_rule_evaluations_pr_num.down.sql b/database/migrations/000003_rule_evaluations_pr_num.down.sql index f588de5fb9..b13894a5d6 100644 --- a/database/migrations/000003_rule_evaluations_pr_num.down.sql +++ b/database/migrations/000003_rule_evaluations_pr_num.down.sql @@ -1,16 +1,5 @@ --- Copyright 2023 Stacklok, 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. +-- SPDX-FileCopyrightText: Copyright 2023 The Minder Authors +-- SPDX-License-Identifier: Apache-2.0 -- Postgres can't remove a value for an enum type. So, we can't really -- do a down migration. Instead, we'll just leave this here as a diff --git a/database/migrations/000003_rule_evaluations_pr_num.up.sql b/database/migrations/000003_rule_evaluations_pr_num.up.sql index 4dc160620e..08921f581d 100644 --- a/database/migrations/000003_rule_evaluations_pr_num.up.sql +++ b/database/migrations/000003_rule_evaluations_pr_num.up.sql @@ -1,16 +1,5 @@ --- Copyright 2023 Stacklok, 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. +-- SPDX-FileCopyrightText: Copyright 2023 The Minder Authors +-- SPDX-License-Identifier: Apache-2.0 -- pull_requests table CREATE TABLE pull_requests ( diff --git a/database/migrations/000004_remove_personal_info.down.sql b/database/migrations/000004_remove_personal_info.down.sql index 1ebdce0255..27b7caf6f3 100644 --- a/database/migrations/000004_remove_personal_info.down.sql +++ b/database/migrations/000004_remove_personal_info.down.sql @@ -1,16 +1,5 @@ --- Copyright 2023 Stacklok, 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. +-- SPDX-FileCopyrightText: Copyright 2023 The Minder Authors +-- SPDX-License-Identifier: Apache-2.0 -- Add personal user details to users table ALTER TABLE users diff --git a/database/migrations/000004_remove_personal_info.up.sql b/database/migrations/000004_remove_personal_info.up.sql index 0d4c780022..951a47545c 100644 --- a/database/migrations/000004_remove_personal_info.up.sql +++ b/database/migrations/000004_remove_personal_info.up.sql @@ -1,16 +1,5 @@ --- Copyright 2023 Stacklok, 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. +-- SPDX-FileCopyrightText: Copyright 2023 The Minder Authors +-- SPDX-License-Identifier: Apache-2.0 -- Remove personal user details from users table ALTER TABLE users diff --git a/database/migrations/000005_entitlements.down.sql b/database/migrations/000005_entitlements.down.sql index 6cceb5f8bb..74ee32620c 100644 --- a/database/migrations/000005_entitlements.down.sql +++ b/database/migrations/000005_entitlements.down.sql @@ -1,16 +1,5 @@ --- Copyright 2023 Stacklok, 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. +-- SPDX-FileCopyrightText: Copyright 2023 The Minder Authors +-- SPDX-License-Identifier: Apache-2.0 DROP TABLE IF EXISTS entitlements CASCADE; -DROP TABLE IF EXISTS features CASCADE; \ No newline at end of file +DROP TABLE IF EXISTS features CASCADE; diff --git a/database/migrations/000005_entitlements.up.sql b/database/migrations/000005_entitlements.up.sql index f5554ce02f..1c26be666c 100644 --- a/database/migrations/000005_entitlements.up.sql +++ b/database/migrations/000005_entitlements.up.sql @@ -1,16 +1,5 @@ --- Copyright 2023 Stacklok, 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. +-- SPDX-FileCopyrightText: Copyright 2023 The Minder Authors +-- SPDX-License-Identifier: Apache-2.0 -- features represents the features that are available to a project. @@ -42,4 +31,4 @@ CREATE UNIQUE INDEX IF NOT EXISTS entitlements_feature_project_id_idx ON entitle -- private repositories. INSERT INTO features(name, settings) VALUES ('private_repositories_enabled', '{}') - ON CONFLICT DO NOTHING; \ No newline at end of file + ON CONFLICT DO NOTHING; diff --git a/database/migrations/000006_entity_profiles_unique.down.sql b/database/migrations/000006_entity_profiles_unique.down.sql index 70f57906bf..667835d24a 100644 --- a/database/migrations/000006_entity_profiles_unique.down.sql +++ b/database/migrations/000006_entity_profiles_unique.down.sql @@ -1,16 +1,5 @@ --- Copyright 2023 Stacklok, 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. +-- SPDX-FileCopyrightText: Copyright 2023 The Minder Authors +-- SPDX-License-Identifier: Apache-2.0 -- drop index -DROP INDEX IF EXISTS entity_profiles_unique; \ No newline at end of file +DROP INDEX IF EXISTS entity_profiles_unique; diff --git a/database/migrations/000006_entity_profiles_unique.up.sql b/database/migrations/000006_entity_profiles_unique.up.sql index f28a54018d..4a621fceb1 100644 --- a/database/migrations/000006_entity_profiles_unique.up.sql +++ b/database/migrations/000006_entity_profiles_unique.up.sql @@ -1,18 +1,7 @@ --- Copyright 2023 Stacklok, 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. +-- SPDX-FileCopyrightText: Copyright 2023 The Minder Authors +-- SPDX-License-Identifier: Apache-2.0 -- We may only have a single entity profile per profile+entity combination, -- so we can use a unique index to enforce this. CREATE UNIQUE INDEX CONCURRENTLY IF NOT EXISTS entity_profiles_unique ON -entity_profiles (entity, profile_id); \ No newline at end of file +entity_profiles (entity, profile_id); diff --git a/database/migrations/000007_status_delete_procedure.down.sql b/database/migrations/000007_status_delete_procedure.down.sql index 4a45346487..27b8682f23 100644 --- a/database/migrations/000007_status_delete_procedure.down.sql +++ b/database/migrations/000007_status_delete_procedure.down.sql @@ -1,16 +1,5 @@ --- Copyright 2023 Stacklok, 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. +-- SPDX-FileCopyrightText: Copyright 2023 The Minder Authors +-- SPDX-License-Identifier: Apache-2.0 BEGIN; diff --git a/database/migrations/000007_status_delete_procedure.up.sql b/database/migrations/000007_status_delete_procedure.up.sql index 3bcb436f97..3b5b106457 100644 --- a/database/migrations/000007_status_delete_procedure.up.sql +++ b/database/migrations/000007_status_delete_procedure.up.sql @@ -1,16 +1,5 @@ --- Copyright 2023 Stacklok, 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. +-- SPDX-FileCopyrightText: Copyright 2023 The Minder Authors +-- SPDX-License-Identifier: Apache-2.0 -- Start to make sure the function and trigger are either both added or none BEGIN; @@ -112,4 +101,4 @@ END; $$ LANGUAGE plpgsql; -- transaction commit -COMMIT; \ No newline at end of file +COMMIT; diff --git a/database/migrations/000008_remove_null_prs.down.sql b/database/migrations/000008_remove_null_prs.down.sql index a2d08a37f1..67e53d0ea4 100644 --- a/database/migrations/000008_remove_null_prs.down.sql +++ b/database/migrations/000008_remove_null_prs.down.sql @@ -1,15 +1,4 @@ --- Copyright 2023 Stacklok, 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. +-- SPDX-FileCopyrightText: Copyright 2023 The Minder Authors +-- SPDX-License-Identifier: Apache-2.0 --- this down migration is intentionally empty. It's here to make sure that migrations run at all. \ No newline at end of file +-- this down migration is intentionally empty. It's here to make sure that migrations run at all. diff --git a/database/migrations/000008_remove_null_prs.up.sql b/database/migrations/000008_remove_null_prs.up.sql index abaddee223..0a92caa061 100644 --- a/database/migrations/000008_remove_null_prs.up.sql +++ b/database/migrations/000008_remove_null_prs.up.sql @@ -1,16 +1,5 @@ --- Copyright 2023 Stacklok, 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. +-- SPDX-FileCopyrightText: Copyright 2023 The Minder Authors +-- SPDX-License-Identifier: Apache-2.0 BEGIN; diff --git a/database/migrations/000009_remove_is_protected.down.sql b/database/migrations/000009_remove_is_protected.down.sql index f5dde495c3..05fb75685d 100644 --- a/database/migrations/000009_remove_is_protected.down.sql +++ b/database/migrations/000009_remove_is_protected.down.sql @@ -1,17 +1,6 @@ --- Copyright 2023 Stacklok, 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. +-- SPDX-FileCopyrightText: Copyright 2023 The Minder Authors +-- SPDX-License-Identifier: Apache-2.0 -- Restore the 'is_protected' column ALTER TABLE roles - ADD COLUMN IF NOT EXISTS is_protected BOOLEAN NOT NULL DEFAULT FALSE; \ No newline at end of file + ADD COLUMN IF NOT EXISTS is_protected BOOLEAN NOT NULL DEFAULT FALSE; diff --git a/database/migrations/000009_remove_is_protected.up.sql b/database/migrations/000009_remove_is_protected.up.sql index da23931d5b..e4079d7af4 100644 --- a/database/migrations/000009_remove_is_protected.up.sql +++ b/database/migrations/000009_remove_is_protected.up.sql @@ -1,16 +1,5 @@ --- Copyright 2023 Stacklok, 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. +-- SPDX-FileCopyrightText: Copyright 2023 The Minder Authors +-- SPDX-License-Identifier: Apache-2.0 BEGIN; diff --git a/database/migrations/000010_entity_execution_lock.down.sql b/database/migrations/000010_entity_execution_lock.down.sql index 91e6e0d790..fbbc4aaf95 100644 --- a/database/migrations/000010_entity_execution_lock.down.sql +++ b/database/migrations/000010_entity_execution_lock.down.sql @@ -1,19 +1,8 @@ --- Copyright 2023 Stacklok, 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. +-- SPDX-FileCopyrightText: Copyright 2023 The Minder Authors +-- SPDX-License-Identifier: Apache-2.0 DROP INDEX IF EXISTS flush_cache_idx; DROP INDEX IF EXISTS entity_execution_lock_idx; DROP TABLE IF EXISTS flush_cache; -DROP TABLE IF EXISTS entity_execution_lock; \ No newline at end of file +DROP TABLE IF EXISTS entity_execution_lock; diff --git a/database/migrations/000010_entity_execution_lock.up.sql b/database/migrations/000010_entity_execution_lock.up.sql index 37c5da5fa3..ddf3cb799e 100644 --- a/database/migrations/000010_entity_execution_lock.up.sql +++ b/database/migrations/000010_entity_execution_lock.up.sql @@ -1,16 +1,5 @@ --- Copyright 2023 Stacklok, 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. +-- SPDX-FileCopyrightText: Copyright 2023 The Minder Authors +-- SPDX-License-Identifier: Apache-2.0 --- This implements two tables: @@ -48,4 +37,4 @@ CREATE UNIQUE INDEX IF NOT EXISTS flush_cache_idx ON flush_cache( entity, repository_id, COALESCE(artifact_id, '00000000-0000-0000-0000-000000000000'::UUID), - COALESCE(pull_request_id, '00000000-0000-0000-0000-000000000000'::UUID)); \ No newline at end of file + COALESCE(pull_request_id, '00000000-0000-0000-0000-000000000000'::UUID)); diff --git a/database/migrations/000011_default_branch_repo.down.sql b/database/migrations/000011_default_branch_repo.down.sql index 53b187c575..e404147956 100644 --- a/database/migrations/000011_default_branch_repo.down.sql +++ b/database/migrations/000011_default_branch_repo.down.sql @@ -1,18 +1,7 @@ --- Copyright 2023 Stacklok, 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. +-- SPDX-FileCopyrightText: Copyright 2023 The Minder Authors +-- SPDX-License-Identifier: Apache-2.0 -- This removes the `default_branch` column from the repositories -- table. -ALTER TABLE repositories DROP COLUMN default_branch; \ No newline at end of file +ALTER TABLE repositories DROP COLUMN default_branch; diff --git a/database/migrations/000011_default_branch_repo.up.sql b/database/migrations/000011_default_branch_repo.up.sql index 44aecb5e8f..b55bf198b3 100644 --- a/database/migrations/000011_default_branch_repo.up.sql +++ b/database/migrations/000011_default_branch_repo.up.sql @@ -1,18 +1,7 @@ --- Copyright 2023 Stacklok, 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. +-- SPDX-FileCopyrightText: Copyright 2023 The Minder Authors +-- SPDX-License-Identifier: Apache-2.0 -- This adds a `default_branch` column to the repositories -- table. -ALTER TABLE repositories ADD COLUMN default_branch text; \ No newline at end of file +ALTER TABLE repositories ADD COLUMN default_branch text; diff --git a/database/migrations/000012_repositories_pagination_idx.down.sql b/database/migrations/000012_repositories_pagination_idx.down.sql index 1359c88269..3d278af058 100644 --- a/database/migrations/000012_repositories_pagination_idx.down.sql +++ b/database/migrations/000012_repositories_pagination_idx.down.sql @@ -1,15 +1,4 @@ --- Copyright 2024 Stacklok, 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. +-- SPDX-FileCopyrightText: Copyright 2024 The Minder Authors +-- SPDX-License-Identifier: Apache-2.0 DROP INDEX IF EXISTS repositories_cursor_pagination_idx; diff --git a/database/migrations/000012_repositories_pagination_idx.up.sql b/database/migrations/000012_repositories_pagination_idx.up.sql index be5a1b3926..a431b01d5c 100644 --- a/database/migrations/000012_repositories_pagination_idx.up.sql +++ b/database/migrations/000012_repositories_pagination_idx.up.sql @@ -1,16 +1,5 @@ --- Copyright 2024 Stacklok, 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. +-- SPDX-FileCopyrightText: Copyright 2024 The Minder Authors +-- SPDX-License-Identifier: Apache-2.0 -- This adds a unique index to the repositories table to support cursor pagination. CREATE UNIQUE INDEX repositories_cursor_pagination_idx ON repositories(project_id, provider, repo_id); diff --git a/database/migrations/000013_rule_evaluations_rule_name.down.sql b/database/migrations/000013_rule_evaluations_rule_name.down.sql index 02c0d10879..4ce8247cda 100644 --- a/database/migrations/000013_rule_evaluations_rule_name.down.sql +++ b/database/migrations/000013_rule_evaluations_rule_name.down.sql @@ -1,16 +1,5 @@ --- Copyright 2024 Stacklok, 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. +-- SPDX-FileCopyrightText: Copyright 2024 The Minder Authors +-- SPDX-License-Identifier: Apache-2.0 -- Begin transaction BEGIN; diff --git a/database/migrations/000013_rule_evaluations_rule_name.up.sql b/database/migrations/000013_rule_evaluations_rule_name.up.sql index ebbb7db338..80c0b5d370 100644 --- a/database/migrations/000013_rule_evaluations_rule_name.up.sql +++ b/database/migrations/000013_rule_evaluations_rule_name.up.sql @@ -1,16 +1,5 @@ --- Copyright 2024 Stacklok, 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. +-- SPDX-FileCopyrightText: Copyright 2024 The Minder Authors +-- SPDX-License-Identifier: Apache-2.0 -- Begin transaction BEGIN; diff --git a/database/migrations/000014_remove_roles.down.sql b/database/migrations/000014_remove_roles.down.sql index 2f0586760d..42319e7983 100644 --- a/database/migrations/000014_remove_roles.down.sql +++ b/database/migrations/000014_remove_roles.down.sql @@ -1,16 +1,5 @@ --- Copyright 2024 Stacklok, 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. +-- SPDX-FileCopyrightText: Copyright 2024 The Minder Authors +-- SPDX-License-Identifier: Apache-2.0 -- roles table CREATE TABLE IF NOT EXISTS roles ( @@ -32,4 +21,4 @@ CREATE TABLE IF NOT EXISTS user_roles ( ); CREATE INDEX idx_roles_project_id ON roles(project_id); -CREATE UNIQUE INDEX roles_organization_id_name_lower_idx ON roles (organization_id, LOWER(name)); \ No newline at end of file +CREATE UNIQUE INDEX roles_organization_id_name_lower_idx ON roles (organization_id, LOWER(name)); diff --git a/database/migrations/000014_remove_roles.up.sql b/database/migrations/000014_remove_roles.up.sql index 6146c8bdfe..58c4877f91 100644 --- a/database/migrations/000014_remove_roles.up.sql +++ b/database/migrations/000014_remove_roles.up.sql @@ -1,16 +1,5 @@ --- Copyright 2024 Stacklok, 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. +-- SPDX-FileCopyrightText: Copyright 2024 The Minder Authors +-- SPDX-License-Identifier: Apache-2.0 DROP INDEX IF EXISTS idx_roles_project_id; @@ -18,4 +7,4 @@ DROP INDEX IF EXISTS roles_organization_id_name_lower_idx; DROP TABLE IF EXISTS user_roles; -DROP TABLE IF EXISTS roles; \ No newline at end of file +DROP TABLE IF EXISTS roles; diff --git a/database/migrations/000015_remove_signing_keys.down.sql b/database/migrations/000015_remove_signing_keys.down.sql index fd15d5f98c..f9c4131996 100644 --- a/database/migrations/000015_remove_signing_keys.down.sql +++ b/database/migrations/000015_remove_signing_keys.down.sql @@ -1,16 +1,5 @@ --- Copyright 2024 Stacklok, 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. +-- SPDX-FileCopyrightText: Copyright 2024 The Minder Authors +-- SPDX-License-Identifier: Apache-2.0 -- signing_keys table CREATE TABLE signing_keys ( @@ -22,4 +11,4 @@ CREATE TABLE signing_keys ( key_identifier TEXT NOT NULL, created_at TIMESTAMP NOT NULL DEFAULT NOW(), updated_at TIMESTAMP NOT NULL DEFAULT NOW() -); \ No newline at end of file +); diff --git a/database/migrations/000015_remove_signing_keys.up.sql b/database/migrations/000015_remove_signing_keys.up.sql index 1f4165e87e..86b23ac8ff 100644 --- a/database/migrations/000015_remove_signing_keys.up.sql +++ b/database/migrations/000015_remove_signing_keys.up.sql @@ -1,15 +1,4 @@ --- Copyright 2024 Stacklok, 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. +-- SPDX-FileCopyrightText: Copyright 2024 The Minder Authors +-- SPDX-License-Identifier: Apache-2.0 -DROP TABLE IF EXISTS signing_keys; \ No newline at end of file +DROP TABLE IF EXISTS signing_keys; diff --git a/database/migrations/000016_remove_user_project.down.sql b/database/migrations/000016_remove_user_project.down.sql index 4762dc43d2..f74ccc0db0 100644 --- a/database/migrations/000016_remove_user_project.down.sql +++ b/database/migrations/000016_remove_user_project.down.sql @@ -1,20 +1,9 @@ --- Copyright 2024 Stacklok, 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. +-- SPDX-FileCopyrightText: Copyright 2024 The Minder Authors +-- SPDX-License-Identifier: Apache-2.0 -- user/projects CREATE TABLE user_projects ( id SERIAL PRIMARY KEY, user_id INTEGER NOT NULL REFERENCES users(id) ON DELETE CASCADE, project_id UUID NOT NULL REFERENCES projects(id) ON DELETE CASCADE -); \ No newline at end of file +); diff --git a/database/migrations/000016_remove_user_project.up.sql b/database/migrations/000016_remove_user_project.up.sql index 440149bca4..6ea94059ea 100644 --- a/database/migrations/000016_remove_user_project.up.sql +++ b/database/migrations/000016_remove_user_project.up.sql @@ -1,15 +1,4 @@ --- Copyright 2024 Stacklok, 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. +-- SPDX-FileCopyrightText: Copyright 2024 The Minder Authors +-- SPDX-License-Identifier: Apache-2.0 -DROP TABLE IF EXISTS user_projects; \ No newline at end of file +DROP TABLE IF EXISTS user_projects; diff --git a/database/migrations/000017_rule_evaluations_rule_name_backfilling.down.sql b/database/migrations/000017_rule_evaluations_rule_name_backfilling.down.sql index 800a6d6911..8b0377a306 100644 --- a/database/migrations/000017_rule_evaluations_rule_name_backfilling.down.sql +++ b/database/migrations/000017_rule_evaluations_rule_name_backfilling.down.sql @@ -1,16 +1,5 @@ --- Copyright 2024 Stacklok, 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. +-- SPDX-FileCopyrightText: Copyright 2024 The Minder Authors +-- SPDX-License-Identifier: Apache-2.0 -- Begin transaction BEGIN; diff --git a/database/migrations/000017_rule_evaluations_rule_name_backfilling.up.sql b/database/migrations/000017_rule_evaluations_rule_name_backfilling.up.sql index 1388404d7a..7a1b023cce 100644 --- a/database/migrations/000017_rule_evaluations_rule_name_backfilling.up.sql +++ b/database/migrations/000017_rule_evaluations_rule_name_backfilling.up.sql @@ -1,16 +1,5 @@ --- Copyright 2024 Stacklok, 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. +-- SPDX-FileCopyrightText: Copyright 2024 The Minder Authors +-- SPDX-License-Identifier: Apache-2.0 -- Begin transaction BEGIN; diff --git a/database/migrations/000018_artifact_versions.down.sql b/database/migrations/000018_artifact_versions.down.sql index b6ad218e8e..3a87460b16 100644 --- a/database/migrations/000018_artifact_versions.down.sql +++ b/database/migrations/000018_artifact_versions.down.sql @@ -1,16 +1,5 @@ --- Copyright 2024 Stacklok, 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. +-- SPDX-FileCopyrightText: Copyright 2024 The Minder Authors +-- SPDX-License-Identifier: Apache-2.0 -- artifact versions table CREATE TABLE artifact_versions ( diff --git a/database/migrations/000018_artifact_versions.up.sql b/database/migrations/000018_artifact_versions.up.sql index 9226341b0b..75c1cfe6d5 100644 --- a/database/migrations/000018_artifact_versions.up.sql +++ b/database/migrations/000018_artifact_versions.up.sql @@ -1,15 +1,4 @@ --- Copyright 2024 Stacklok, 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. +-- SPDX-FileCopyrightText: Copyright 2024 The Minder Authors +-- SPDX-License-Identifier: Apache-2.0 DROP TABLE IF EXISTS artifact_versions CASCADE; diff --git a/database/migrations/000019_id_resize.down.sql b/database/migrations/000019_id_resize.down.sql index aed675dced..8cfa7b3e0f 100644 --- a/database/migrations/000019_id_resize.down.sql +++ b/database/migrations/000019_id_resize.down.sql @@ -1,16 +1,5 @@ --- Copyright 2024 Stacklok, 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. +-- SPDX-FileCopyrightText: Copyright 2024 The Minder Authors +-- SPDX-License-Identifier: Apache-2.0 -- repositories.repo_id was stored as an int32, but it is an int64 from GitHub -- Note that this takes an exclusive write lock on the table, which should be okay diff --git a/database/migrations/000019_id_resize.up.sql b/database/migrations/000019_id_resize.up.sql index 55bb5d6565..abfd6f7723 100644 --- a/database/migrations/000019_id_resize.up.sql +++ b/database/migrations/000019_id_resize.up.sql @@ -1,16 +1,5 @@ --- Copyright 2024 Stacklok, 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. +-- SPDX-FileCopyrightText: Copyright 2024 The Minder Authors +-- SPDX-License-Identifier: Apache-2.0 -- repositories.repo_id was stored as an int32, but it is an int64 from GitHub -- Note that this takes an exclusive write lock on the table, which should be okay diff --git a/database/migrations/000020_webhook_id_resize.down.sql b/database/migrations/000020_webhook_id_resize.down.sql index b5a2f86519..08dbdd622e 100644 --- a/database/migrations/000020_webhook_id_resize.down.sql +++ b/database/migrations/000020_webhook_id_resize.down.sql @@ -1,16 +1,5 @@ --- Copyright 2024 Stacklok, 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. +-- SPDX-FileCopyrightText: Copyright 2024 The Minder Authors +-- SPDX-License-Identifier: Apache-2.0 -- repositories.webhook_id was stored as an int32, but it is an int64 from GitHub -- Note that this takes an exclusive write lock on the table, which should be okay diff --git a/database/migrations/000020_webhook_id_resize.up.sql b/database/migrations/000020_webhook_id_resize.up.sql index 175f57eef5..a17c655b8c 100644 --- a/database/migrations/000020_webhook_id_resize.up.sql +++ b/database/migrations/000020_webhook_id_resize.up.sql @@ -1,16 +1,5 @@ --- Copyright 2024 Stacklok, 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. +-- SPDX-FileCopyrightText: Copyright 2024 The Minder Authors +-- SPDX-License-Identifier: Apache-2.0 -- repositories.webhook_id was stored as an int32, but it is an int64 from GitHub -- Note that this takes an exclusive write lock on the table, which should be okay diff --git a/database/migrations/000021_rule_type_severity.down.sql b/database/migrations/000021_rule_type_severity.down.sql index b3fbe393f6..6d1aed2162 100644 --- a/database/migrations/000021_rule_type_severity.down.sql +++ b/database/migrations/000021_rule_type_severity.down.sql @@ -1,16 +1,5 @@ --- Copyright 2024 Stacklok, 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. +-- SPDX-FileCopyrightText: Copyright 2024 The Minder Authors +-- SPDX-License-Identifier: Apache-2.0 DROP TYPE severity; diff --git a/database/migrations/000021_rule_type_severity.up.sql b/database/migrations/000021_rule_type_severity.up.sql index 3935439aff..536a2295a7 100644 --- a/database/migrations/000021_rule_type_severity.up.sql +++ b/database/migrations/000021_rule_type_severity.up.sql @@ -1,16 +1,5 @@ --- Copyright 2024 Stacklok, 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. +-- SPDX-FileCopyrightText: Copyright 2024 The Minder Authors +-- SPDX-License-Identifier: Apache-2.0 -- severity is an enum that represents the severity of a rule CREATE TYPE severity AS ENUM ('unknown', 'info', 'low', 'medium', 'high', 'critical'); diff --git a/database/migrations/000022_enrollment_redirect_url.down.sql b/database/migrations/000022_enrollment_redirect_url.down.sql index 12965c3bd4..86aefcabf5 100644 --- a/database/migrations/000022_enrollment_redirect_url.down.sql +++ b/database/migrations/000022_enrollment_redirect_url.down.sql @@ -1,15 +1,4 @@ --- Copyright 2024 Stacklok, 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. +-- SPDX-FileCopyrightText: Copyright 2024 The Minder Authors +-- SPDX-License-Identifier: Apache-2.0 -ALTER TABLE session_store DROP COLUMN redirect_url; \ No newline at end of file +ALTER TABLE session_store DROP COLUMN redirect_url; diff --git a/database/migrations/000022_enrollment_redirect_url.up.sql b/database/migrations/000022_enrollment_redirect_url.up.sql index eb4236f97b..1985ad6085 100644 --- a/database/migrations/000022_enrollment_redirect_url.up.sql +++ b/database/migrations/000022_enrollment_redirect_url.up.sql @@ -1,15 +1,4 @@ --- Copyright 2024 Stacklok, 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. +-- SPDX-FileCopyrightText: Copyright 2024 The Minder Authors +-- SPDX-License-Identifier: Apache-2.0 -ALTER TABLE session_store ADD COLUMN redirect_url text; \ No newline at end of file +ALTER TABLE session_store ADD COLUMN redirect_url text; diff --git a/database/migrations/000023_user_org_remove.down.sql b/database/migrations/000023_user_org_remove.down.sql index 9df637a2c0..29f18e3c4b 100644 --- a/database/migrations/000023_user_org_remove.down.sql +++ b/database/migrations/000023_user_org_remove.down.sql @@ -1,15 +1,4 @@ --- Copyright 2024 Stacklok, 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. +-- SPDX-FileCopyrightText: Copyright 2024 The Minder Authors +-- SPDX-License-Identifier: Apache-2.0 --- There is no good way to roll back this change, so we will not provide a down migration. \ No newline at end of file +-- There is no good way to roll back this change, so we will not provide a down migration. diff --git a/database/migrations/000023_user_org_remove.up.sql b/database/migrations/000023_user_org_remove.up.sql index 93532d3a2b..cb0bce7aea 100644 --- a/database/migrations/000023_user_org_remove.up.sql +++ b/database/migrations/000023_user_org_remove.up.sql @@ -1,15 +1,4 @@ --- Copyright 2024 Stacklok, 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. +-- SPDX-FileCopyrightText: Copyright 2024 The Minder Authors +-- SPDX-License-Identifier: Apache-2.0 -ALTER TABLE users DROP COLUMN organization_id; \ No newline at end of file +ALTER TABLE users DROP COLUMN organization_id; diff --git a/database/migrations/000024_repo_license_add.down.sql b/database/migrations/000024_repo_license_add.down.sql index b2b774607f..71280bfd6e 100644 --- a/database/migrations/000024_repo_license_add.down.sql +++ b/database/migrations/000024_repo_license_add.down.sql @@ -1,15 +1,4 @@ --- Copyright 2024 Stacklok, 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. +-- SPDX-FileCopyrightText: Copyright 2024 The Minder Authors +-- SPDX-License-Identifier: Apache-2.0 -ALTER TABLE repositories DROP COLUMN license; \ No newline at end of file +ALTER TABLE repositories DROP COLUMN license; diff --git a/database/migrations/000024_repo_license_add.up.sql b/database/migrations/000024_repo_license_add.up.sql index a7a50fdca5..8dc9705fbb 100644 --- a/database/migrations/000024_repo_license_add.up.sql +++ b/database/migrations/000024_repo_license_add.up.sql @@ -1,15 +1,4 @@ --- Copyright 2024 Stacklok, 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. +-- SPDX-FileCopyrightText: Copyright 2024 The Minder Authors +-- SPDX-License-Identifier: Apache-2.0 -ALTER TABLE repositories ADD COLUMN license VARCHAR(255) DEFAULT 'unknown'; \ No newline at end of file +ALTER TABLE repositories ADD COLUMN license VARCHAR(255) DEFAULT 'unknown'; diff --git a/database/migrations/000025_provider_auth.down.sql b/database/migrations/000025_provider_auth.down.sql index 975b75d522..066031de82 100644 --- a/database/migrations/000025_provider_auth.down.sql +++ b/database/migrations/000025_provider_auth.down.sql @@ -1,16 +1,5 @@ --- Copyright 2024 Stacklok, 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. +-- SPDX-FileCopyrightText: Copyright 2024 The Minder Authors +-- SPDX-License-Identifier: Apache-2.0 ALTER TABLE providers DROP COLUMN auth_flows; -DROP TYPE authorization_flow; \ No newline at end of file +DROP TYPE authorization_flow; diff --git a/database/migrations/000025_provider_auth.up.sql b/database/migrations/000025_provider_auth.up.sql index 09009a28a9..b0e0ef6618 100644 --- a/database/migrations/000025_provider_auth.up.sql +++ b/database/migrations/000025_provider_auth.up.sql @@ -1,16 +1,5 @@ --- Copyright 2024 Stacklok, 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. +-- SPDX-FileCopyrightText: Copyright 2024 The Minder Authors +-- SPDX-License-Identifier: Apache-2.0 CREATE TYPE authorization_flow AS ENUM ('user_input', 'oauth2_authorization_code_flow', 'github_app_flow', 'none'); @@ -24,4 +13,4 @@ BEGIN FOR provider_name IN SELECT name FROM providers WHERE name = 'github' LOOP UPDATE providers SET auth_flows = ARRAY['github_app_flow'::authorization_flow, 'user_input'::authorization_flow] WHERE name = provider_name; END LOOP; -END $$; \ No newline at end of file +END $$; diff --git a/database/migrations/000026_hierarchy.down.sql b/database/migrations/000026_hierarchy.down.sql index 2023088d0c..5170ec9acd 100644 --- a/database/migrations/000026_hierarchy.down.sql +++ b/database/migrations/000026_hierarchy.down.sql @@ -1,16 +1,5 @@ --- Copyright 2024 Stacklok, 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. +-- SPDX-FileCopyrightText: Copyright 2024 The Minder Authors +-- SPDX-License-Identifier: Apache-2.0 --- Remove the unique constraint to the providers table between name and project_id ALTER TABLE providers diff --git a/database/migrations/000026_hierarchy.up.sql b/database/migrations/000026_hierarchy.up.sql index 7385cbfaff..fae1efaf5c 100644 --- a/database/migrations/000026_hierarchy.up.sql +++ b/database/migrations/000026_hierarchy.up.sql @@ -1,16 +1,5 @@ --- Copyright 2024 Stacklok, 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. +-- SPDX-FileCopyrightText: Copyright 2024 The Minder Authors +-- SPDX-License-Identifier: Apache-2.0 --- Add unique constraint to the providers table between name and id ALTER TABLE providers @@ -120,4 +109,4 @@ ALTER TABLE profiles ADD CONSTRAINT profiles_project_id_fkey FOREIGN KEY (project_id) REFERENCES projects(id) - ON DELETE CASCADE; \ No newline at end of file + ON DELETE CASCADE; diff --git a/database/migrations/000027_project_hierarchy_feature.down.sql b/database/migrations/000027_project_hierarchy_feature.down.sql index 091fe7e28d..a82463852d 100644 --- a/database/migrations/000027_project_hierarchy_feature.down.sql +++ b/database/migrations/000027_project_hierarchy_feature.down.sql @@ -1,15 +1,4 @@ --- Copyright 2024 Stacklok, 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. +-- SPDX-FileCopyrightText: Copyright 2024 The Minder Authors +-- SPDX-License-Identifier: Apache-2.0 -DELETE FROM features WHERE name = 'project_hierarchy_operations_enabled'; \ No newline at end of file +DELETE FROM features WHERE name = 'project_hierarchy_operations_enabled'; diff --git a/database/migrations/000027_project_hierarchy_feature.up.sql b/database/migrations/000027_project_hierarchy_feature.up.sql index c8a34ae0af..03fb639196 100644 --- a/database/migrations/000027_project_hierarchy_feature.up.sql +++ b/database/migrations/000027_project_hierarchy_feature.up.sql @@ -1,18 +1,7 @@ --- Copyright 2024 Stacklok, 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. +-- SPDX-FileCopyrightText: Copyright 2024 The Minder Authors +-- SPDX-License-Identifier: Apache-2.0 -- hierarchy operations feature INSERT INTO features(name, settings) VALUES ('project_hierarchy_operations_enabled', '{}') - ON CONFLICT DO NOTHING; \ No newline at end of file + ON CONFLICT DO NOTHING; diff --git a/database/migrations/000028_session_userid.down.sql b/database/migrations/000028_session_userid.down.sql index 46490dd7b7..a93f37c458 100644 --- a/database/migrations/000028_session_userid.down.sql +++ b/database/migrations/000028_session_userid.down.sql @@ -1,15 +1,4 @@ --- Copyright 2024 Stacklok, 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. +-- SPDX-FileCopyrightText: Copyright 2024 The Minder Authors +-- SPDX-License-Identifier: Apache-2.0 -ALTER TABLE session_store DROP COLUMN remote_user; \ No newline at end of file +ALTER TABLE session_store DROP COLUMN remote_user; diff --git a/database/migrations/000028_session_userid.up.sql b/database/migrations/000028_session_userid.up.sql index f9c73d2fec..5163aa0375 100644 --- a/database/migrations/000028_session_userid.up.sql +++ b/database/migrations/000028_session_userid.up.sql @@ -1,15 +1,4 @@ --- Copyright 2024 Stacklok, 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. +-- SPDX-FileCopyrightText: Copyright 2024 The Minder Authors +-- SPDX-License-Identifier: Apache-2.0 -ALTER TABLE session_store ADD COLUMN remote_user TEXT; \ No newline at end of file +ALTER TABLE session_store ADD COLUMN remote_user TEXT; diff --git a/database/migrations/000029_bundle_subscription.down.sql b/database/migrations/000029_bundle_subscription.down.sql index 1e6ddb764f..f26cae96a0 100644 --- a/database/migrations/000029_bundle_subscription.down.sql +++ b/database/migrations/000029_bundle_subscription.down.sql @@ -1,19 +1,8 @@ --- Copyright 2024 Stacklok, 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. +-- SPDX-FileCopyrightText: Copyright 2024 The Minder Authors +-- SPDX-License-Identifier: Apache-2.0 ALTER TABLE projects DROP COLUMN subscription_id; ALTER TABLE rule_type DROP COLUMN subscription_id; DROP TABLE IF EXISTS subscriptions; -DROP TABLE IF EXISTS bundles; \ No newline at end of file +DROP TABLE IF EXISTS bundles; diff --git a/database/migrations/000029_bundle_subscription.up.sql b/database/migrations/000029_bundle_subscription.up.sql index ce2331ba43..5884e12d92 100644 --- a/database/migrations/000029_bundle_subscription.up.sql +++ b/database/migrations/000029_bundle_subscription.up.sql @@ -1,16 +1,5 @@ --- Copyright 2024 Stacklok, 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. +-- SPDX-FileCopyrightText: Copyright 2024 The Minder Authors +-- SPDX-License-Identifier: Apache-2.0 CREATE TABLE bundles( -- I have given this a separate PK to simplify some of the queries diff --git a/database/migrations/000030_subscription_profile_fk.down.sql b/database/migrations/000030_subscription_profile_fk.down.sql index bcd7626b8f..dceb3eef63 100644 --- a/database/migrations/000030_subscription_profile_fk.down.sql +++ b/database/migrations/000030_subscription_profile_fk.down.sql @@ -1,18 +1,7 @@ --- Copyright 2024 Stacklok, 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. +-- SPDX-FileCopyrightText: Copyright 2024 The Minder Authors +-- SPDX-License-Identifier: Apache-2.0 ALTER TABLE profiles DROP COLUMN subscription_id; ALTER TABLE projects ADD COLUMN subscription_id UUID DEFAULT NULL - REFERENCES subscriptions(id); \ No newline at end of file + REFERENCES subscriptions(id); diff --git a/database/migrations/000030_subscription_profile_fk.up.sql b/database/migrations/000030_subscription_profile_fk.up.sql index 50a68e3051..3c63bf5b4f 100644 --- a/database/migrations/000030_subscription_profile_fk.up.sql +++ b/database/migrations/000030_subscription_profile_fk.up.sql @@ -1,19 +1,8 @@ --- Copyright 2024 Stacklok, 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. +-- SPDX-FileCopyrightText: Copyright 2024 The Minder Authors +-- SPDX-License-Identifier: Apache-2.0 -- FK was created on wrong table (I mixed up profiles and projects again...) ALTER TABLE projects DROP COLUMN subscription_id; ALTER TABLE profiles ADD COLUMN subscription_id UUID DEFAULT NULL - REFERENCES subscriptions(id); \ No newline at end of file + REFERENCES subscriptions(id); diff --git a/database/migrations/000031_case_insensitive_names.down.sql b/database/migrations/000031_case_insensitive_names.down.sql index 63d1e57e18..0500958b5d 100644 --- a/database/migrations/000031_case_insensitive_names.down.sql +++ b/database/migrations/000031_case_insensitive_names.down.sql @@ -1,16 +1,5 @@ --- Copyright 2024 Stacklok, 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. +-- SPDX-FileCopyrightText: Copyright 2024 The Minder Authors +-- SPDX-License-Identifier: Apache-2.0 DROP INDEX bundles_namespace_name_lower_idx; diff --git a/database/migrations/000031_case_insensitive_names.up.sql b/database/migrations/000031_case_insensitive_names.up.sql index 1c3d3bef04..5d88a31f01 100644 --- a/database/migrations/000031_case_insensitive_names.up.sql +++ b/database/migrations/000031_case_insensitive_names.up.sql @@ -1,16 +1,5 @@ --- Copyright 2024 Stacklok, 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. +-- SPDX-FileCopyrightText: Copyright 2024 The Minder Authors +-- SPDX-License-Identifier: Apache-2.0 -- We want case-insensitive-but-preserving names, in general. The first step -- is to replace UNIQUE indexes on names with UNIQUE indexes on lower(name). @@ -48,4 +37,4 @@ DROP INDEX IF EXISTS rule_evaluations_results_idx; CREATE UNIQUE INDEX features_name_lower_idx ON features (lower(name)); DROP INDEX features_name_idx; -CREATE UNIQUE INDEX bundles_namespace_name_lower_idx ON bundles (lower(namespace), lower(name)); \ No newline at end of file +CREATE UNIQUE INDEX bundles_namespace_name_lower_idx ON bundles (lower(namespace), lower(name)); diff --git a/database/migrations/000032_github_app_installations.down.sql b/database/migrations/000032_github_app_installations.down.sql index a719db0bf1..3c69f5bcfc 100644 --- a/database/migrations/000032_github_app_installations.down.sql +++ b/database/migrations/000032_github_app_installations.down.sql @@ -1,15 +1,4 @@ --- Copyright 2024 Stacklok, 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. +-- SPDX-FileCopyrightText: Copyright 2024 The Minder Authors +-- SPDX-License-Identifier: Apache-2.0 -DROP TABLE provider_github_app_installations; \ No newline at end of file +DROP TABLE provider_github_app_installations; diff --git a/database/migrations/000032_github_app_installations.up.sql b/database/migrations/000032_github_app_installations.up.sql index 83da356010..1ca5156ed9 100644 --- a/database/migrations/000032_github_app_installations.up.sql +++ b/database/migrations/000032_github_app_installations.up.sql @@ -1,16 +1,5 @@ --- Copyright 2024 Stacklok, 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. +-- SPDX-FileCopyrightText: Copyright 2024 The Minder Authors +-- SPDX-License-Identifier: Apache-2.0 -- providers becomes a star schema, where the provider is the central table, -- and different classes of providers have different provider_* tables that @@ -29,4 +18,4 @@ CREATE TABLE provider_github_app_installations ( UNIQUE NULLS DISTINCT (provider_id), -- NULL provider_ids are unclaimed. UNIQUE (organization_id), -- add an index on organization_id FOREIGN KEY (provider_id) REFERENCES providers (id) ON DELETE CASCADE -); \ No newline at end of file +); diff --git a/database/migrations/000033_profile_display_name.down.sql b/database/migrations/000033_profile_display_name.down.sql index f442b72359..49e47899bf 100644 --- a/database/migrations/000033_profile_display_name.down.sql +++ b/database/migrations/000033_profile_display_name.down.sql @@ -1,15 +1,4 @@ --- Copyright 2024 Stacklok, 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. +-- SPDX-FileCopyrightText: Copyright 2024 The Minder Authors +-- SPDX-License-Identifier: Apache-2.0 -ALTER TABLE profiles DROP COLUMN display_name; \ No newline at end of file +ALTER TABLE profiles DROP COLUMN display_name; diff --git a/database/migrations/000033_profile_display_name.up.sql b/database/migrations/000033_profile_display_name.up.sql index 77f87af589..c96e810988 100644 --- a/database/migrations/000033_profile_display_name.up.sql +++ b/database/migrations/000033_profile_display_name.up.sql @@ -1,17 +1,6 @@ --- Copyright 2024 Stacklok, 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. +-- SPDX-FileCopyrightText: Copyright 2024 The Minder Authors +-- SPDX-License-Identifier: Apache-2.0 -- Adds a `display_name` column to the `profiles` table. The display name defaults -- to the profile's `name` column, but can be overridden by the user. -ALTER TABLE profiles ADD COLUMN display_name TEXT NOT NULL DEFAULT ''; \ No newline at end of file +ALTER TABLE profiles ADD COLUMN display_name TEXT NOT NULL DEFAULT ''; diff --git a/database/migrations/000034_provider_class.down.sql b/database/migrations/000034_provider_class.down.sql index 80ab45aa5f..1c397f9aba 100644 --- a/database/migrations/000034_provider_class.down.sql +++ b/database/migrations/000034_provider_class.down.sql @@ -1,17 +1,6 @@ --- Copyright 2024 Stacklok, 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. +-- SPDX-FileCopyrightText: Copyright 2024 The Minder Authors +-- SPDX-License-Identifier: Apache-2.0 ALTER TABLE providers DROP COLUMN class; -DROP TYPE provider_class; \ No newline at end of file +DROP TYPE provider_class; diff --git a/database/migrations/000034_provider_class.up.sql b/database/migrations/000034_provider_class.up.sql index d0bf483b7a..2e98b3acb7 100644 --- a/database/migrations/000034_provider_class.up.sql +++ b/database/migrations/000034_provider_class.up.sql @@ -1,19 +1,8 @@ --- Copyright 2024 Stacklok, 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. +-- SPDX-FileCopyrightText: Copyright 2024 The Minder Authors +-- SPDX-License-Identifier: Apache-2.0 CREATE TYPE provider_class AS enum ('github', 'github-app'); ALTER TABLE providers -- Fills existing rows with 'github' - ADD COLUMN class provider_class DEFAULT 'github' NOT NULL; \ No newline at end of file + ADD COLUMN class provider_class DEFAULT 'github' NOT NULL; diff --git a/database/migrations/000035_provider_class_nullable.down.sql b/database/migrations/000035_provider_class_nullable.down.sql index 0af327c6e0..022d78b833 100644 --- a/database/migrations/000035_provider_class_nullable.down.sql +++ b/database/migrations/000035_provider_class_nullable.down.sql @@ -1,16 +1,5 @@ --- Copyright 2024 Stacklok, 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. +-- SPDX-FileCopyrightText: Copyright 2024 The Minder Authors +-- SPDX-License-Identifier: Apache-2.0 ALTER TABLE providers - ALTER COLUMN class SET NOT NULL; \ No newline at end of file + ALTER COLUMN class SET NOT NULL; diff --git a/database/migrations/000035_provider_class_nullable.up.sql b/database/migrations/000035_provider_class_nullable.up.sql index ec9f585019..4cc70c87a8 100644 --- a/database/migrations/000035_provider_class_nullable.up.sql +++ b/database/migrations/000035_provider_class_nullable.up.sql @@ -1,16 +1,5 @@ --- Copyright 2024 Stacklok, 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. +-- SPDX-FileCopyrightText: Copyright 2024 The Minder Authors +-- SPDX-License-Identifier: Apache-2.0 ALTER TABLE providers - ALTER COLUMN class DROP NOT NULL; \ No newline at end of file + ALTER COLUMN class DROP NOT NULL; diff --git a/database/migrations/000036_profile_label.down.sql b/database/migrations/000036_profile_label.down.sql index 336c6676e3..17bfad6725 100644 --- a/database/migrations/000036_profile_label.down.sql +++ b/database/migrations/000036_profile_label.down.sql @@ -1,16 +1,5 @@ --- Copyright 2024 Stacklok, 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. +-- SPDX-FileCopyrightText: Copyright 2024 The Minder Authors +-- SPDX-License-Identifier: Apache-2.0 ALTER TABLE profiles DROP COLUMN labels; diff --git a/database/migrations/000036_profile_label.up.sql b/database/migrations/000036_profile_label.up.sql index a480f576df..b259da62d6 100644 --- a/database/migrations/000036_profile_label.up.sql +++ b/database/migrations/000036_profile_label.up.sql @@ -1,20 +1,9 @@ --- Copyright 2024 Stacklok, 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. +-- SPDX-FileCopyrightText: Copyright 2024 The Minder Authors +-- SPDX-License-Identifier: Apache-2.0 ALTER TABLE profiles ADD COLUMN labels TEXT[] DEFAULT '{}'; -- This index is a bit besides the point of profile labels, but while profiling the searches -- we noticed that the profile_id index was missing and it was causing a full table scan -- which was more costly then the subsequent label filtering on the subset of profiles. -CREATE INDEX idx_entity_profiles_profile_id ON entity_profiles(profile_id); \ No newline at end of file +CREATE INDEX idx_entity_profiles_profile_id ON entity_profiles(profile_id); diff --git a/database/migrations/000037_session_state_foreign_key.down.sql b/database/migrations/000037_session_state_foreign_key.down.sql index a2119a4ca4..9dd2bc2d2e 100644 --- a/database/migrations/000037_session_state_foreign_key.down.sql +++ b/database/migrations/000037_session_state_foreign_key.down.sql @@ -1,16 +1,5 @@ --- Copyright 2024 Stacklok, 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. +-- SPDX-FileCopyrightText: Copyright 2024 The Minder Authors +-- SPDX-License-Identifier: Apache-2.0 -- Drop the existing foreign key constraint on provider ALTER TABLE session_store DROP CONSTRAINT session_store_project_id_fkey; diff --git a/database/migrations/000037_session_state_foreign_key.up.sql b/database/migrations/000037_session_state_foreign_key.up.sql index 1492ac9333..191d71c29f 100644 --- a/database/migrations/000037_session_state_foreign_key.up.sql +++ b/database/migrations/000037_session_state_foreign_key.up.sql @@ -1,16 +1,5 @@ --- Copyright 2024 Stacklok, 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. +-- SPDX-FileCopyrightText: Copyright 2024 The Minder Authors +-- SPDX-License-Identifier: Apache-2.0 -- Drop the existing foreign key constraint on provider ALTER TABLE session_store DROP CONSTRAINT session_store_project_id_provider_fkey; @@ -20,4 +9,4 @@ ALTER TABLE session_store ADD CONSTRAINT session_store_project_id_fkey FOREIGN KEY (project_id) REFERENCES projects(id) - ON DELETE CASCADE; \ No newline at end of file + ON DELETE CASCADE; diff --git a/database/migrations/000038_coalesce_nil_labels.down.sql b/database/migrations/000038_coalesce_nil_labels.down.sql index 4e8600aa6e..f1268970a7 100644 --- a/database/migrations/000038_coalesce_nil_labels.down.sql +++ b/database/migrations/000038_coalesce_nil_labels.down.sql @@ -1,15 +1,4 @@ --- Copyright 2024 Stacklok, 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. +-- SPDX-FileCopyrightText: Copyright 2024 The Minder Authors +-- SPDX-License-Identifier: Apache-2.0 --- no down migration, the up migration fixes a bug where we could end up with nil label columns in profiles \ No newline at end of file +-- no down migration, the up migration fixes a bug where we could end up with nil label columns in profiles diff --git a/database/migrations/000038_coalesce_nil_labels.up.sql b/database/migrations/000038_coalesce_nil_labels.up.sql index a086dae17b..48df5e2b34 100644 --- a/database/migrations/000038_coalesce_nil_labels.up.sql +++ b/database/migrations/000038_coalesce_nil_labels.up.sql @@ -1,16 +1,5 @@ --- Copyright 2024 Stacklok, 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. +-- SPDX-FileCopyrightText: Copyright 2024 The Minder Authors +-- SPDX-License-Identifier: Apache-2.0 BEGIN; @@ -19,4 +8,4 @@ UPDATE profiles SET labels = '{}' WHERE labels IS NULL; -COMMIT; \ No newline at end of file +COMMIT; diff --git a/database/migrations/000039_ruletype_displayname.down.sql b/database/migrations/000039_ruletype_displayname.down.sql index 8664613ea0..72398bdf5c 100644 --- a/database/migrations/000039_ruletype_displayname.down.sql +++ b/database/migrations/000039_ruletype_displayname.down.sql @@ -1,15 +1,4 @@ --- Copyright 2024 Stacklok, 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. +-- SPDX-FileCopyrightText: Copyright 2024 The Minder Authors +-- SPDX-License-Identifier: Apache-2.0 -ALTER TABLE rule_type DROP COLUMN display_name; \ No newline at end of file +ALTER TABLE rule_type DROP COLUMN display_name; diff --git a/database/migrations/000039_ruletype_displayname.up.sql b/database/migrations/000039_ruletype_displayname.up.sql index 4503c1bbc7..0ce85f7cf4 100644 --- a/database/migrations/000039_ruletype_displayname.up.sql +++ b/database/migrations/000039_ruletype_displayname.up.sql @@ -1,15 +1,4 @@ --- Copyright 2024 Stacklok, 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. +-- SPDX-FileCopyrightText: Copyright 2024 The Minder Authors +-- SPDX-License-Identifier: Apache-2.0 -ALTER TABLE rule_type ADD COLUMN display_name TEXT NOT NULL DEFAULT ''; \ No newline at end of file +ALTER TABLE rule_type ADD COLUMN display_name TEXT NOT NULL DEFAULT ''; diff --git a/database/migrations/000040_ruletype_drop_provider.down.sql b/database/migrations/000040_ruletype_drop_provider.down.sql index 9cbe788e84..eb1e2fc68f 100644 --- a/database/migrations/000040_ruletype_drop_provider.down.sql +++ b/database/migrations/000040_ruletype_drop_provider.down.sql @@ -1,16 +1,5 @@ --- Copyright 2024 Stacklok, 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. +-- SPDX-FileCopyrightText: Copyright 2024 The Minder Authors +-- SPDX-License-Identifier: Apache-2.0 ALTER TABLE rule_type ADD CONSTRAINT rule_type_provider_id_name_fkey @@ -22,4 +11,4 @@ ALTER TABLE rule_type ALTER COLUMN provider SET NOT NULL; ALTER TABLE rule_type - ALTER COLUMN provider_id SET NOT NULL; \ No newline at end of file + ALTER COLUMN provider_id SET NOT NULL; diff --git a/database/migrations/000040_ruletype_drop_provider.up.sql b/database/migrations/000040_ruletype_drop_provider.up.sql index 3d390ce052..f10feda5b6 100644 --- a/database/migrations/000040_ruletype_drop_provider.up.sql +++ b/database/migrations/000040_ruletype_drop_provider.up.sql @@ -1,16 +1,5 @@ --- Copyright 2024 Stacklok, 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. +-- SPDX-FileCopyrightText: Copyright 2024 The Minder Authors +-- SPDX-License-Identifier: Apache-2.0 -- Drop the existing foreign key constraint on provider ALTER TABLE rule_type DROP CONSTRAINT rule_type_provider_id_name_fkey; diff --git a/database/migrations/000041_remediate_metadata.down.sql b/database/migrations/000041_remediate_metadata.down.sql index ba30fe753d..9bd8124cc9 100644 --- a/database/migrations/000041_remediate_metadata.down.sql +++ b/database/migrations/000041_remediate_metadata.down.sql @@ -1,17 +1,6 @@ --- Copyright 2024 Stacklok, 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. +-- SPDX-FileCopyrightText: Copyright 2024 The Minder Authors +-- SPDX-License-Identifier: Apache-2.0 ALTER TABLE rule_details_remediate DROP COLUMN metadata; --- It is not possible to drop added values from enums, ref. `pending` for remediation_status_types \ No newline at end of file +-- It is not possible to drop added values from enums, ref. `pending` for remediation_status_types diff --git a/database/migrations/000041_remediate_metadata.up.sql b/database/migrations/000041_remediate_metadata.up.sql index 100295a231..5960babdca 100644 --- a/database/migrations/000041_remediate_metadata.up.sql +++ b/database/migrations/000041_remediate_metadata.up.sql @@ -1,16 +1,5 @@ --- Copyright 2024 Stacklok, 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. +-- SPDX-FileCopyrightText: Copyright 2024 The Minder Authors +-- SPDX-License-Identifier: Apache-2.0 BEGIN; @@ -18,4 +7,4 @@ ALTER TABLE rule_details_remediate ADD COLUMN metadata JSONB NOT NULL DEFAULT '{ ALTER TYPE remediation_status_types ADD VALUE 'pending'; -COMMIT; \ No newline at end of file +COMMIT; diff --git a/database/migrations/000042_credential_enrollment_nonce.down.sql b/database/migrations/000042_credential_enrollment_nonce.down.sql index 5ce3d64247..83a18d4dd0 100644 --- a/database/migrations/000042_credential_enrollment_nonce.down.sql +++ b/database/migrations/000042_credential_enrollment_nonce.down.sql @@ -1,16 +1,5 @@ --- Copyright 2024 Stacklok, 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. +-- SPDX-FileCopyrightText: Copyright 2024 The Minder Authors +-- SPDX-License-Identifier: Apache-2.0 BEGIN; @@ -23,4 +12,4 @@ ALTER TABLE provider_github_app_installations DROP COLUMN enrollment_nonce; ALTER TABLE provider_access_tokens DROP COLUMN enrollment_nonce; -COMMIT; \ No newline at end of file +COMMIT; diff --git a/database/migrations/000042_credential_enrollment_nonce.up.sql b/database/migrations/000042_credential_enrollment_nonce.up.sql index e2091bdf24..94a275fa5b 100644 --- a/database/migrations/000042_credential_enrollment_nonce.up.sql +++ b/database/migrations/000042_credential_enrollment_nonce.up.sql @@ -1,16 +1,5 @@ --- Copyright 2024 Stacklok, 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. +-- SPDX-FileCopyrightText: Copyright 2024 The Minder Authors +-- SPDX-License-Identifier: Apache-2.0 BEGIN; @@ -25,4 +14,4 @@ ALTER TABLE provider_github_app_installations ALTER TABLE provider_access_tokens ADD COLUMN enrollment_nonce TEXT; -COMMIT; \ No newline at end of file +COMMIT; diff --git a/database/migrations/000043_profiles_drop_provider.down.sql b/database/migrations/000043_profiles_drop_provider.down.sql index cfd5c5e695..de2dad18fb 100644 --- a/database/migrations/000043_profiles_drop_provider.down.sql +++ b/database/migrations/000043_profiles_drop_provider.down.sql @@ -1,16 +1,5 @@ --- Copyright 2024 Stacklok, 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. +-- SPDX-FileCopyrightText: Copyright 2024 The Minder Authors +-- SPDX-License-Identifier: Apache-2.0 BEGIN; @@ -26,4 +15,4 @@ ALTER TABLE profiles ALTER TABLE profiles ALTER COLUMN provider_id SET NOT NULL; -COMMIT; \ No newline at end of file +COMMIT; diff --git a/database/migrations/000043_profiles_drop_provider.up.sql b/database/migrations/000043_profiles_drop_provider.up.sql index 02d2239de1..1076a8aec4 100644 --- a/database/migrations/000043_profiles_drop_provider.up.sql +++ b/database/migrations/000043_profiles_drop_provider.up.sql @@ -1,16 +1,5 @@ --- Copyright 2024 Stacklok, 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. +-- SPDX-FileCopyrightText: Copyright 2024 The Minder Authors +-- SPDX-License-Identifier: Apache-2.0 BEGIN; @@ -23,4 +12,4 @@ ALTER TABLE profiles ALTER TABLE profiles ALTER COLUMN provider_id DROP NOT NULL; -COMMIT; \ No newline at end of file +COMMIT; diff --git a/database/migrations/000044_github_installation_cascade_delete.down.sql b/database/migrations/000044_github_installation_cascade_delete.down.sql index 0998407f30..3441751635 100644 --- a/database/migrations/000044_github_installation_cascade_delete.down.sql +++ b/database/migrations/000044_github_installation_cascade_delete.down.sql @@ -1,16 +1,5 @@ --- Copyright 2024 Stacklok, 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. +-- SPDX-FileCopyrightText: Copyright 2024 The Minder Authors +-- SPDX-License-Identifier: Apache-2.0 BEGIN; @@ -22,4 +11,4 @@ ALTER TABLE provider_github_app_installations FOREIGN KEY (project_id) REFERENCES projects(id); -COMMIT; \ No newline at end of file +COMMIT; diff --git a/database/migrations/000044_github_installation_cascade_delete.up.sql b/database/migrations/000044_github_installation_cascade_delete.up.sql index 6124cdcfa3..89ce8c7403 100644 --- a/database/migrations/000044_github_installation_cascade_delete.up.sql +++ b/database/migrations/000044_github_installation_cascade_delete.up.sql @@ -1,16 +1,5 @@ --- Copyright 2024 Stacklok, 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. +-- SPDX-FileCopyrightText: Copyright 2024 The Minder Authors +-- SPDX-License-Identifier: Apache-2.0 BEGIN; @@ -25,4 +14,4 @@ ALTER TABLE provider_github_app_installations REFERENCES projects(id) ON DELETE CASCADE; -COMMIT; \ No newline at end of file +COMMIT; diff --git a/database/migrations/000045_gh_app_install_int.down.sql b/database/migrations/000045_gh_app_install_int.down.sql index 6197ea8eb7..1f0291a23d 100644 --- a/database/migrations/000045_gh_app_install_int.down.sql +++ b/database/migrations/000045_gh_app_install_int.down.sql @@ -1,20 +1,9 @@ --- Copyright 2024 Stacklok, 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. +-- SPDX-FileCopyrightText: Copyright 2024 The Minder Authors +-- SPDX-License-Identifier: Apache-2.0 BEGIN; ALTER TABLE provider_github_app_installations ALTER COLUMN app_installation_id TYPE TEXT USING app_installation_id::TEXT; -COMMIT; \ No newline at end of file +COMMIT; diff --git a/database/migrations/000045_gh_app_install_int.up.sql b/database/migrations/000045_gh_app_install_int.up.sql index a41984d2f0..117bd6d68e 100644 --- a/database/migrations/000045_gh_app_install_int.up.sql +++ b/database/migrations/000045_gh_app_install_int.up.sql @@ -1,16 +1,5 @@ --- Copyright 2024 Stacklok, 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. +-- SPDX-FileCopyrightText: Copyright 2024 The Minder Authors +-- SPDX-License-Identifier: Apache-2.0 BEGIN; @@ -18,4 +7,4 @@ BEGIN; ALTER TABLE provider_github_app_installations ALTER COLUMN app_installation_id TYPE BIGINT USING app_installation_id::BIGINT; -COMMIT; \ No newline at end of file +COMMIT; diff --git a/database/migrations/000046_entity_profiles_views.down.sql b/database/migrations/000046_entity_profiles_views.down.sql index ae3f4f53b8..10572a2263 100644 --- a/database/migrations/000046_entity_profiles_views.down.sql +++ b/database/migrations/000046_entity_profiles_views.down.sql @@ -1,19 +1,8 @@ --- Copyright 2024 Stacklok, 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. +-- SPDX-FileCopyrightText: Copyright 2024 The Minder Authors +-- SPDX-License-Identifier: Apache-2.0 BEGIN; DROP VIEW IF EXISTS profiles_with_entity_profiles; -COMMIT; \ No newline at end of file +COMMIT; diff --git a/database/migrations/000046_entity_profiles_views.up.sql b/database/migrations/000046_entity_profiles_views.up.sql index 81ca57f5ea..f6ac9efcf2 100644 --- a/database/migrations/000046_entity_profiles_views.up.sql +++ b/database/migrations/000046_entity_profiles_views.up.sql @@ -1,16 +1,5 @@ --- Copyright 2024 Stacklok, 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. +-- SPDX-FileCopyrightText: Copyright 2024 The Minder Authors +-- SPDX-License-Identifier: Apache-2.0 BEGIN; @@ -18,4 +7,4 @@ CREATE VIEW profiles_with_entity_profiles AS( SELECT entity_profiles.*, profiles.id as profid FROM profiles LEFT JOIN entity_profiles ON profiles.id = entity_profiles.profile_id ); -COMMIT; \ No newline at end of file +COMMIT; diff --git a/database/migrations/000047_entity_profiles_views.down.sql b/database/migrations/000047_entity_profiles_views.down.sql index dbc8581728..94dd6ad60c 100644 --- a/database/migrations/000047_entity_profiles_views.down.sql +++ b/database/migrations/000047_entity_profiles_views.down.sql @@ -1,19 +1,8 @@ --- Copyright 2024 Stacklok, 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. +-- SPDX-FileCopyrightText: Copyright 2024 The Minder Authors +-- SPDX-License-Identifier: Apache-2.0 BEGIN; ALTER VIEW profiles_with_entity_profiles SET (security_invoker = false); -COMMIT; \ No newline at end of file +COMMIT; diff --git a/database/migrations/000047_entity_profiles_views.up.sql b/database/migrations/000047_entity_profiles_views.up.sql index cc31ed8d9e..0271f1c2f6 100644 --- a/database/migrations/000047_entity_profiles_views.up.sql +++ b/database/migrations/000047_entity_profiles_views.up.sql @@ -1,16 +1,5 @@ --- Copyright 2024 Stacklok, 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. +-- SPDX-FileCopyrightText: Copyright 2024 The Minder Authors +-- SPDX-License-Identifier: Apache-2.0 BEGIN; @@ -20,4 +9,4 @@ CREATE VIEW profiles_with_entity_profiles WITH (security_invoker = true) AS ( SELECT entity_profiles.*, profiles.id as profid FROM profiles LEFT JOIN entity_profiles ON profiles.id = entity_profiles.profile_id ); -COMMIT; \ No newline at end of file +COMMIT; diff --git a/database/migrations/000048_installation_metadata.down.sql b/database/migrations/000048_installation_metadata.down.sql index 00cc81fc8f..26da520f16 100644 --- a/database/migrations/000048_installation_metadata.down.sql +++ b/database/migrations/000048_installation_metadata.down.sql @@ -1,19 +1,8 @@ --- Copyright 2024 Stacklok, 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. +-- SPDX-FileCopyrightText: Copyright 2024 The Minder Authors +-- SPDX-License-Identifier: Apache-2.0 BEGIN; ALTER TABLE provider_github_app_installations DROP COLUMN is_org; -COMMIT; \ No newline at end of file +COMMIT; diff --git a/database/migrations/000048_installation_metadata.up.sql b/database/migrations/000048_installation_metadata.up.sql index 001680ed71..43c5dfc408 100644 --- a/database/migrations/000048_installation_metadata.up.sql +++ b/database/migrations/000048_installation_metadata.up.sql @@ -1,19 +1,8 @@ --- Copyright 2024 Stacklok, 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. +-- SPDX-FileCopyrightText: Copyright 2024 The Minder Authors +-- SPDX-License-Identifier: Apache-2.0 BEGIN; ALTER TABLE provider_github_app_installations ADD COLUMN is_org BOOLEAN NOT NULL DEFAULT FALSE; -COMMIT; \ No newline at end of file +COMMIT; diff --git a/database/migrations/000049_repo_license_text.down.sql b/database/migrations/000049_repo_license_text.down.sql index fb98b2699d..542b11ab15 100644 --- a/database/migrations/000049_repo_license_text.down.sql +++ b/database/migrations/000049_repo_license_text.down.sql @@ -1,15 +1,4 @@ --- Copyright 2024 Stacklok, 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. +-- SPDX-FileCopyrightText: Copyright 2024 The Minder Authors +-- SPDX-License-Identifier: Apache-2.0 -ALTER TABLE repositories ALTER COLUMN license TYPE VARCHAR(255); \ No newline at end of file +ALTER TABLE repositories ALTER COLUMN license TYPE VARCHAR(255); diff --git a/database/migrations/000049_repo_license_text.up.sql b/database/migrations/000049_repo_license_text.up.sql index 46047d0adb..901d8d2736 100644 --- a/database/migrations/000049_repo_license_text.up.sql +++ b/database/migrations/000049_repo_license_text.up.sql @@ -1,15 +1,4 @@ --- Copyright 2024 Stacklok, 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. +-- SPDX-FileCopyrightText: Copyright 2024 The Minder Authors +-- SPDX-License-Identifier: Apache-2.0 -ALTER TABLE repositories ALTER COLUMN license TYPE TEXT; \ No newline at end of file +ALTER TABLE repositories ALTER COLUMN license TYPE TEXT; diff --git a/database/migrations/000050_artifact_projects.down.sql b/database/migrations/000050_artifact_projects.down.sql index 27ca87b611..4105572da1 100644 --- a/database/migrations/000050_artifact_projects.down.sql +++ b/database/migrations/000050_artifact_projects.down.sql @@ -1,16 +1,5 @@ --- Copyright 2024 Stacklok, 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. +-- SPDX-FileCopyrightText: Copyright 2024 The Minder Authors +-- SPDX-License-Identifier: Apache-2.0 BEGIN; diff --git a/database/migrations/000050_artifact_projects.up.sql b/database/migrations/000050_artifact_projects.up.sql index 1a76cbfc6c..a2d7c4e0df 100644 --- a/database/migrations/000050_artifact_projects.up.sql +++ b/database/migrations/000050_artifact_projects.up.sql @@ -1,16 +1,5 @@ --- Copyright 2024 Stacklok, 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. +-- SPDX-FileCopyrightText: Copyright 2024 The Minder Authors +-- SPDX-License-Identifier: Apache-2.0 -- Artifact changes @@ -104,4 +93,4 @@ CREATE UNIQUE INDEX IF NOT EXISTS flush_cache_idx ON flush_cache( COALESCE(artifact_id, '00000000-0000-0000-0000-000000000000'::UUID), COALESCE(pull_request_id, '00000000-0000-0000-0000-000000000000'::UUID)); -COMMIT; \ No newline at end of file +COMMIT; diff --git a/database/migrations/000051_artifact_projects_cascade_delete.down.sql b/database/migrations/000051_artifact_projects_cascade_delete.down.sql index 143fa08ea1..701ad46786 100644 --- a/database/migrations/000051_artifact_projects_cascade_delete.down.sql +++ b/database/migrations/000051_artifact_projects_cascade_delete.down.sql @@ -1,16 +1,5 @@ --- Copyright 2024 Stacklok, 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. +-- SPDX-FileCopyrightText: Copyright 2024 The Minder Authors +-- SPDX-License-Identifier: Apache-2.0 -- Artifact changes @@ -28,4 +17,4 @@ ALTER TABLE artifacts ADD CONSTRAINT fk_artifacts_project_id FOREIGN KEY (projec ALTER TABLE artifacts DROP CONSTRAINT fk_artifacts_provider_id_and_name; ALTER TABLE artifacts ADD CONSTRAINT fk_artifacts_provider_id_and_name FOREIGN KEY (provider_id, provider_name) REFERENCES providers (id, name); -COMMIT; \ No newline at end of file +COMMIT; diff --git a/database/migrations/000051_artifact_projects_cascade_delete.up.sql b/database/migrations/000051_artifact_projects_cascade_delete.up.sql index 42ded49ae1..be1c826271 100644 --- a/database/migrations/000051_artifact_projects_cascade_delete.up.sql +++ b/database/migrations/000051_artifact_projects_cascade_delete.up.sql @@ -1,16 +1,5 @@ --- Copyright 2024 Stacklok, 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. +-- SPDX-FileCopyrightText: Copyright 2024 The Minder Authors +-- SPDX-License-Identifier: Apache-2.0 -- Artifact changes diff --git a/database/migrations/000052_eea_project_fk.down.sql b/database/migrations/000052_eea_project_fk.down.sql index c9c4d06dfa..b659d46aa6 100644 --- a/database/migrations/000052_eea_project_fk.down.sql +++ b/database/migrations/000052_eea_project_fk.down.sql @@ -1,16 +1,5 @@ --- Copyright 2024 Stacklok, 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. +-- SPDX-FileCopyrightText: Copyright 2024 The Minder Authors +-- SPDX-License-Identifier: Apache-2.0 BEGIN; @@ -20,4 +9,4 @@ ALTER TABLE entity_execution_locks ADD CONSTRAINT fk_entity_execution_lock_proje ALTER TABLE flush_caches DROP CONSTRAINT fk_flush_cache_project_id; ALTER TABLE flush_caches ADD CONSTRAINT fk_flush_cache_project_id FOREIGN KEY (project_id) REFERENCES projects (id); -COMMIT; \ No newline at end of file +COMMIT; diff --git a/database/migrations/000052_eea_project_fk.up.sql b/database/migrations/000052_eea_project_fk.up.sql index 40aaf38fdd..f0bc48dd8f 100644 --- a/database/migrations/000052_eea_project_fk.up.sql +++ b/database/migrations/000052_eea_project_fk.up.sql @@ -1,16 +1,5 @@ --- Copyright 2024 Stacklok, 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. +-- SPDX-FileCopyrightText: Copyright 2024 The Minder Authors +-- SPDX-License-Identifier: Apache-2.0 BEGIN; @@ -22,4 +11,4 @@ ALTER TABLE entity_execution_lock ADD CONSTRAINT fk_entity_execution_lock_projec ALTER TABLE flush_cache DROP CONSTRAINT fk_flush_cache_project_id; ALTER TABLE flush_cache ADD CONSTRAINT fk_flush_cache_project_id FOREIGN KEY (project_id) REFERENCES projects (id) ON DELETE CASCADE; -COMMIT; \ No newline at end of file +COMMIT; diff --git a/database/migrations/000053_provider_class_non_nullable.down.sql b/database/migrations/000053_provider_class_non_nullable.down.sql index 1439f8f2d8..9cd85bcd40 100644 --- a/database/migrations/000053_provider_class_non_nullable.down.sql +++ b/database/migrations/000053_provider_class_non_nullable.down.sql @@ -1,15 +1,4 @@ --- Copyright 2024 Stacklok, 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. +-- SPDX-FileCopyrightText: Copyright 2024 The Minder Authors +-- SPDX-License-Identifier: Apache-2.0 -ALTER TABLE providers ALTER COLUMN class DROP NOT NULL \ No newline at end of file +ALTER TABLE providers ALTER COLUMN class DROP NOT NULL diff --git a/database/migrations/000053_provider_class_non_nullable.up.sql b/database/migrations/000053_provider_class_non_nullable.up.sql index 7b92da191e..3dad0c323e 100644 --- a/database/migrations/000053_provider_class_non_nullable.up.sql +++ b/database/migrations/000053_provider_class_non_nullable.up.sql @@ -1,16 +1,5 @@ --- Copyright 2024 Stacklok, 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. +-- SPDX-FileCopyrightText: Copyright 2024 The Minder Authors +-- SPDX-License-Identifier: Apache-2.0 -- undo migration #35 -ALTER TABLE providers ALTER COLUMN class SET NOT NULL \ No newline at end of file +ALTER TABLE providers ALTER COLUMN class SET NOT NULL diff --git a/database/migrations/000054_profile_status_after_insert.down.sql b/database/migrations/000054_profile_status_after_insert.down.sql index c9c8f29193..ec8057b48c 100644 --- a/database/migrations/000054_profile_status_after_insert.down.sql +++ b/database/migrations/000054_profile_status_after_insert.down.sql @@ -1,16 +1,5 @@ --- Copyright 2023 Stacklok, 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. +-- SPDX-FileCopyrightText: Copyright 2023 The Minder Authors +-- SPDX-License-Identifier: Apache-2.0 -- Start to make sure the function and trigger are either both added or none BEGIN; diff --git a/database/migrations/000054_profile_status_after_insert.up.sql b/database/migrations/000054_profile_status_after_insert.up.sql index 964e88bc9b..115f109b6e 100644 --- a/database/migrations/000054_profile_status_after_insert.up.sql +++ b/database/migrations/000054_profile_status_after_insert.up.sql @@ -1,16 +1,5 @@ --- Copyright 2023 Stacklok, 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. +-- SPDX-FileCopyrightText: Copyright 2023 The Minder Authors +-- SPDX-License-Identifier: Apache-2.0 -- Start to make sure the function and trigger are either both added or none BEGIN; diff --git a/database/migrations/000055_oci_prov.down.sql b/database/migrations/000055_oci_prov.down.sql index ebf1a219a2..a8ac777582 100644 --- a/database/migrations/000055_oci_prov.down.sql +++ b/database/migrations/000055_oci_prov.down.sql @@ -1,13 +1,2 @@ --- Copyright 2024 Stacklok, 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. +-- SPDX-FileCopyrightText: Copyright 2024 The Minder Authors +-- SPDX-License-Identifier: Apache-2.0 diff --git a/database/migrations/000055_oci_prov.up.sql b/database/migrations/000055_oci_prov.up.sql index 2927ba137d..da21e09996 100644 --- a/database/migrations/000055_oci_prov.up.sql +++ b/database/migrations/000055_oci_prov.up.sql @@ -1,16 +1,5 @@ --- Copyright 2024 Stacklok, 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. +-- SPDX-FileCopyrightText: Copyright 2024 The Minder Authors +-- SPDX-License-Identifier: Apache-2.0 ALTER TYPE provider_type ADD VALUE 'image-lister'; diff --git a/database/migrations/000056_encrypted_column.down.sql b/database/migrations/000056_encrypted_column.down.sql index bf3bc084a3..6ed7d8a0a8 100644 --- a/database/migrations/000056_encrypted_column.down.sql +++ b/database/migrations/000056_encrypted_column.down.sql @@ -1,16 +1,5 @@ --- Copyright 2024 Stacklok, 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. +-- SPDX-FileCopyrightText: Copyright 2024 The Minder Authors +-- SPDX-License-Identifier: Apache-2.0 ALTER TABLE provider_access_tokens DROP COLUMN encrypted_access_token; -ALTER TABLE session_store DROP COLUMN encrypted_redirect; \ No newline at end of file +ALTER TABLE session_store DROP COLUMN encrypted_redirect; diff --git a/database/migrations/000056_encrypted_column.up.sql b/database/migrations/000056_encrypted_column.up.sql index e842ad0369..ea344f0ce7 100644 --- a/database/migrations/000056_encrypted_column.up.sql +++ b/database/migrations/000056_encrypted_column.up.sql @@ -1,18 +1,7 @@ --- Copyright 2024 Stacklok, 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. +-- SPDX-FileCopyrightText: Copyright 2024 The Minder Authors +-- SPDX-License-Identifier: Apache-2.0 -- add columns for new encrypted data format ALTER TABLE provider_access_tokens ADD COLUMN encrypted_access_token JSONB; -ALTER TABLE session_store ADD COLUMN encrypted_redirect TEXT; \ No newline at end of file +ALTER TABLE session_store ADD COLUMN encrypted_redirect TEXT; diff --git a/database/migrations/000057_encrypted_redirect_jsonb.down.sql b/database/migrations/000057_encrypted_redirect_jsonb.down.sql index 960dd4d54f..533b1cb5f9 100644 --- a/database/migrations/000057_encrypted_redirect_jsonb.down.sql +++ b/database/migrations/000057_encrypted_redirect_jsonb.down.sql @@ -1,16 +1,5 @@ --- Copyright 2024 Stacklok, 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. +-- SPDX-FileCopyrightText: Copyright 2024 The Minder Authors +-- SPDX-License-Identifier: Apache-2.0 -- add columns for new encrypted data format diff --git a/database/migrations/000057_encrypted_redirect_jsonb.up.sql b/database/migrations/000057_encrypted_redirect_jsonb.up.sql index 4b14fd14db..011cf0304e 100644 --- a/database/migrations/000057_encrypted_redirect_jsonb.up.sql +++ b/database/migrations/000057_encrypted_redirect_jsonb.up.sql @@ -1,16 +1,5 @@ --- Copyright 2024 Stacklok, 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. +-- SPDX-FileCopyrightText: Copyright 2024 The Minder Authors +-- SPDX-License-Identifier: Apache-2.0 -- add columns for new encrypted data format @@ -19,4 +8,4 @@ BEGIN; -- can't cast between TEXT and JSONB, drop and recreate ALTER TABLE session_store DROP COLUMN encrypted_redirect; ALTER TABLE session_store ADD COLUMN encrypted_redirect JSONB; -COMMIT; \ No newline at end of file +COMMIT; diff --git a/database/migrations/000058_session_store_config.down.sql b/database/migrations/000058_session_store_config.down.sql index 0fcaa713b1..dc7c031eb9 100644 --- a/database/migrations/000058_session_store_config.down.sql +++ b/database/migrations/000058_session_store_config.down.sql @@ -1,16 +1,5 @@ --- Copyright 2024 Stacklok, 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. +-- SPDX-FileCopyrightText: Copyright 2024 The Minder Authors +-- SPDX-License-Identifier: Apache-2.0 BEGIN; diff --git a/database/migrations/000058_session_store_config.up.sql b/database/migrations/000058_session_store_config.up.sql index 33b978813a..a80dbcc06d 100644 --- a/database/migrations/000058_session_store_config.up.sql +++ b/database/migrations/000058_session_store_config.up.sql @@ -1,16 +1,5 @@ --- Copyright 2024 Stacklok, 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. +-- SPDX-FileCopyrightText: Copyright 2024 The Minder Authors +-- SPDX-License-Identifier: Apache-2.0 BEGIN; diff --git a/database/migrations/000059_encrypted_token_nullable.down.sql b/database/migrations/000059_encrypted_token_nullable.down.sql index f7481c5cc9..828f2bcc1c 100644 --- a/database/migrations/000059_encrypted_token_nullable.down.sql +++ b/database/migrations/000059_encrypted_token_nullable.down.sql @@ -1,16 +1,5 @@ --- Copyright 2024 Stacklok, 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. +-- SPDX-FileCopyrightText: Copyright 2024 The Minder Authors +-- SPDX-License-Identifier: Apache-2.0 BEGIN; diff --git a/database/migrations/000059_encrypted_token_nullable.up.sql b/database/migrations/000059_encrypted_token_nullable.up.sql index 7e12fc00d7..ee70cc5091 100644 --- a/database/migrations/000059_encrypted_token_nullable.up.sql +++ b/database/migrations/000059_encrypted_token_nullable.up.sql @@ -1,16 +1,5 @@ --- Copyright 2024 Stacklok, 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. +-- SPDX-FileCopyrightText: Copyright 2024 The Minder Authors +-- SPDX-License-Identifier: Apache-2.0 BEGIN; diff --git a/database/migrations/000060_rule_instances.down.sql b/database/migrations/000060_rule_instances.down.sql index 060178fcba..8209e134c9 100644 --- a/database/migrations/000060_rule_instances.down.sql +++ b/database/migrations/000060_rule_instances.down.sql @@ -1,16 +1,5 @@ --- Copyright 2024 Stacklok, 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. +-- SPDX-FileCopyrightText: Copyright 2024 The Minder Authors +-- SPDX-License-Identifier: Apache-2.0 BEGIN; diff --git a/database/migrations/000060_rule_instances.up.sql b/database/migrations/000060_rule_instances.up.sql index 98a104d2e0..b81d32020e 100644 --- a/database/migrations/000060_rule_instances.up.sql +++ b/database/migrations/000060_rule_instances.up.sql @@ -1,16 +1,5 @@ --- Copyright 2024 Stacklok, 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. +-- SPDX-FileCopyrightText: Copyright 2024 The Minder Authors +-- SPDX-License-Identifier: Apache-2.0 BEGIN; diff --git a/database/migrations/000061_rule_instance_not_null_def.down.sql b/database/migrations/000061_rule_instance_not_null_def.down.sql index e1cb2a6518..741951a8ee 100644 --- a/database/migrations/000061_rule_instance_not_null_def.down.sql +++ b/database/migrations/000061_rule_instance_not_null_def.down.sql @@ -1,16 +1,5 @@ --- Copyright 2024 Stacklok, 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. +-- SPDX-FileCopyrightText: Copyright 2024 The Minder Authors +-- SPDX-License-Identifier: Apache-2.0 BEGIN; diff --git a/database/migrations/000061_rule_instance_not_null_def.up.sql b/database/migrations/000061_rule_instance_not_null_def.up.sql index 221892237a..559dcf8199 100644 --- a/database/migrations/000061_rule_instance_not_null_def.up.sql +++ b/database/migrations/000061_rule_instance_not_null_def.up.sql @@ -1,16 +1,5 @@ --- Copyright 2024 Stacklok, 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. +-- SPDX-FileCopyrightText: Copyright 2024 The Minder Authors +-- SPDX-License-Identifier: Apache-2.0 BEGIN; diff --git a/database/migrations/000062_migrate_entity_profiles.down.sql b/database/migrations/000062_migrate_entity_profiles.down.sql index eeeb0c2907..ff1a1bdfc5 100644 --- a/database/migrations/000062_migrate_entity_profiles.down.sql +++ b/database/migrations/000062_migrate_entity_profiles.down.sql @@ -1,16 +1,5 @@ --- Copyright 2024 Stacklok, 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. +-- SPDX-FileCopyrightText: Copyright 2024 The Minder Authors +-- SPDX-License-Identifier: Apache-2.0 BEGIN; @@ -20,4 +9,4 @@ BEGIN; DELETE FROM rule_instances; UPDATE entity_profiles SET migrated = FALSE; -COMMIT; \ No newline at end of file +COMMIT; diff --git a/database/migrations/000062_migrate_entity_profiles.up.sql b/database/migrations/000062_migrate_entity_profiles.up.sql index ce3773dfea..7717caa796 100644 --- a/database/migrations/000062_migrate_entity_profiles.up.sql +++ b/database/migrations/000062_migrate_entity_profiles.up.sql @@ -1,16 +1,5 @@ --- Copyright 2024 Stacklok, 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. +-- SPDX-FileCopyrightText: Copyright 2024 The Minder Authors +-- SPDX-License-Identifier: Apache-2.0 BEGIN; diff --git a/database/migrations/000063_user_invites.down.sql b/database/migrations/000063_user_invites.down.sql index c7b40f7d93..2857797afc 100644 --- a/database/migrations/000063_user_invites.down.sql +++ b/database/migrations/000063_user_invites.down.sql @@ -1,16 +1,5 @@ --- Copyright 2024 Stacklok, 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. +-- SPDX-FileCopyrightText: Copyright 2024 The Minder Authors +-- SPDX-License-Identifier: Apache-2.0 BEGIN; diff --git a/database/migrations/000063_user_invites.up.sql b/database/migrations/000063_user_invites.up.sql index 3f60203df2..30548b376a 100644 --- a/database/migrations/000063_user_invites.up.sql +++ b/database/migrations/000063_user_invites.up.sql @@ -1,16 +1,5 @@ --- Copyright 2024 Stacklok, 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. +-- SPDX-FileCopyrightText: Copyright 2024 The Minder Authors +-- SPDX-License-Identifier: Apache-2.0 BEGIN; diff --git a/database/migrations/000064_evaluation_history.down.sql b/database/migrations/000064_evaluation_history.down.sql index 06415f9113..117284aedc 100644 --- a/database/migrations/000064_evaluation_history.down.sql +++ b/database/migrations/000064_evaluation_history.down.sql @@ -1,16 +1,5 @@ --- Copyright 2024 Stacklok, 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. +-- SPDX-FileCopyrightText: Copyright 2024 The Minder Authors +-- SPDX-License-Identifier: Apache-2.0 BEGIN; diff --git a/database/migrations/000064_evaluation_history.up.sql b/database/migrations/000064_evaluation_history.up.sql index 296802cc37..a103145cf5 100644 --- a/database/migrations/000064_evaluation_history.up.sql +++ b/database/migrations/000064_evaluation_history.up.sql @@ -1,16 +1,5 @@ --- Copyright 2024 Stacklok, 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. +-- SPDX-FileCopyrightText: Copyright 2024 The Minder Authors +-- SPDX-License-Identifier: Apache-2.0 BEGIN; diff --git a/database/migrations/000065_rule_instance_project_id.down.sql b/database/migrations/000065_rule_instance_project_id.down.sql index 59e51fa254..79d3281bde 100644 --- a/database/migrations/000065_rule_instance_project_id.down.sql +++ b/database/migrations/000065_rule_instance_project_id.down.sql @@ -1,16 +1,5 @@ --- Copyright 2024 Stacklok, 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. +-- SPDX-FileCopyrightText: Copyright 2024 The Minder Authors +-- SPDX-License-Identifier: Apache-2.0 BEGIN; diff --git a/database/migrations/000065_rule_instance_project_id.up.sql b/database/migrations/000065_rule_instance_project_id.up.sql index 4029b8d335..4f6102fa10 100644 --- a/database/migrations/000065_rule_instance_project_id.up.sql +++ b/database/migrations/000065_rule_instance_project_id.up.sql @@ -1,16 +1,5 @@ --- Copyright 2024 Stacklok, 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. +-- SPDX-FileCopyrightText: Copyright 2024 The Minder Authors +-- SPDX-License-Identifier: Apache-2.0 -- add column, do not mark as NOT NULL since we need to populate it ALTER TABLE rule_instances ADD COLUMN project_id UUID REFERENCES projects(id) ON DELETE CASCADE; diff --git a/database/migrations/000066_repo_reminder.down.sql b/database/migrations/000066_repo_reminder.down.sql index 2a8151f5a7..efaa103144 100644 --- a/database/migrations/000066_repo_reminder.down.sql +++ b/database/migrations/000066_repo_reminder.down.sql @@ -1,15 +1,4 @@ --- Copyright 2024 Stacklok, 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. +-- SPDX-FileCopyrightText: Copyright 2024 The Minder Authors +-- SPDX-License-Identifier: Apache-2.0 ALTER TABLE repositories DROP COLUMN reminder_last_sent; diff --git a/database/migrations/000066_repo_reminder.up.sql b/database/migrations/000066_repo_reminder.up.sql index ff0695144e..b243e8adde 100644 --- a/database/migrations/000066_repo_reminder.up.sql +++ b/database/migrations/000066_repo_reminder.up.sql @@ -1,15 +1,4 @@ --- Copyright 2024 Stacklok, 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. +-- SPDX-FileCopyrightText: Copyright 2024 The Minder Authors +-- SPDX-License-Identifier: Apache-2.0 ALTER TABLE repositories ADD COLUMN reminder_last_sent TIMESTAMP; diff --git a/database/migrations/000067_rule_evaluations_repo_index.down.sql b/database/migrations/000067_rule_evaluations_repo_index.down.sql index 735903115c..d64fe4b1f3 100644 --- a/database/migrations/000067_rule_evaluations_repo_index.down.sql +++ b/database/migrations/000067_rule_evaluations_repo_index.down.sql @@ -1,15 +1,4 @@ --- Copyright 2024 Stacklok, 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. +-- SPDX-FileCopyrightText: Copyright 2024 The Minder Authors +-- SPDX-License-Identifier: Apache-2.0 DROP INDEX IF EXISTS rule_evaluations_repository_id_idx; diff --git a/database/migrations/000067_rule_evaluations_repo_index.up.sql b/database/migrations/000067_rule_evaluations_repo_index.up.sql index c9da5b7036..af079ed58e 100644 --- a/database/migrations/000067_rule_evaluations_repo_index.up.sql +++ b/database/migrations/000067_rule_evaluations_repo_index.up.sql @@ -1,15 +1,4 @@ --- Copyright 2024 Stacklok, 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. +-- SPDX-FileCopyrightText: Copyright 2024 The Minder Authors +-- SPDX-License-Identifier: Apache-2.0 CREATE INDEX CONCURRENTLY rule_evaluations_repository_id_idx ON rule_evaluations(repository_id); diff --git a/database/migrations/000068_rule_instance_project_id_migrate.down.sql b/database/migrations/000068_rule_instance_project_id_migrate.down.sql index 9bbedd390f..29d916d631 100644 --- a/database/migrations/000068_rule_instance_project_id_migrate.down.sql +++ b/database/migrations/000068_rule_instance_project_id_migrate.down.sql @@ -1,15 +1,4 @@ --- Copyright 2024 Stacklok, 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. +-- SPDX-FileCopyrightText: Copyright 2024 The Minder Authors +-- SPDX-License-Identifier: Apache-2.0 ALTER TABLE rule_instances ALTER COLUMN project_id DROP NOT NULL; diff --git a/database/migrations/000068_rule_instance_project_id_migrate.up.sql b/database/migrations/000068_rule_instance_project_id_migrate.up.sql index 2aa20aff91..635b0ad012 100644 --- a/database/migrations/000068_rule_instance_project_id_migrate.up.sql +++ b/database/migrations/000068_rule_instance_project_id_migrate.up.sql @@ -1,16 +1,5 @@ --- Copyright 2024 Stacklok, 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. +-- SPDX-FileCopyrightText: Copyright 2024 The Minder Authors +-- SPDX-License-Identifier: Apache-2.0 BEGIN; @@ -23,4 +12,4 @@ WHERE ri.profile_id = pf.id; -- now we can add the not null constraint ALTER TABLE rule_instances ALTER COLUMN project_id SET NOT NULL; -COMMIT; \ No newline at end of file +COMMIT; diff --git a/database/migrations/000069_evaluation_history_modifications.down.sql b/database/migrations/000069_evaluation_history_modifications.down.sql index ea1e0e1f08..3ba31c378a 100644 --- a/database/migrations/000069_evaluation_history_modifications.down.sql +++ b/database/migrations/000069_evaluation_history_modifications.down.sql @@ -1,16 +1,5 @@ --- Copyright 2024 Stacklok, 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. +-- SPDX-FileCopyrightText: Copyright 2024 The Minder Authors +-- SPDX-License-Identifier: Apache-2.0 BEGIN; @@ -40,4 +29,4 @@ CREATE TABLE evaluation_instance( PRIMARY KEY (evaluation_id, evaluation_time) ); -COMMIT; \ No newline at end of file +COMMIT; diff --git a/database/migrations/000069_evaluation_history_modifications.up.sql b/database/migrations/000069_evaluation_history_modifications.up.sql index 325d86393a..05d08d1698 100644 --- a/database/migrations/000069_evaluation_history_modifications.up.sql +++ b/database/migrations/000069_evaluation_history_modifications.up.sql @@ -1,16 +1,5 @@ --- Copyright 2024 Stacklok, 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. +-- SPDX-FileCopyrightText: Copyright 2024 The Minder Authors +-- SPDX-License-Identifier: Apache-2.0 BEGIN; @@ -40,4 +29,4 @@ ALTER TABLE alert_events ADD FOREIGN KEY (evaluation_id) REFERENCES evaluation_s DROP TABLE IF EXISTS evaluation_instance; ALTER TABLE evaluation_statuses ADD COLUMN evaluation_times TIMESTAMP[] NOT NULL DEFAULT ARRAY[NOW()]::TIMESTAMP[]; -COMMIT; \ No newline at end of file +COMMIT; diff --git a/database/migrations/000070_evaluation_history_most_recent.down.sql b/database/migrations/000070_evaluation_history_most_recent.down.sql index 0175acf908..16755cf018 100644 --- a/database/migrations/000070_evaluation_history_most_recent.down.sql +++ b/database/migrations/000070_evaluation_history_most_recent.down.sql @@ -1,15 +1,4 @@ --- Copyright 2024 Stacklok, 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. +-- SPDX-FileCopyrightText: Copyright 2024 The Minder Authors +-- SPDX-License-Identifier: Apache-2.0 ALTER TABLE evaluation_statuses DROP COLUMN most_recent_evaluation; diff --git a/database/migrations/000070_evaluation_history_most_recent.up.sql b/database/migrations/000070_evaluation_history_most_recent.up.sql index e7c597f4e5..c232e87cab 100644 --- a/database/migrations/000070_evaluation_history_most_recent.up.sql +++ b/database/migrations/000070_evaluation_history_most_recent.up.sql @@ -1,16 +1,5 @@ --- Copyright 2024 Stacklok, 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. +-- SPDX-FileCopyrightText: Copyright 2024 The Minder Authors +-- SPDX-License-Identifier: Apache-2.0 -- Store the most recent timestamp in a dedicated field to simplify sorting the rows. diff --git a/database/migrations/000071_profile_selectors.down.sql b/database/migrations/000071_profile_selectors.down.sql index 4e501ebaad..c6b89fdb97 100644 --- a/database/migrations/000071_profile_selectors.down.sql +++ b/database/migrations/000071_profile_selectors.down.sql @@ -1,16 +1,5 @@ --- Copyright 2024 Stacklok, 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. +-- SPDX-FileCopyrightText: Copyright 2024 The Minder Authors +-- SPDX-License-Identifier: Apache-2.0 BEGIN; diff --git a/database/migrations/000071_profile_selectors.up.sql b/database/migrations/000071_profile_selectors.up.sql index dfc1e0563f..20e9285b3d 100644 --- a/database/migrations/000071_profile_selectors.up.sql +++ b/database/migrations/000071_profile_selectors.up.sql @@ -1,16 +1,5 @@ --- Copyright 2024 Stacklok, 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. +-- SPDX-FileCopyrightText: Copyright 2024 The Minder Authors +-- SPDX-License-Identifier: Apache-2.0 BEGIN; diff --git a/database/migrations/000072_profile_selector_type.down.sql b/database/migrations/000072_profile_selector_type.down.sql index 1fdb2de352..a15cfec2c3 100644 --- a/database/migrations/000072_profile_selector_type.down.sql +++ b/database/migrations/000072_profile_selector_type.down.sql @@ -1,16 +1,5 @@ --- Copyright 2024 Stacklok, 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. +-- SPDX-FileCopyrightText: Copyright 2024 The Minder Authors +-- SPDX-License-Identifier: Apache-2.0 BEGIN; diff --git a/database/migrations/000072_profile_selectors_type.up.sql b/database/migrations/000072_profile_selectors_type.up.sql index 8173933733..78b759564d 100644 --- a/database/migrations/000072_profile_selectors_type.up.sql +++ b/database/migrations/000072_profile_selectors_type.up.sql @@ -1,16 +1,5 @@ --- Copyright 2024 Stacklok, 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. +-- SPDX-FileCopyrightText: Copyright 2024 The Minder Authors +-- SPDX-License-Identifier: Apache-2.0 BEGIN; @@ -22,4 +11,4 @@ CREATE TYPE profile_selector AS ( comment TEXT ); -COMMIT; \ No newline at end of file +COMMIT; diff --git a/database/migrations/000073_evaluation_statuses_timestamps_with_timezone.down.sql b/database/migrations/000073_evaluation_statuses_timestamps_with_timezone.down.sql index 08b2c8993c..b48b5f5167 100644 --- a/database/migrations/000073_evaluation_statuses_timestamps_with_timezone.down.sql +++ b/database/migrations/000073_evaluation_statuses_timestamps_with_timezone.down.sql @@ -1,16 +1,5 @@ --- Copyright 2024 Stacklok, 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. +-- SPDX-FileCopyrightText: Copyright 2024 The Minder Authors +-- SPDX-License-Identifier: Apache-2.0 BEGIN; diff --git a/database/migrations/000073_evaluation_statuses_timestamps_with_timezone.up.sql b/database/migrations/000073_evaluation_statuses_timestamps_with_timezone.up.sql index f8c01e09ac..00c57c90d0 100644 --- a/database/migrations/000073_evaluation_statuses_timestamps_with_timezone.up.sql +++ b/database/migrations/000073_evaluation_statuses_timestamps_with_timezone.up.sql @@ -1,16 +1,5 @@ --- Copyright 2024 Stacklok, 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. +-- SPDX-FileCopyrightText: Copyright 2024 The Minder Authors +-- SPDX-License-Identifier: Apache-2.0 BEGIN; diff --git a/database/migrations/000074_sdlc_entities.down.sql b/database/migrations/000074_sdlc_entities.down.sql index ebf1a219a2..a8ac777582 100644 --- a/database/migrations/000074_sdlc_entities.down.sql +++ b/database/migrations/000074_sdlc_entities.down.sql @@ -1,13 +1,2 @@ --- Copyright 2024 Stacklok, 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. +-- SPDX-FileCopyrightText: Copyright 2024 The Minder Authors +-- SPDX-License-Identifier: Apache-2.0 diff --git a/database/migrations/000074_sdlc_entities.up.sql b/database/migrations/000074_sdlc_entities.up.sql index 7021f1b064..00d0eda7cb 100644 --- a/database/migrations/000074_sdlc_entities.up.sql +++ b/database/migrations/000074_sdlc_entities.up.sql @@ -1,16 +1,5 @@ --- Copyright 2024 Stacklok, 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. +-- SPDX-FileCopyrightText: Copyright 2024 The Minder Authors +-- SPDX-License-Identifier: Apache-2.0 BEGIN TRANSACTION; diff --git a/database/migrations/000075_evaluation_history_no_dedupe.down.sql b/database/migrations/000075_evaluation_history_no_dedupe.down.sql index 81bb1e5ba5..ac348b7eeb 100644 --- a/database/migrations/000075_evaluation_history_no_dedupe.down.sql +++ b/database/migrations/000075_evaluation_history_no_dedupe.down.sql @@ -1,20 +1,9 @@ --- Copyright 2024 Stacklok, 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. +-- SPDX-FileCopyrightText: Copyright 2024 The Minder Authors +-- SPDX-License-Identifier: Apache-2.0 BEGIN; ALTER TABLE evaluation_statuses ADD COLUMN evaluation_times TIMESTAMPZ[] NOT NULL DEFAULT ARRAY[NOW()]::TIMESTAMP[]; ALTER TABLE evaluation_statuses RENAME COLUMN evaluation_time TO most_recent_evaluation; -COMMIT; \ No newline at end of file +COMMIT; diff --git a/database/migrations/000075_evaluation_history_no_dedupe.up.sql b/database/migrations/000075_evaluation_history_no_dedupe.up.sql index 4e2d54dfb1..f4bcb20656 100644 --- a/database/migrations/000075_evaluation_history_no_dedupe.up.sql +++ b/database/migrations/000075_evaluation_history_no_dedupe.up.sql @@ -1,20 +1,9 @@ --- Copyright 2024 Stacklok, 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. +-- SPDX-FileCopyrightText: Copyright 2024 The Minder Authors +-- SPDX-License-Identifier: Apache-2.0 BEGIN; ALTER TABLE evaluation_statuses DROP COLUMN evaluation_times; ALTER TABLE evaluation_statuses RENAME COLUMN most_recent_evaluation TO evaluation_time; -COMMIT; \ No newline at end of file +COMMIT; diff --git a/database/migrations/000076_evaluation_entity_type.down.sql b/database/migrations/000076_evaluation_entity_type.down.sql index d210482ddd..22fdb6010c 100644 --- a/database/migrations/000076_evaluation_entity_type.down.sql +++ b/database/migrations/000076_evaluation_entity_type.down.sql @@ -1,15 +1,4 @@ --- Copyright 2024 Stacklok, 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. +-- SPDX-FileCopyrightText: Copyright 2024 The Minder Authors +-- SPDX-License-Identifier: Apache-2.0 ALTER TABLE evaluation_rule_entities DROP COLUMN entity_type; diff --git a/database/migrations/000076_evaluation_entity_type.up.sql b/database/migrations/000076_evaluation_entity_type.up.sql index d11811deaf..c36715374e 100644 --- a/database/migrations/000076_evaluation_entity_type.up.sql +++ b/database/migrations/000076_evaluation_entity_type.up.sql @@ -1,16 +1,5 @@ --- Copyright 2024 Stacklok, 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. +-- SPDX-FileCopyrightText: Copyright 2024 The Minder Authors +-- SPDX-License-Identifier: Apache-2.0 -- this will be made non-nullable in a future PR ALTER TABLE evaluation_rule_entities ADD COLUMN entity_type entities; diff --git a/database/migrations/000077_drop_profile_migration.down.sql b/database/migrations/000077_drop_profile_migration.down.sql index 3406ce6c6a..700fefccfc 100644 --- a/database/migrations/000077_drop_profile_migration.down.sql +++ b/database/migrations/000077_drop_profile_migration.down.sql @@ -1,16 +1,5 @@ --- Copyright 2024 Stacklok, 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. +-- SPDX-FileCopyrightText: Copyright 2024 The Minder Authors +-- SPDX-License-Identifier: Apache-2.0 CREATE TABLE migration_profile_backfill_log ( profile_id UUID PRIMARY KEY, diff --git a/database/migrations/000077_drop_profile_migration.up.sql b/database/migrations/000077_drop_profile_migration.up.sql index 1f492059b1..5cdb8287a9 100644 --- a/database/migrations/000077_drop_profile_migration.up.sql +++ b/database/migrations/000077_drop_profile_migration.up.sql @@ -1,15 +1,4 @@ --- Copyright 2024 Stacklok, 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. +-- SPDX-FileCopyrightText: Copyright 2024 The Minder Authors +-- SPDX-License-Identifier: Apache-2.0 DROP TABLE IF EXISTS migration_profile_backfill_log; diff --git a/database/migrations/000078_latest_status_profile_id.down.sql b/database/migrations/000078_latest_status_profile_id.down.sql index 59cb30b69b..68d4f98c57 100644 --- a/database/migrations/000078_latest_status_profile_id.down.sql +++ b/database/migrations/000078_latest_status_profile_id.down.sql @@ -1,16 +1,5 @@ --- Copyright 2024 Stacklok, 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. +-- SPDX-FileCopyrightText: Copyright 2024 The Minder Authors +-- SPDX-License-Identifier: Apache-2.0 -- introduce some denormalization to simplify a common access pattern -- namely: retrieving the latest rule statuses for a specific profile diff --git a/database/migrations/000078_latest_status_profile_id.up.sql b/database/migrations/000078_latest_status_profile_id.up.sql index 0aeddf618a..99d2b53882 100644 --- a/database/migrations/000078_latest_status_profile_id.up.sql +++ b/database/migrations/000078_latest_status_profile_id.up.sql @@ -1,16 +1,5 @@ --- Copyright 2024 Stacklok, 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. +-- SPDX-FileCopyrightText: Copyright 2024 The Minder Authors +-- SPDX-License-Identifier: Apache-2.0 -- introduce some denormalization to simplify a common access pattern -- namely: retrieving the latest rule statuses for a specific profile diff --git a/database/migrations/000079_rule_evaluations_evaluation_history.down.sql b/database/migrations/000079_rule_evaluations_evaluation_history.down.sql index a75b9483c4..af6996267d 100644 --- a/database/migrations/000079_rule_evaluations_evaluation_history.down.sql +++ b/database/migrations/000079_rule_evaluations_evaluation_history.down.sql @@ -1,16 +1,5 @@ --- Copyright 2024 Stacklok, 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. +-- SPDX-FileCopyrightText: Copyright 2024 The Minder Authors +-- SPDX-License-Identifier: Apache-2.0 BEGIN; @@ -27,4 +16,4 @@ ALTER TABLE latest_evaluation_statuses DROP INDEX latest_evaluation_statuses_profile_id_idx; CREATE INDEX idx_profile_id ON latest_evaluation_statuses(profile_id); -COMMIT; \ No newline at end of file +COMMIT; diff --git a/database/migrations/000079_rule_evaluations_evaluation_history.up.sql b/database/migrations/000079_rule_evaluations_evaluation_history.up.sql index e1791c615b..31e1c50b7e 100644 --- a/database/migrations/000079_rule_evaluations_evaluation_history.up.sql +++ b/database/migrations/000079_rule_evaluations_evaluation_history.up.sql @@ -1,16 +1,5 @@ --- Copyright 2024 Stacklok, 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. +-- SPDX-FileCopyrightText: Copyright 2024 The Minder Authors +-- SPDX-License-Identifier: Apache-2.0 BEGIN; @@ -34,4 +23,4 @@ ALTER TABLE latest_evaluation_statuses DROP INDEX IF EXISTS idx_profile_id; CREATE INDEX ON latest_evaluation_statuses(profile_id); -COMMIT; \ No newline at end of file +COMMIT; diff --git a/database/migrations/000080_drop_entity_profile_rules.down.sql b/database/migrations/000080_drop_entity_profile_rules.down.sql index 1b0ac69063..febdfc72e9 100644 --- a/database/migrations/000080_drop_entity_profile_rules.down.sql +++ b/database/migrations/000080_drop_entity_profile_rules.down.sql @@ -1,16 +1,5 @@ --- Copyright 2024 Stacklok, 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. +-- SPDX-FileCopyrightText: Copyright 2024 The Minder Authors +-- SPDX-License-Identifier: Apache-2.0 CREATE TABLE entity_profile_rules ( id UUID NOT NULL DEFAULT gen_random_uuid() PRIMARY KEY, @@ -18,4 +7,4 @@ CREATE TABLE entity_profile_rules ( rule_type_id UUID NOT NULL REFERENCES rule_type(id) ON DELETE CASCADE, created_at TIMESTAMP NOT NULL DEFAULT NOW(), UNIQUE (entity_profile_id, rule_type_id) -); \ No newline at end of file +); diff --git a/database/migrations/000080_drop_entity_profile_rules.up.sql b/database/migrations/000080_drop_entity_profile_rules.up.sql index 752fc2078a..57be8acb3c 100644 --- a/database/migrations/000080_drop_entity_profile_rules.up.sql +++ b/database/migrations/000080_drop_entity_profile_rules.up.sql @@ -1,15 +1,4 @@ --- Copyright 2024 Stacklok, 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. +-- SPDX-FileCopyrightText: Copyright 2024 The Minder Authors +-- SPDX-License-Identifier: Apache-2.0 -DROP TABLE IF EXISTS entity_profile_rules; \ No newline at end of file +DROP TABLE IF EXISTS entity_profile_rules; diff --git a/database/migrations/000081_evaluation_entity_type_migrate.down.sql b/database/migrations/000081_evaluation_entity_type_migrate.down.sql index b6271a7ae3..2bcca567b8 100644 --- a/database/migrations/000081_evaluation_entity_type_migrate.down.sql +++ b/database/migrations/000081_evaluation_entity_type_migrate.down.sql @@ -1,15 +1,4 @@ --- Copyright 2024 Stacklok, 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. +-- SPDX-FileCopyrightText: Copyright 2024 The Minder Authors +-- SPDX-License-Identifier: Apache-2.0 ALTER TABLE evaluation_rule_entities ALTER COLUMN entity_type DROP NOT NULL; diff --git a/database/migrations/000081_evaluation_entity_type_migrate.up.sql b/database/migrations/000081_evaluation_entity_type_migrate.up.sql index f7a7ffbbb9..be6e013355 100644 --- a/database/migrations/000081_evaluation_entity_type_migrate.up.sql +++ b/database/migrations/000081_evaluation_entity_type_migrate.up.sql @@ -1,16 +1,5 @@ --- Copyright 2024 Stacklok, 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. +-- SPDX-FileCopyrightText: Copyright 2024 The Minder Authors +-- SPDX-License-Identifier: Apache-2.0 BEGIN; @@ -29,4 +18,4 @@ WHERE entity_type IS NULL; -- make field mandatory ALTER TABLE evaluation_rule_entities ALTER COLUMN entity_type SET NOT NULL; -COMMIT; \ No newline at end of file +COMMIT; diff --git a/database/migrations/000082_backfill_latest_eval_profile_id.down.sql b/database/migrations/000082_backfill_latest_eval_profile_id.down.sql index 9af0630bfd..40c327f9a5 100644 --- a/database/migrations/000082_backfill_latest_eval_profile_id.down.sql +++ b/database/migrations/000082_backfill_latest_eval_profile_id.down.sql @@ -1,15 +1,4 @@ --- Copyright 2024 Stacklok, 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. +-- SPDX-FileCopyrightText: Copyright 2024 The Minder Authors +-- SPDX-License-Identifier: Apache-2.0 ALTER TABLE latest_evaluation_statuses ALTER COLUMN profile_id DROP NOT NULL; diff --git a/database/migrations/000082_backfill_latest_eval_profile_id.up.sql b/database/migrations/000082_backfill_latest_eval_profile_id.up.sql index e88238c733..d41891dee4 100644 --- a/database/migrations/000082_backfill_latest_eval_profile_id.up.sql +++ b/database/migrations/000082_backfill_latest_eval_profile_id.up.sql @@ -1,16 +1,5 @@ --- Copyright 2024 Stacklok, 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. +-- SPDX-FileCopyrightText: Copyright 2024 The Minder Authors +-- SPDX-License-Identifier: Apache-2.0 BEGIN; @@ -25,4 +14,4 @@ WHERE les.profile_id IS NULL; -- make field mandatory ALTER TABLE latest_evaluation_statuses ALTER COLUMN profile_id SET NOT NULL; -COMMIT; \ No newline at end of file +COMMIT; diff --git a/database/migrations/000083_rule_evaluations_ere_id_backfill.down.sql b/database/migrations/000083_rule_evaluations_ere_id_backfill.down.sql index 110d932a8e..89e1d96d6f 100644 --- a/database/migrations/000083_rule_evaluations_ere_id_backfill.down.sql +++ b/database/migrations/000083_rule_evaluations_ere_id_backfill.down.sql @@ -1,15 +1,4 @@ --- Copyright 2024 Stacklok, 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. +-- SPDX-FileCopyrightText: Copyright 2024 The Minder Authors +-- SPDX-License-Identifier: Apache-2.0 ALTER TABLE rule_evaluations ALTER COLUMN rule_instance_id DROP NOT NULL; diff --git a/database/migrations/000083_rule_evaluations_ere_id_backfill.up.sql b/database/migrations/000083_rule_evaluations_ere_id_backfill.up.sql index dfacb6cb36..88ef3b4a74 100644 --- a/database/migrations/000083_rule_evaluations_ere_id_backfill.up.sql +++ b/database/migrations/000083_rule_evaluations_ere_id_backfill.up.sql @@ -1,16 +1,5 @@ --- Copyright 2024 Stacklok, 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. +-- SPDX-FileCopyrightText: Copyright 2024 The Minder Authors +-- SPDX-License-Identifier: Apache-2.0 BEGIN; @@ -61,4 +50,4 @@ ALTER TABLE rule_evaluations ALTER COLUMN rule_instance_id SET NOT NULL; -- note that rule_entity_id is still expected to contain nulls until we backfill -- evaluation state which predates the evaluation history tables. -COMMIT; \ No newline at end of file +COMMIT; diff --git a/database/migrations/000084_eval_status_checkpoint.down.sql b/database/migrations/000084_eval_status_checkpoint.down.sql index 1503b751e1..e91f361ca8 100644 --- a/database/migrations/000084_eval_status_checkpoint.down.sql +++ b/database/migrations/000084_eval_status_checkpoint.down.sql @@ -1,16 +1,5 @@ --- Copyright 2024 Stacklok, 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. +-- SPDX-FileCopyrightText: Copyright 2024 The Minder Authors +-- SPDX-License-Identifier: Apache-2.0 BEGIN; diff --git a/database/migrations/000084_eval_status_checkpoint.up.sql b/database/migrations/000084_eval_status_checkpoint.up.sql index e2b17762ab..0f9c58addd 100644 --- a/database/migrations/000084_eval_status_checkpoint.up.sql +++ b/database/migrations/000084_eval_status_checkpoint.up.sql @@ -1,16 +1,5 @@ --- Copyright 2024 Stacklok, 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. +-- SPDX-FileCopyrightText: Copyright 2024 The Minder Authors +-- SPDX-License-Identifier: Apache-2.0 BEGIN; @@ -23,4 +12,4 @@ ALTER TABLE evaluation_statuses ADD COLUMN checkpoint JSONB DEFAULT '{}' NOT NUL -- Add an index on the checkpoint column for faster lookups. CREATE INDEX evaluation_statuses_checkpoint_idx ON evaluation_statuses USING GIN (checkpoint); -COMMIT; \ No newline at end of file +COMMIT; diff --git a/database/migrations/000085_eval_history_changes.down.sql b/database/migrations/000085_eval_history_changes.down.sql index 3a477097e3..a0da91defc 100644 --- a/database/migrations/000085_eval_history_changes.down.sql +++ b/database/migrations/000085_eval_history_changes.down.sql @@ -1,16 +1,5 @@ --- Copyright 2024 Stacklok, 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. +-- SPDX-FileCopyrightText: Copyright 2024 The Minder Authors +-- SPDX-License-Identifier: Apache-2.0 BEGIN; @@ -20,4 +9,4 @@ DROP INDEX rule_instances_lower_name; ALTER TABLE rule_evaluations DROP COLUMN migrated; -COMMIT; \ No newline at end of file +COMMIT; diff --git a/database/migrations/000085_eval_history_changes.up.sql b/database/migrations/000085_eval_history_changes.up.sql index a65733d961..d15311eafa 100644 --- a/database/migrations/000085_eval_history_changes.up.sql +++ b/database/migrations/000085_eval_history_changes.up.sql @@ -1,16 +1,5 @@ --- Copyright 2024 Stacklok, 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. +-- SPDX-FileCopyrightText: Copyright 2024 The Minder Authors +-- SPDX-License-Identifier: Apache-2.0 BEGIN; @@ -23,4 +12,4 @@ ALTER TABLE rule_instances DROP CONSTRAINT IF EXISTS rule_instances_profile_id_e ALTER TABLE rule_evaluations ADD COLUMN migrated BOOLEAN NOT NULL DEFAULT FALSE; -COMMIT; \ No newline at end of file +COMMIT; diff --git a/database/migrations/000086_rule_evaluations_populate_migrated.down.sql b/database/migrations/000086_rule_evaluations_populate_migrated.down.sql index cc293cffdc..918820c9f4 100644 --- a/database/migrations/000086_rule_evaluations_populate_migrated.down.sql +++ b/database/migrations/000086_rule_evaluations_populate_migrated.down.sql @@ -1,16 +1,5 @@ --- Copyright 2024 Stacklok, 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. +-- SPDX-FileCopyrightText: Copyright 2024 The Minder Authors +-- SPDX-License-Identifier: Apache-2.0 BEGIN; @@ -41,4 +30,4 @@ WHERE rule_evaluations.rule_entity_id IS NULL AND rule_evaluations.rule_instance_id = ere.rule_id AND rule_evaluations.repository_id = ere.repository_id; -COMMIT; \ No newline at end of file +COMMIT; diff --git a/database/migrations/000086_rule_evaluations_populate_migrated.up.sql b/database/migrations/000086_rule_evaluations_populate_migrated.up.sql index d19abc940d..82fd2db221 100644 --- a/database/migrations/000086_rule_evaluations_populate_migrated.up.sql +++ b/database/migrations/000086_rule_evaluations_populate_migrated.up.sql @@ -1,16 +1,5 @@ --- Copyright 2024 Stacklok, 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. +-- SPDX-FileCopyrightText: Copyright 2024 The Minder Authors +-- SPDX-License-Identifier: Apache-2.0 BEGIN; @@ -21,4 +10,4 @@ WHERE rule_entity_id IS NOT NULL; ALTER TABLE rule_evaluations DROP COLUMN rule_entity_id; -COMMIT; \ No newline at end of file +COMMIT; diff --git a/database/migrations/000087_set_migrated_flag_rule_evaluations.down.sql b/database/migrations/000087_set_migrated_flag_rule_evaluations.down.sql index ccfaa840bd..b60bbc9a06 100644 --- a/database/migrations/000087_set_migrated_flag_rule_evaluations.down.sql +++ b/database/migrations/000087_set_migrated_flag_rule_evaluations.down.sql @@ -1,15 +1,4 @@ --- Copyright 2024 Stacklok, 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. +-- SPDX-FileCopyrightText: Copyright 2024 The Minder Authors +-- SPDX-License-Identifier: Apache-2.0 --- Nothing to undo \ No newline at end of file +-- Nothing to undo diff --git a/database/migrations/000087_set_migrated_flag_rule_evaluations.up.sql b/database/migrations/000087_set_migrated_flag_rule_evaluations.up.sql index d8a17dedfa..28d053e601 100644 --- a/database/migrations/000087_set_migrated_flag_rule_evaluations.up.sql +++ b/database/migrations/000087_set_migrated_flag_rule_evaluations.up.sql @@ -1,16 +1,5 @@ --- Copyright 2024 Stacklok, 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. +-- SPDX-FileCopyrightText: Copyright 2024 The Minder Authors +-- SPDX-License-Identifier: Apache-2.0 BEGIN; @@ -38,4 +27,4 @@ WHERE re.entity = 'repository'::entities AND ere.repository_id = re.repository_id AND re.migrated = FALSE; -COMMIT; \ No newline at end of file +COMMIT; diff --git a/database/migrations/000088_fix_rule_instance_id.down.sql b/database/migrations/000088_fix_rule_instance_id.down.sql index ccfaa840bd..b60bbc9a06 100644 --- a/database/migrations/000088_fix_rule_instance_id.down.sql +++ b/database/migrations/000088_fix_rule_instance_id.down.sql @@ -1,15 +1,4 @@ --- Copyright 2024 Stacklok, 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. +-- SPDX-FileCopyrightText: Copyright 2024 The Minder Authors +-- SPDX-License-Identifier: Apache-2.0 --- Nothing to undo \ No newline at end of file +-- Nothing to undo diff --git a/database/migrations/000088_fix_rule_instance_id.up.sql b/database/migrations/000088_fix_rule_instance_id.up.sql index c36e5ad2b4..6e3c1c3ff9 100644 --- a/database/migrations/000088_fix_rule_instance_id.up.sql +++ b/database/migrations/000088_fix_rule_instance_id.up.sql @@ -1,16 +1,5 @@ --- Copyright 2024 Stacklok, 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. +-- SPDX-FileCopyrightText: Copyright 2024 The Minder Authors +-- SPDX-License-Identifier: Apache-2.0 BEGIN; @@ -90,4 +79,4 @@ AND id IN ( WHERE ere.id IS NULL ); -COMMIT; \ No newline at end of file +COMMIT; diff --git a/database/migrations/000089_gitlab.down.sql b/database/migrations/000089_gitlab.down.sql index 38b8c91eb5..4921e03222 100644 --- a/database/migrations/000089_gitlab.down.sql +++ b/database/migrations/000089_gitlab.down.sql @@ -1,15 +1,4 @@ --- Copyright 2024 Stacklok, 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. +-- SPDX-FileCopyrightText: Copyright 2024 The Minder Authors +-- SPDX-License-Identifier: Apache-2.0 --- Can't delete enum types, so we'll just leave it \ No newline at end of file +-- Can't delete enum types, so we'll just leave it diff --git a/database/migrations/000089_gitlab.up.sql b/database/migrations/000089_gitlab.up.sql index a8b91de765..ff63581ddf 100644 --- a/database/migrations/000089_gitlab.up.sql +++ b/database/migrations/000089_gitlab.up.sql @@ -1,16 +1,5 @@ --- Copyright 2024 Stacklok, 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. +-- SPDX-FileCopyrightText: Copyright 2024 The Minder Authors +-- SPDX-License-Identifier: Apache-2.0 -- Add `gitlab` provider class ALTER TYPE provider_class ADD VALUE 'gitlab'; diff --git a/database/migrations/000090_entity_properties.down.sql b/database/migrations/000090_entity_properties.down.sql index 23ab3e3680..cd2559488b 100644 --- a/database/migrations/000090_entity_properties.down.sql +++ b/database/migrations/000090_entity_properties.down.sql @@ -1,20 +1,9 @@ --- Copyright 2024 Stacklok, 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. +-- SPDX-FileCopyrightText: Copyright 2024 The Minder Authors +-- SPDX-License-Identifier: Apache-2.0 BEGIN; DROP TABLE IF EXISTS properties; DROP TABLE IF EXISTS entities; -COMMIT; \ No newline at end of file +COMMIT; diff --git a/database/migrations/000090_entity_properties.up.sql b/database/migrations/000090_entity_properties.up.sql index d0655da760..555d7e98ec 100644 --- a/database/migrations/000090_entity_properties.up.sql +++ b/database/migrations/000090_entity_properties.up.sql @@ -1,16 +1,5 @@ --- Copyright 2024 Stacklok, 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. +-- SPDX-FileCopyrightText: Copyright 2024 The Minder Authors +-- SPDX-License-Identifier: Apache-2.0 BEGIN; @@ -34,4 +23,4 @@ CREATE TABLE IF NOT EXISTS properties( UNIQUE (entity_id, key) ); -COMMIT; \ No newline at end of file +COMMIT; diff --git a/database/migrations/000091_entity_project_fk.down.sql b/database/migrations/000091_entity_project_fk.down.sql index ce287d18e6..9a061a6356 100644 --- a/database/migrations/000091_entity_project_fk.down.sql +++ b/database/migrations/000091_entity_project_fk.down.sql @@ -1,15 +1,4 @@ --- Copyright 2024 Stacklok, 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. +-- SPDX-FileCopyrightText: Copyright 2024 The Minder Authors +-- SPDX-License-Identifier: Apache-2.0 --- It doesn't make sense to remove this FK constraint \ No newline at end of file +-- It doesn't make sense to remove this FK constraint diff --git a/database/migrations/000091_entity_project_fk.up.sql b/database/migrations/000091_entity_project_fk.up.sql index b5b7bd2c02..7ec08528f7 100644 --- a/database/migrations/000091_entity_project_fk.up.sql +++ b/database/migrations/000091_entity_project_fk.up.sql @@ -1,16 +1,5 @@ --- Copyright 2024 Stacklok, 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. +-- SPDX-FileCopyrightText: Copyright 2024 The Minder Authors +-- SPDX-License-Identifier: Apache-2.0 -- Drop the foreign key constraint and then recreate it with the ON DELETE CASCADE option BEGIN; @@ -24,4 +13,4 @@ ALTER TABLE entity_instances DROP CONSTRAINT entity_instances_provider_id_fkey; ALTER TABLE entity_instances ADD CONSTRAINT entity_instances_provider_id_fkey FOREIGN KEY (provider_id) REFERENCES providers(id) ON DELETE CASCADE; -COMMIT; \ No newline at end of file +COMMIT; diff --git a/database/migrations/000092_migrate_rule_statuses.down.sql b/database/migrations/000092_migrate_rule_statuses.down.sql index 8c3beb1cb1..06e18e4f4a 100644 --- a/database/migrations/000092_migrate_rule_statuses.down.sql +++ b/database/migrations/000092_migrate_rule_statuses.down.sql @@ -1,15 +1,4 @@ --- Copyright 2024 Stacklok, 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. +-- SPDX-FileCopyrightText: Copyright 2024 The Minder Authors +-- SPDX-License-Identifier: Apache-2.0 --- Not much to do here - previous migration inserted more rows instead of changing DB structure \ No newline at end of file +-- Not much to do here - previous migration inserted more rows instead of changing DB structure diff --git a/database/migrations/000092_migrate_rule_statuses.up.sql b/database/migrations/000092_migrate_rule_statuses.up.sql index 4e82342773..73926720d6 100644 --- a/database/migrations/000092_migrate_rule_statuses.up.sql +++ b/database/migrations/000092_migrate_rule_statuses.up.sql @@ -1,16 +1,5 @@ --- Copyright 2024 Stacklok, 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. +-- SPDX-FileCopyrightText: Copyright 2024 The Minder Authors +-- SPDX-License-Identifier: Apache-2.0 BEGIN; @@ -148,4 +137,4 @@ WHERE id IN (SELECT rule_evaluation_id FROM temp_migrate_rule_evaluations); -- a model for the temporary table :( DROP TABLE IF EXISTS temp_migrate_rule_evaluations; -COMMIT; \ No newline at end of file +COMMIT; diff --git a/database/migrations/000093_profile_status_trigger.down.sql b/database/migrations/000093_profile_status_trigger.down.sql index 42206b8ac4..140d838317 100644 --- a/database/migrations/000093_profile_status_trigger.down.sql +++ b/database/migrations/000093_profile_status_trigger.down.sql @@ -1,16 +1,5 @@ --- Copyright 2024 Stacklok, 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. +-- SPDX-FileCopyrightText: Copyright 2024 The Minder Authors +-- SPDX-License-Identifier: Apache-2.0 BEGIN; diff --git a/database/migrations/000093_profile_status_trigger.up.sql b/database/migrations/000093_profile_status_trigger.up.sql index b56eb93872..19e1c0997f 100644 --- a/database/migrations/000093_profile_status_trigger.up.sql +++ b/database/migrations/000093_profile_status_trigger.up.sql @@ -1,16 +1,5 @@ --- Copyright 2024 Stacklok, 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. +-- SPDX-FileCopyrightText: Copyright 2024 The Minder Authors +-- SPDX-License-Identifier: Apache-2.0 -- Start to make sure the function and trigger are either both added or none BEGIN; diff --git a/database/migrations/000094_eea_entity_instance.down.sql b/database/migrations/000094_eea_entity_instance.down.sql index 47dd0d92df..783d86f611 100644 --- a/database/migrations/000094_eea_entity_instance.down.sql +++ b/database/migrations/000094_eea_entity_instance.down.sql @@ -1,20 +1,9 @@ --- Copyright 2024 Stacklok, 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. +-- SPDX-FileCopyrightText: Copyright 2024 The Minder Authors +-- SPDX-License-Identifier: Apache-2.0 BEGIN; ALTER TABLE entity_execution_lock DROP COLUMN entity_instance_id; ALTER TABLE flush_cache DROP COLUMN entity_instance_id; -COMMIT; \ No newline at end of file +COMMIT; diff --git a/database/migrations/000094_eea_entity_instance.up.sql b/database/migrations/000094_eea_entity_instance.up.sql index 5c0f92eeb7..bcb99b35d9 100644 --- a/database/migrations/000094_eea_entity_instance.up.sql +++ b/database/migrations/000094_eea_entity_instance.up.sql @@ -1,16 +1,5 @@ --- Copyright 2024 Stacklok, 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. +-- SPDX-FileCopyrightText: Copyright 2024 The Minder Authors +-- SPDX-License-Identifier: Apache-2.0 BEGIN; @@ -23,4 +12,4 @@ ALTER TABLE entity_execution_lock ADD CONSTRAINT fk_entity_instance_id FOREIGN K ALTER TABLE flush_cache ADD COLUMN entity_instance_id UUID; ALTER TABLE flush_cache ADD CONSTRAINT fk_entity_instance_id FOREIGN KEY (entity_instance_id) REFERENCES entity_instances(id) ON DELETE CASCADE; -COMMIT; \ No newline at end of file +COMMIT; diff --git a/database/migrations/000095_eval_central_entities.down.sql b/database/migrations/000095_eval_central_entities.down.sql index 1b1eb511e0..7dee1a1ec9 100644 --- a/database/migrations/000095_eval_central_entities.down.sql +++ b/database/migrations/000095_eval_central_entities.down.sql @@ -1,16 +1,5 @@ --- Copyright 2024 Stacklok, 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. +-- SPDX-FileCopyrightText: Copyright 2024 The Minder Authors +-- SPDX-License-Identifier: Apache-2.0 BEGIN; @@ -18,4 +7,4 @@ BEGIN; ALTER TABLE evaluation_rule_entities DROP COLUMN entity_instance_id; -COMMIT; \ No newline at end of file +COMMIT; diff --git a/database/migrations/000095_eval_central_entities.up.sql b/database/migrations/000095_eval_central_entities.up.sql index 01b076da88..e857541f3f 100644 --- a/database/migrations/000095_eval_central_entities.up.sql +++ b/database/migrations/000095_eval_central_entities.up.sql @@ -1,16 +1,5 @@ --- Copyright 2024 Stacklok, 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. +-- SPDX-FileCopyrightText: Copyright 2024 The Minder Authors +-- SPDX-License-Identifier: Apache-2.0 BEGIN; @@ -19,4 +8,4 @@ BEGIN; ALTER TABLE evaluation_rule_entities ADD COLUMN entity_instance_id UUID; ALTER TABLE evaluation_rule_entities ADD CONSTRAINT fk_entity_instance_id FOREIGN KEY (entity_instance_id) REFERENCES entity_instances(id) ON DELETE CASCADE; -COMMIT; \ No newline at end of file +COMMIT; diff --git a/database/migrations/000096_rule_evaluation_drop.down.sql b/database/migrations/000096_rule_evaluation_drop.down.sql index a5285eb924..4dca333a0d 100644 --- a/database/migrations/000096_rule_evaluation_drop.down.sql +++ b/database/migrations/000096_rule_evaluation_drop.down.sql @@ -1,16 +1,5 @@ --- Copyright 2024 Stacklok, 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. +-- SPDX-FileCopyrightText: Copyright 2024 The Minder Authors +-- SPDX-License-Identifier: Apache-2.0 BEGIN; @@ -110,4 +99,4 @@ alter table rule_details_alert create unique index idx_rule_detail_alert_ids on rule_details_alert (rule_eval_id); -COMMIT; \ No newline at end of file +COMMIT; diff --git a/database/migrations/000096_rule_evaluation_drop.up.sql b/database/migrations/000096_rule_evaluation_drop.up.sql index 14f5761438..47a58de05e 100644 --- a/database/migrations/000096_rule_evaluation_drop.up.sql +++ b/database/migrations/000096_rule_evaluation_drop.up.sql @@ -1,16 +1,5 @@ --- Copyright 2024 Stacklok, 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. +-- SPDX-FileCopyrightText: Copyright 2024 The Minder Authors +-- SPDX-License-Identifier: Apache-2.0 BEGIN; @@ -20,4 +9,4 @@ DROP TABLE rule_details_alert; DROP TABLE rule_details_remediate; DROP TABLE rule_evaluations; -COMMIT; \ No newline at end of file +COMMIT; diff --git a/database/migrations/000097_entity_instance_not_null.down.sql b/database/migrations/000097_entity_instance_not_null.down.sql index 2fa23d0b3b..6fd0d831ed 100644 --- a/database/migrations/000097_entity_instance_not_null.down.sql +++ b/database/migrations/000097_entity_instance_not_null.down.sql @@ -1,16 +1,5 @@ --- Copyright 2024 Stacklok, 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. +-- SPDX-FileCopyrightText: Copyright 2024 The Minder Authors +-- SPDX-License-Identifier: Apache-2.0 BEGIN; @@ -20,4 +9,4 @@ ALTER TABLE entity_execution_lock ALTER COLUMN entity_instance_id DROP NOT NULL; ALTER TABLE flush_cache ALTER COLUMN entity_instance_id DROP NOT NULL; ALTER TABLE evaluation_rule_entities ALTER COLUMN entity_instance_id DROP NOT NULL; -COMMIT; \ No newline at end of file +COMMIT; diff --git a/database/migrations/000097_entity_instance_not_null.up.sql b/database/migrations/000097_entity_instance_not_null.up.sql index b03fbe79a2..9896850042 100644 --- a/database/migrations/000097_entity_instance_not_null.up.sql +++ b/database/migrations/000097_entity_instance_not_null.up.sql @@ -1,16 +1,5 @@ --- Copyright 2024 Stacklok, 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. +-- SPDX-FileCopyrightText: Copyright 2024 The Minder Authors +-- SPDX-License-Identifier: Apache-2.0 BEGIN; @@ -21,4 +10,4 @@ ALTER TABLE entity_execution_lock ALTER COLUMN entity_instance_id SET NOT NULL; ALTER TABLE flush_cache ALTER COLUMN entity_instance_id SET NOT NULL; ALTER TABLE evaluation_rule_entities ALTER COLUMN entity_instance_id SET NOT NULL; -COMMIT; \ No newline at end of file +COMMIT; diff --git a/database/migrations/000098_properties_id_gen_default.down.sql b/database/migrations/000098_properties_id_gen_default.down.sql index 91e16d3dc3..6aa16ee25d 100644 --- a/database/migrations/000098_properties_id_gen_default.down.sql +++ b/database/migrations/000098_properties_id_gen_default.down.sql @@ -1,16 +1,5 @@ --- Copyright 2024 Stacklok, 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. +-- SPDX-FileCopyrightText: Copyright 2024 The Minder Authors +-- SPDX-License-Identifier: Apache-2.0 BEGIN; diff --git a/database/migrations/000098_properties_id_gen_default.up.sql b/database/migrations/000098_properties_id_gen_default.up.sql index 141fe80384..c6556cf2fc 100644 --- a/database/migrations/000098_properties_id_gen_default.up.sql +++ b/database/migrations/000098_properties_id_gen_default.up.sql @@ -1,16 +1,5 @@ --- Copyright 2024 Stacklok, 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. +-- SPDX-FileCopyrightText: Copyright 2024 The Minder Authors +-- SPDX-License-Identifier: Apache-2.0 BEGIN; @@ -22,4 +11,4 @@ ALTER COLUMN id SET DEFAULT gen_random_uuid(); ALTER TABLE properties ALTER COLUMN id SET NOT NULL; -COMMIT; \ No newline at end of file +COMMIT; diff --git a/database/migrations/000099_eea_entity_instance_idx.down.sql b/database/migrations/000099_eea_entity_instance_idx.down.sql index 384bbb31ce..f4d09ba8c8 100644 --- a/database/migrations/000099_eea_entity_instance_idx.down.sql +++ b/database/migrations/000099_eea_entity_instance_idx.down.sql @@ -1,16 +1,5 @@ --- Copyright 2024 Stacklok, 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. +-- SPDX-FileCopyrightText: Copyright 2024 The Minder Authors +-- SPDX-License-Identifier: Apache-2.0 BEGIN; diff --git a/database/migrations/000099_eea_entity_instance_idx.up.sql b/database/migrations/000099_eea_entity_instance_idx.up.sql index 94971ece54..c46c961c60 100644 --- a/database/migrations/000099_eea_entity_instance_idx.up.sql +++ b/database/migrations/000099_eea_entity_instance_idx.up.sql @@ -1,16 +1,5 @@ --- Copyright 2024 Stacklok, 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. +-- SPDX-FileCopyrightText: Copyright 2024 The Minder Authors +-- SPDX-License-Identifier: Apache-2.0 BEGIN; @@ -19,4 +8,4 @@ BEGIN; CREATE UNIQUE INDEX entity_execution_lock_entity_instance_idx ON entity_execution_lock (entity_instance_id); CREATE UNIQUE INDEX flush_cache_entity_instance_idx ON flush_cache (entity_instance_id); -COMMIT; \ No newline at end of file +COMMIT; diff --git a/database/migrations/000100_rule_type_add_state_column.down.sql b/database/migrations/000100_rule_type_add_state_column.down.sql index 0507c9c890..6455803f7d 100644 --- a/database/migrations/000100_rule_type_add_state_column.down.sql +++ b/database/migrations/000100_rule_type_add_state_column.down.sql @@ -1,16 +1,5 @@ --- Copyright 2024 Stacklok, 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. +-- SPDX-FileCopyrightText: Copyright 2024 The Minder Authors +-- SPDX-License-Identifier: Apache-2.0 BEGIN; diff --git a/database/migrations/000100_rule_type_add_state_column.up.sql b/database/migrations/000100_rule_type_add_state_column.up.sql index 8b1a10f591..6838d16c19 100644 --- a/database/migrations/000100_rule_type_add_state_column.up.sql +++ b/database/migrations/000100_rule_type_add_state_column.up.sql @@ -1,16 +1,5 @@ --- Copyright 2024 Stacklok, 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. +-- SPDX-FileCopyrightText: Copyright 2024 The Minder Authors +-- SPDX-License-Identifier: Apache-2.0 BEGIN; diff --git a/database/migrations/000101_eea_rm_indexes.down.sql b/database/migrations/000101_eea_rm_indexes.down.sql index 994b857564..a020bf874c 100644 --- a/database/migrations/000101_eea_rm_indexes.down.sql +++ b/database/migrations/000101_eea_rm_indexes.down.sql @@ -1,16 +1,5 @@ --- Copyright 2023 Stacklok, 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. +-- SPDX-FileCopyrightText: Copyright 2023 The Minder Authors +-- SPDX-License-Identifier: Apache-2.0 BEGIN; @@ -26,4 +15,4 @@ CREATE UNIQUE INDEX IF NOT EXISTS flush_cache_idx ON flush_cache( COALESCE(artifact_id, '00000000-0000-0000-0000-000000000000'::UUID), COALESCE(pull_request_id, '00000000-0000-0000-0000-000000000000'::UUID)); -COMMIT; \ No newline at end of file +COMMIT; diff --git a/database/migrations/000101_eea_rm_indexes.up.sql b/database/migrations/000101_eea_rm_indexes.up.sql index 5b88d41a42..a5e35c1056 100644 --- a/database/migrations/000101_eea_rm_indexes.up.sql +++ b/database/migrations/000101_eea_rm_indexes.up.sql @@ -1,20 +1,9 @@ --- Copyright 2023 Stacklok, 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. +-- SPDX-FileCopyrightText: Copyright 2023 The Minder Authors +-- SPDX-License-Identifier: Apache-2.0 BEGIN; DROP INDEX IF EXISTS entity_execution_lock_idx; DROP INDEX IF EXISTS flush_cache_idx; -COMMIT; \ No newline at end of file +COMMIT; diff --git a/database/migrations/000102_properties_upstream_id_index.down.sql b/database/migrations/000102_properties_upstream_id_index.down.sql index fb51aa01f9..cd09f51355 100644 --- a/database/migrations/000102_properties_upstream_id_index.down.sql +++ b/database/migrations/000102_properties_upstream_id_index.down.sql @@ -1,19 +1,8 @@ --- Copyright 2023 Stacklok, 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. +-- SPDX-FileCopyrightText: Copyright 2023 The Minder Authors +-- SPDX-License-Identifier: Apache-2.0 BEGIN; DROP INDEX IF EXISTS idx_properties_value_gin; -COMMIT; \ No newline at end of file +COMMIT; diff --git a/database/migrations/000102_properties_upstream_id_index.up.sql b/database/migrations/000102_properties_upstream_id_index.up.sql index 767c4ef950..3941bcc0cb 100644 --- a/database/migrations/000102_properties_upstream_id_index.up.sql +++ b/database/migrations/000102_properties_upstream_id_index.up.sql @@ -1,20 +1,9 @@ --- Copyright 2023 Stacklok, 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. +-- SPDX-FileCopyrightText: Copyright 2023 The Minder Authors +-- SPDX-License-Identifier: Apache-2.0 BEGIN; -- Create index on properties for upstream_id CREATE INDEX idx_properties_value_gin ON properties USING GIN (value jsonb_path_ops); -COMMIT; \ No newline at end of file +COMMIT; diff --git a/database/migrations/000103_eea_rm_per_entities_columns.down.sql b/database/migrations/000103_eea_rm_per_entities_columns.down.sql index f457a334d3..1151671738 100644 --- a/database/migrations/000103_eea_rm_per_entities_columns.down.sql +++ b/database/migrations/000103_eea_rm_per_entities_columns.down.sql @@ -1,16 +1,5 @@ --- Copyright 2024 Stacklok, 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. +-- SPDX-FileCopyrightText: Copyright 2024 The Minder Authors +-- SPDX-License-Identifier: Apache-2.0 BEGIN; diff --git a/database/migrations/000103_eea_rm_per_entities_columns.up.sql b/database/migrations/000103_eea_rm_per_entities_columns.up.sql index b9eda420bf..19f9adf6a5 100644 --- a/database/migrations/000103_eea_rm_per_entities_columns.up.sql +++ b/database/migrations/000103_eea_rm_per_entities_columns.up.sql @@ -1,16 +1,5 @@ --- Copyright 2024 Stacklok, 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. +-- SPDX-FileCopyrightText: Copyright 2024 The Minder Authors +-- SPDX-License-Identifier: Apache-2.0 BEGIN; diff --git a/database/migrations/000104_rm_one_entity_id_constraint.down.sql b/database/migrations/000104_rm_one_entity_id_constraint.down.sql index e4bef160bc..f0d0c68d12 100644 --- a/database/migrations/000104_rm_one_entity_id_constraint.down.sql +++ b/database/migrations/000104_rm_one_entity_id_constraint.down.sql @@ -1,18 +1,7 @@ --- Copyright 2024 Stacklok, 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. +-- SPDX-FileCopyrightText: Copyright 2024 The Minder Authors +-- SPDX-License-Identifier: Apache-2.0 BEGIN; -- recreate `one_entity_id` constraint -ALTER TABLE evaluation_rule_entities ADD CONSTRAINT one_entity_id CHECK (num_nonnulls(repository_id, artifact_id, pull_request_id) = 1); \ No newline at end of file +ALTER TABLE evaluation_rule_entities ADD CONSTRAINT one_entity_id CHECK (num_nonnulls(repository_id, artifact_id, pull_request_id) = 1); diff --git a/database/migrations/000104_rm_one_entity_id_constraint.up.sql b/database/migrations/000104_rm_one_entity_id_constraint.up.sql index 4214e3b44a..27f0970d8a 100644 --- a/database/migrations/000104_rm_one_entity_id_constraint.up.sql +++ b/database/migrations/000104_rm_one_entity_id_constraint.up.sql @@ -1,19 +1,8 @@ --- Copyright 2024 Stacklok, 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. +-- SPDX-FileCopyrightText: Copyright 2024 The Minder Authors +-- SPDX-License-Identifier: Apache-2.0 BEGIN; ALTER TABLE evaluation_rule_entities DROP CONSTRAINT one_entity_id; -COMMIT; \ No newline at end of file +COMMIT; diff --git a/database/migrations/000105_ruletype_evaluation_failure_message.down.sql b/database/migrations/000105_ruletype_evaluation_failure_message.down.sql index 95b9d5fc82..5319e182ac 100644 --- a/database/migrations/000105_ruletype_evaluation_failure_message.down.sql +++ b/database/migrations/000105_ruletype_evaluation_failure_message.down.sql @@ -1,15 +1,4 @@ --- Copyright 2024 Stacklok, 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. +-- SPDX-FileCopyrightText: Copyright 2024 The Minder Authors +-- SPDX-License-Identifier: Apache-2.0 -ALTER TABLE rule_type DROP COLUMN short_failure_message; \ No newline at end of file +ALTER TABLE rule_type DROP COLUMN short_failure_message; diff --git a/database/migrations/000105_ruletype_evaluation_failure_message.up.sql b/database/migrations/000105_ruletype_evaluation_failure_message.up.sql index d3966ce0ff..c403dccabe 100644 --- a/database/migrations/000105_ruletype_evaluation_failure_message.up.sql +++ b/database/migrations/000105_ruletype_evaluation_failure_message.up.sql @@ -1,17 +1,6 @@ --- Copyright 2024 Stacklok, 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. +-- SPDX-FileCopyrightText: Copyright 2024 The Minder Authors +-- SPDX-License-Identifier: Apache-2.0 -- Adds a `short_failure_message` column to the `rule_type` table. The failure message -- is displayed to the user when a rule evaluation fails. -ALTER TABLE rule_type ADD COLUMN short_failure_message TEXT NOT NULL DEFAULT ''; \ No newline at end of file +ALTER TABLE rule_type ADD COLUMN short_failure_message TEXT NOT NULL DEFAULT ''; diff --git a/database/migrations/000106_ancillary_evaluation_indexes.down.sql b/database/migrations/000106_ancillary_evaluation_indexes.down.sql index bf5136dd01..7b46c610e9 100644 --- a/database/migrations/000106_ancillary_evaluation_indexes.down.sql +++ b/database/migrations/000106_ancillary_evaluation_indexes.down.sql @@ -1,16 +1,5 @@ --- Copyright 2024 Stacklok, 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. +-- SPDX-FileCopyrightText: Copyright 2024 The Minder Authors +-- SPDX-License-Identifier: Apache-2.0 BEGIN; diff --git a/database/migrations/000106_ancillary_evaluation_indexes.up.sql b/database/migrations/000106_ancillary_evaluation_indexes.up.sql index 7fa9c6f153..d51447efe4 100644 --- a/database/migrations/000106_ancillary_evaluation_indexes.up.sql +++ b/database/migrations/000106_ancillary_evaluation_indexes.up.sql @@ -1,16 +1,5 @@ --- Copyright 2024 Stacklok, 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. +-- SPDX-FileCopyrightText: Copyright 2024 The Minder Authors +-- SPDX-License-Identifier: Apache-2.0 BEGIN; diff --git a/database/migrations/000107_entity_properties_timestamp_tz.down.sql b/database/migrations/000107_entity_properties_timestamp_tz.down.sql index ebb2850257..6e9561aa1a 100644 --- a/database/migrations/000107_entity_properties_timestamp_tz.down.sql +++ b/database/migrations/000107_entity_properties_timestamp_tz.down.sql @@ -1,16 +1,5 @@ --- Copyright 2024 Stacklok, 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. +-- SPDX-FileCopyrightText: Copyright 2024 The Minder Authors +-- SPDX-License-Identifier: Apache-2.0 BEGIN; @@ -25,4 +14,4 @@ ALTER TABLE entity_instances -- There are more TIMESTAMP columns, but these are affecting unit tests in some timezones. -COMMIT; \ No newline at end of file +COMMIT; diff --git a/database/migrations/000107_entity_properties_timestamp_tz.up.sql b/database/migrations/000107_entity_properties_timestamp_tz.up.sql index d46a5965a3..e5f042647b 100644 --- a/database/migrations/000107_entity_properties_timestamp_tz.up.sql +++ b/database/migrations/000107_entity_properties_timestamp_tz.up.sql @@ -1,16 +1,5 @@ --- Copyright 2024 Stacklok, 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. +-- SPDX-FileCopyrightText: Copyright 2024 The Minder Authors +-- SPDX-License-Identifier: Apache-2.0 BEGIN; @@ -29,4 +18,4 @@ ALTER TABLE entity_instances -- There are more TIMESTAMP columns, but these are affecting unit tests in some timezones. -COMMIT; \ No newline at end of file +COMMIT; diff --git a/database/mock/fixtures/store.go b/database/mock/fixtures/store.go index 088c90f638..89e4c0f8d1 100644 --- a/database/mock/fixtures/store.go +++ b/database/mock/fixtures/store.go @@ -1,16 +1,5 @@ -// Copyright 2024 Stacklok, Inc -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance cf.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. +// SPDX-FileCopyrightText: Copyright 2024 The Minder Authors +// SPDX-License-Identifier: Apache-2.0 // Package fixtures contains code for creating RepositoryService // fixtures and is used in various parts of the code. For testing use diff --git a/database/query/eval_history.sql b/database/query/eval_history.sql index 04407c0016..287f943111 100644 --- a/database/query/eval_history.sql +++ b/database/query/eval_history.sql @@ -1,16 +1,5 @@ --- Copyright 2024 Stacklok, 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. +-- SPDX-FileCopyrightText: Copyright 2024 The Minder Authors +-- SPDX-License-Identifier: Apache-2.0 -- name: GetLatestEvalStateForRuleEntity :one SELECT eh.* FROM evaluation_rule_entities AS re diff --git a/database/query/rule_instances.sql b/database/query/rule_instances.sql index 4c7d99b1bd..8c2a1d272c 100644 --- a/database/query/rule_instances.sql +++ b/database/query/rule_instances.sql @@ -1,16 +1,5 @@ --- Copyright 2024 Stacklok, 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. +-- SPDX-FileCopyrightText: Copyright 2024 The Minder Authors +-- SPDX-License-Identifier: Apache-2.0 -- name: UpsertRuleInstance :one INSERT INTO rule_instances ( diff --git a/database/query/subscriptions.sql b/database/query/subscriptions.sql index af7b9638ff..7f81c9cab0 100644 --- a/database/query/subscriptions.sql +++ b/database/query/subscriptions.sql @@ -1,16 +1,5 @@ --- Copyright 2024 Stacklok, 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. +-- SPDX-FileCopyrightText: Copyright 2024 The Minder Authors +-- SPDX-License-Identifier: Apache-2.0 -- Bundles -- diff --git a/database/schema/config/schemaspy.properties b/database/schema/config/schemaspy.properties index 61312ccf93..2cafd8fe86 100644 --- a/database/schema/config/schemaspy.properties +++ b/database/schema/config/schemaspy.properties @@ -1,17 +1,5 @@ -# -# Copyright 2023 Stacklok, 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. +# SPDX-FileCopyrightText: Copyright 2023 The Minder Authors +# SPDX-License-Identifier: Apache-2.0 # type of database. Run with -dbhelp for details schemaspy.t=pgsql @@ -21,4 +9,4 @@ schemaspy.db=postgres schemaspy.u=postgres schemaspy.p=postgres # db scheme for which generate diagrams -schemaspy.s=public \ No newline at end of file +schemaspy.s=public diff --git a/database/schema/docker-compose.yaml b/database/schema/docker-compose.yaml index 730795d513..1f6730f356 100644 --- a/database/schema/docker-compose.yaml +++ b/database/schema/docker-compose.yaml @@ -1,17 +1,5 @@ -# -# Copyright 2023 Stacklok, 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. +# SPDX-FileCopyrightText: Copyright 2023 The Minder Authors +# SPDX-License-Identifier: Apache-2.0 version: '3.2' services: diff --git a/deployment/helm/Chart.yaml b/deployment/helm/Chart.yaml index a59c8f9c94..5b3ae89ab8 100644 --- a/deployment/helm/Chart.yaml +++ b/deployment/helm/Chart.yaml @@ -1,16 +1,5 @@ -# Copyright 2023 Stacklok, 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. +# SPDX-FileCopyrightText: Copyright 2023 The Minder Authors +# SPDX-License-Identifier: Apache-2.0 apiVersion: v2 name: minder diff --git a/deployment/helm/templates/configmap.yaml b/deployment/helm/templates/configmap.yaml index 16b558991b..6e9c0b1145 100644 --- a/deployment/helm/templates/configmap.yaml +++ b/deployment/helm/templates/configmap.yaml @@ -1,16 +1,5 @@ -# Copyright 2023 Stacklok, 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. +# SPDX-FileCopyrightText: Copyright 2023 The Minder Authors +# SPDX-License-Identifier: Apache-2.0 apiVersion: v1 kind: ConfigMap diff --git a/deployment/helm/templates/deployment.yaml b/deployment/helm/templates/deployment.yaml index f3738d0988..b13d38d5d9 100644 --- a/deployment/helm/templates/deployment.yaml +++ b/deployment/helm/templates/deployment.yaml @@ -1,16 +1,5 @@ -# Copyright 2023 Stacklok, 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. +# SPDX-FileCopyrightText: Copyright 2023 The Minder Authors +# SPDX-License-Identifier: Apache-2.0 apiVersion: apps/v1 kind: Deployment diff --git a/deployment/helm/templates/hpa.yaml b/deployment/helm/templates/hpa.yaml index 6ac5762525..434c718fa8 100644 --- a/deployment/helm/templates/hpa.yaml +++ b/deployment/helm/templates/hpa.yaml @@ -1,16 +1,5 @@ -# Copyright 2023 Stacklok, 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. +# SPDX-FileCopyrightText: Copyright 2023 The Minder Authors +# SPDX-License-Identifier: Apache-2.0 apiVersion: autoscaling/v2 kind: HorizontalPodAutoscaler diff --git a/deployment/helm/templates/ingress.yaml b/deployment/helm/templates/ingress.yaml index d4d90bc2c8..eaecd86deb 100644 --- a/deployment/helm/templates/ingress.yaml +++ b/deployment/helm/templates/ingress.yaml @@ -1,16 +1,5 @@ -# Copyright 2023 Stacklok, 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. +# SPDX-FileCopyrightText: Copyright 2023 The Minder Authors +# SPDX-License-Identifier: Apache-2.0 apiVersion: networking.k8s.io/v1 kind: Ingress diff --git a/deployment/helm/templates/job.yaml b/deployment/helm/templates/job.yaml index 35ee527994..ab419239e8 100644 --- a/deployment/helm/templates/job.yaml +++ b/deployment/helm/templates/job.yaml @@ -1,16 +1,5 @@ -# Copyright 2023 Stacklok, 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. +# SPDX-FileCopyrightText: Copyright 2023 The Minder Authors +# SPDX-License-Identifier: Apache-2.0 # We need a separate service account for the db-update job, because # it runs as a helm pre-install hook, and the minder service account diff --git a/deployment/helm/templates/rotate_provider_tokens.yaml b/deployment/helm/templates/rotate_provider_tokens.yaml index 6d3e921005..104c9bdc9f 100644 --- a/deployment/helm/templates/rotate_provider_tokens.yaml +++ b/deployment/helm/templates/rotate_provider_tokens.yaml @@ -1,16 +1,5 @@ -# Copyright 2024 Stacklok, 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. +# SPDX-FileCopyrightText: Copyright 2024 The Minder Authors +# SPDX-License-Identifier: Apache-2.0 # Note that this assumes read/write permissions to the provider_access_tokens database # table. diff --git a/deployment/helm/templates/service.yaml b/deployment/helm/templates/service.yaml index 0e8e4c2124..baa5371eb1 100644 --- a/deployment/helm/templates/service.yaml +++ b/deployment/helm/templates/service.yaml @@ -1,16 +1,5 @@ -# Copyright 2023 Stacklok, 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. +# SPDX-FileCopyrightText: Copyright 2023 The Minder Authors +# SPDX-License-Identifier: Apache-2.0 apiVersion: v1 kind: Service diff --git a/deployment/helm/templates/serviceaccount.yaml b/deployment/helm/templates/serviceaccount.yaml index 003c6c1e4a..01b0a88897 100644 --- a/deployment/helm/templates/serviceaccount.yaml +++ b/deployment/helm/templates/serviceaccount.yaml @@ -1,16 +1,5 @@ -# Copyright 2023 Stacklok, 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. +# SPDX-FileCopyrightText: Copyright 2023 The Minder Authors +# SPDX-License-Identifier: Apache-2.0 {{ if eq .Values.serviceAccounts.server "" }} apiVersion: v1 @@ -23,4 +12,4 @@ metadata: eks.amazonaws.com/role-arn: "arn:aws:iam::{{ .Values.aws.accountID }}:role/{{ .Values.aws.server.iamRole }}" imagePullSecrets: - name: minder-pull-secret -{{ end }} \ No newline at end of file +{{ end }} diff --git a/deployment/helm/templates/session_expiration_purge_job.yaml b/deployment/helm/templates/session_expiration_purge_job.yaml index 5c5f02f175..beac1b9e14 100644 --- a/deployment/helm/templates/session_expiration_purge_job.yaml +++ b/deployment/helm/templates/session_expiration_purge_job.yaml @@ -1,16 +1,5 @@ -# Copyright 2024 Stacklok, 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. +# SPDX-FileCopyrightText: Copyright 2024 The Minder Authors +# SPDX-License-Identifier: Apache-2.0 # Note that this assumes read/write permissions to the session_store database # table. diff --git a/deployment/helm/templates/tests/test-connection.yaml b/deployment/helm/templates/tests/test-connection.yaml index f03cd77e57..cf557b569a 100644 --- a/deployment/helm/templates/tests/test-connection.yaml +++ b/deployment/helm/templates/tests/test-connection.yaml @@ -1,16 +1,5 @@ -# Copyright 2023 Stacklok, 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. +# SPDX-FileCopyrightText: Copyright 2023 The Minder Authors +# SPDX-License-Identifier: Apache-2.0 {{/* Test that the deployment completed successfully. @@ -33,4 +22,4 @@ spec: command: ['wget'] args: ['{{ include "minder.fullname" . }}:{{ .Values.service.port }}'] restartPolicy: Never -*/}} \ No newline at end of file +*/}} diff --git a/deployment/helm/values.yaml b/deployment/helm/values.yaml index a6544ad036..6cd6e38a04 100644 --- a/deployment/helm/values.yaml +++ b/deployment/helm/values.yaml @@ -1,16 +1,5 @@ -# Copyright 2023 Stacklok, 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. +# SPDX-FileCopyrightText: Copyright 2023 The Minder Authors +# SPDX-License-Identifier: Apache-2.0 # Default values for minder. diff --git a/deployment/k8s-dev-setup/postgres.yaml b/deployment/k8s-dev-setup/postgres.yaml index 10818f72ad..78e213caf5 100644 --- a/deployment/k8s-dev-setup/postgres.yaml +++ b/deployment/k8s-dev-setup/postgres.yaml @@ -1,16 +1,5 @@ -# Copyright 2023 Stacklok, 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. +# SPDX-FileCopyrightText: Copyright 2023 The Minder Authors +# SPDX-License-Identifier: Apache-2.0 # This is a set of manifests to create an INSECURE postgresql instance for use # during Minder development. For production use, you should use a managed @@ -112,4 +101,4 @@ metadata: type: Opaque data: # 'p6ssw0rd' from config/server-config.yaml.example - password: cDZzc3cwcmQ= \ No newline at end of file + password: cDZzc3cwcmQ= diff --git a/docker-compose.yaml b/docker-compose.yaml index 0d10dcf049..cb51afa398 100644 --- a/docker-compose.yaml +++ b/docker-compose.yaml @@ -1,17 +1,5 @@ -# -# Copyright 2023 Stacklok, 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. +# SPDX-FileCopyrightText: Copyright 2023 The Minder Authors +# SPDX-License-Identifier: Apache-2.0 services: minder: diff --git a/docker/minder/Dockerfile b/docker/minder/Dockerfile index 38e21e0efe..76f5296cfd 100644 --- a/docker/minder/Dockerfile +++ b/docker/minder/Dockerfile @@ -1,17 +1,5 @@ -# -# Copyright 2023 Stacklok, 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. +# SPDX-FileCopyrightText: Copyright 2023 The Minder Authors +# SPDX-License-Identifier: Apache-2.0 FROM index.docker.io/library/golang@sha256:4a3c2bcd243d3dbb7b15237eecb0792db3614900037998c2cd6a579c46888c1e AS builder ENV APP_ROOT=/opt/app-root diff --git a/docker/reminder/Dockerfile b/docker/reminder/Dockerfile index 690a0f5ed4..7ad1efc8cf 100644 --- a/docker/reminder/Dockerfile +++ b/docker/reminder/Dockerfile @@ -1,17 +1,5 @@ -# -# Copyright 2024 Stacklok, 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. +# SPDX-FileCopyrightText: Copyright 2024 The Minder Authors +# SPDX-License-Identifier: Apache-2.0 FROM index.docker.io/library/golang@sha256:4a3c2bcd243d3dbb7b15237eecb0792db3614900037998c2cd6a579c46888c1e AS builder ENV APP_ROOT=/opt/app-root diff --git a/docs/docs/getting_started/install_cli.md b/docs/docs/getting_started/install_cli.md index 98f3ef7669..92c0a55594 100644 --- a/docs/docs/getting_started/install_cli.md +++ b/docs/docs/getting_started/install_cli.md @@ -16,7 +16,7 @@ You can install `minder` using one of the following methods: The easiest way to install `minder` for macOS systems is through [Homebrew](https://brew.sh/): ```bash -brew install stacklok/tap/minder +brew install minder ``` Alternatively, you can [download a `.tar.gz` release](https://github.com/mindersec/minder/releases) and unpack it with the following: diff --git a/docs/docs/ref/cli/minder.md b/docs/docs/ref/cli/minder.md index d74410d38e..1a0695dfdb 100644 --- a/docs/docs/ref/cli/minder.md +++ b/docs/docs/ref/cli/minder.md @@ -20,6 +20,7 @@ https://docs.stacklok.com/minder -h, --help help for minder --identity-client string Identity server client ID (default "minder-cli") --identity-url string Identity server issuer URL (default "https://auth.stacklok.com") + -v, --verbose Output additional messages to STDERR ``` ### SEE ALSO diff --git a/docs/docs/ref/cli/minder_artifact.md b/docs/docs/ref/cli/minder_artifact.md index 1dfa7b9694..acfbd6b7f4 100644 --- a/docs/docs/ref/cli/minder_artifact.md +++ b/docs/docs/ref/cli/minder_artifact.md @@ -30,6 +30,7 @@ minder artifact [flags] --grpc-port int Server port (default 443) --identity-client string Identity server client ID (default "minder-cli") --identity-url string Identity server issuer URL (default "https://auth.stacklok.com") + -v, --verbose Output additional messages to STDERR ``` ### SEE ALSO diff --git a/docs/docs/ref/cli/minder_artifact_get.md b/docs/docs/ref/cli/minder_artifact_get.md index 1958b69671..f787a8ff83 100644 --- a/docs/docs/ref/cli/minder_artifact_get.md +++ b/docs/docs/ref/cli/minder_artifact_get.md @@ -33,6 +33,7 @@ minder artifact get [flags] --identity-url string Identity server issuer URL (default "https://auth.stacklok.com") -j, --project string ID of the project -p, --provider string Name of the provider, i.e. github + -v, --verbose Output additional messages to STDERR ``` ### SEE ALSO diff --git a/docs/docs/ref/cli/minder_artifact_list.md b/docs/docs/ref/cli/minder_artifact_list.md index 80759f2f6c..d9325c37e3 100644 --- a/docs/docs/ref/cli/minder_artifact_list.md +++ b/docs/docs/ref/cli/minder_artifact_list.md @@ -32,6 +32,7 @@ minder artifact list [flags] --identity-url string Identity server issuer URL (default "https://auth.stacklok.com") -j, --project string ID of the project -p, --provider string Name of the provider, i.e. github + -v, --verbose Output additional messages to STDERR ``` ### SEE ALSO diff --git a/docs/docs/ref/cli/minder_auth.md b/docs/docs/ref/cli/minder_auth.md index e1b2141f8a..84c665937c 100644 --- a/docs/docs/ref/cli/minder_auth.md +++ b/docs/docs/ref/cli/minder_auth.md @@ -29,6 +29,7 @@ minder auth [flags] --grpc-port int Server port (default 443) --identity-client string Identity server client ID (default "minder-cli") --identity-url string Identity server issuer URL (default "https://auth.stacklok.com") + -v, --verbose Output additional messages to STDERR ``` ### SEE ALSO diff --git a/docs/docs/ref/cli/minder_auth_delete.md b/docs/docs/ref/cli/minder_auth_delete.md index 355904b497..7db8575cf3 100644 --- a/docs/docs/ref/cli/minder_auth_delete.md +++ b/docs/docs/ref/cli/minder_auth_delete.md @@ -29,6 +29,7 @@ minder auth delete [flags] --grpc-port int Server port (default 443) --identity-client string Identity server client ID (default "minder-cli") --identity-url string Identity server issuer URL (default "https://auth.stacklok.com") + -v, --verbose Output additional messages to STDERR ``` ### SEE ALSO diff --git a/docs/docs/ref/cli/minder_auth_invite.md b/docs/docs/ref/cli/minder_auth_invite.md index 066a1a7259..cb27fb3cab 100644 --- a/docs/docs/ref/cli/minder_auth_invite.md +++ b/docs/docs/ref/cli/minder_auth_invite.md @@ -28,6 +28,7 @@ minder auth invite [flags] --grpc-port int Server port (default 443) --identity-client string Identity server client ID (default "minder-cli") --identity-url string Identity server issuer URL (default "https://auth.stacklok.com") + -v, --verbose Output additional messages to STDERR ``` ### SEE ALSO diff --git a/docs/docs/ref/cli/minder_auth_invite_accept.md b/docs/docs/ref/cli/minder_auth_invite_accept.md index fee94c9be6..330300eaa5 100644 --- a/docs/docs/ref/cli/minder_auth_invite_accept.md +++ b/docs/docs/ref/cli/minder_auth_invite_accept.md @@ -28,6 +28,7 @@ minder auth invite accept [flags] --grpc-port int Server port (default 443) --identity-client string Identity server client ID (default "minder-cli") --identity-url string Identity server issuer URL (default "https://auth.stacklok.com") + -v, --verbose Output additional messages to STDERR ``` ### SEE ALSO diff --git a/docs/docs/ref/cli/minder_auth_invite_decline.md b/docs/docs/ref/cli/minder_auth_invite_decline.md index 3c7234bc2d..7e519f5523 100644 --- a/docs/docs/ref/cli/minder_auth_invite_decline.md +++ b/docs/docs/ref/cli/minder_auth_invite_decline.md @@ -28,6 +28,7 @@ minder auth invite decline [flags] --grpc-port int Server port (default 443) --identity-client string Identity server client ID (default "minder-cli") --identity-url string Identity server issuer URL (default "https://auth.stacklok.com") + -v, --verbose Output additional messages to STDERR ``` ### SEE ALSO diff --git a/docs/docs/ref/cli/minder_auth_invite_get.md b/docs/docs/ref/cli/minder_auth_invite_get.md index 6633356b81..dc5603617d 100644 --- a/docs/docs/ref/cli/minder_auth_invite_get.md +++ b/docs/docs/ref/cli/minder_auth_invite_get.md @@ -29,6 +29,7 @@ minder auth invite get [flags] --grpc-port int Server port (default 443) --identity-client string Identity server client ID (default "minder-cli") --identity-url string Identity server issuer URL (default "https://auth.stacklok.com") + -v, --verbose Output additional messages to STDERR ``` ### SEE ALSO diff --git a/docs/docs/ref/cli/minder_auth_invite_list.md b/docs/docs/ref/cli/minder_auth_invite_list.md index d09bbf8819..9af94f37ca 100644 --- a/docs/docs/ref/cli/minder_auth_invite_list.md +++ b/docs/docs/ref/cli/minder_auth_invite_list.md @@ -29,6 +29,7 @@ minder auth invite list [flags] --grpc-port int Server port (default 443) --identity-client string Identity server client ID (default "minder-cli") --identity-url string Identity server issuer URL (default "https://auth.stacklok.com") + -v, --verbose Output additional messages to STDERR ``` ### SEE ALSO diff --git a/docs/docs/ref/cli/minder_auth_login.md b/docs/docs/ref/cli/minder_auth_login.md index ed03c979b2..e45856cd1a 100644 --- a/docs/docs/ref/cli/minder_auth_login.md +++ b/docs/docs/ref/cli/minder_auth_login.md @@ -30,6 +30,7 @@ minder auth login [flags] --grpc-port int Server port (default 443) --identity-client string Identity server client ID (default "minder-cli") --identity-url string Identity server issuer URL (default "https://auth.stacklok.com") + -v, --verbose Output additional messages to STDERR ``` ### SEE ALSO diff --git a/docs/docs/ref/cli/minder_auth_logout.md b/docs/docs/ref/cli/minder_auth_logout.md index 3c53e9754a..91d4d4cd9b 100644 --- a/docs/docs/ref/cli/minder_auth_logout.md +++ b/docs/docs/ref/cli/minder_auth_logout.md @@ -28,6 +28,7 @@ minder auth logout [flags] --grpc-port int Server port (default 443) --identity-client string Identity server client ID (default "minder-cli") --identity-url string Identity server issuer URL (default "https://auth.stacklok.com") + -v, --verbose Output additional messages to STDERR ``` ### SEE ALSO diff --git a/docs/docs/ref/cli/minder_auth_offline-token.md b/docs/docs/ref/cli/minder_auth_offline-token.md index 0f0c9167da..c2ff7c4b9f 100644 --- a/docs/docs/ref/cli/minder_auth_offline-token.md +++ b/docs/docs/ref/cli/minder_auth_offline-token.md @@ -33,6 +33,7 @@ minder auth offline-token [flags] --grpc-port int Server port (default 443) --identity-client string Identity server client ID (default "minder-cli") --identity-url string Identity server issuer URL (default "https://auth.stacklok.com") + -v, --verbose Output additional messages to STDERR ``` ### SEE ALSO diff --git a/docs/docs/ref/cli/minder_auth_offline-token_get.md b/docs/docs/ref/cli/minder_auth_offline-token_get.md index 51d2a34bde..81b852242a 100644 --- a/docs/docs/ref/cli/minder_auth_offline-token_get.md +++ b/docs/docs/ref/cli/minder_auth_offline-token_get.md @@ -35,6 +35,7 @@ minder auth offline-token get [flags] --grpc-port int Server port (default 443) --identity-client string Identity server client ID (default "minder-cli") --identity-url string Identity server issuer URL (default "https://auth.stacklok.com") + -v, --verbose Output additional messages to STDERR ``` ### SEE ALSO diff --git a/docs/docs/ref/cli/minder_auth_offline-token_revoke.md b/docs/docs/ref/cli/minder_auth_offline-token_revoke.md index 302bd5874e..51440f9bc6 100644 --- a/docs/docs/ref/cli/minder_auth_offline-token_revoke.md +++ b/docs/docs/ref/cli/minder_auth_offline-token_revoke.md @@ -35,6 +35,7 @@ minder auth offline-token revoke [flags] --grpc-port int Server port (default 443) --identity-client string Identity server client ID (default "minder-cli") --identity-url string Identity server issuer URL (default "https://auth.stacklok.com") + -v, --verbose Output additional messages to STDERR ``` ### SEE ALSO diff --git a/docs/docs/ref/cli/minder_auth_offline-token_use.md b/docs/docs/ref/cli/minder_auth_offline-token_use.md index bd02afaca8..61b3b7463c 100644 --- a/docs/docs/ref/cli/minder_auth_offline-token_use.md +++ b/docs/docs/ref/cli/minder_auth_offline-token_use.md @@ -35,6 +35,7 @@ minder auth offline-token use [flags] --grpc-port int Server port (default 443) --identity-client string Identity server client ID (default "minder-cli") --identity-url string Identity server issuer URL (default "https://auth.stacklok.com") + -v, --verbose Output additional messages to STDERR ``` ### SEE ALSO diff --git a/docs/docs/ref/cli/minder_auth_token.md b/docs/docs/ref/cli/minder_auth_token.md index 1e1208e2d5..a39af498b2 100644 --- a/docs/docs/ref/cli/minder_auth_token.md +++ b/docs/docs/ref/cli/minder_auth_token.md @@ -30,6 +30,7 @@ minder auth token [flags] --grpc-port int Server port (default 443) --identity-client string Identity server client ID (default "minder-cli") --identity-url string Identity server issuer URL (default "https://auth.stacklok.com") + -v, --verbose Output additional messages to STDERR ``` ### SEE ALSO diff --git a/docs/docs/ref/cli/minder_auth_whoami.md b/docs/docs/ref/cli/minder_auth_whoami.md index 230dbb2d1f..822d542e36 100644 --- a/docs/docs/ref/cli/minder_auth_whoami.md +++ b/docs/docs/ref/cli/minder_auth_whoami.md @@ -29,6 +29,7 @@ minder auth whoami [flags] --grpc-port int Server port (default 443) --identity-client string Identity server client ID (default "minder-cli") --identity-url string Identity server issuer URL (default "https://auth.stacklok.com") + -v, --verbose Output additional messages to STDERR ``` ### SEE ALSO diff --git a/docs/docs/ref/cli/minder_completion.md b/docs/docs/ref/cli/minder_completion.md index 64c595dceb..7396fed16b 100644 --- a/docs/docs/ref/cli/minder_completion.md +++ b/docs/docs/ref/cli/minder_completion.md @@ -26,6 +26,7 @@ See each sub-command's help for details on how to use the generated script. --grpc-port int Server port (default 443) --identity-client string Identity server client ID (default "minder-cli") --identity-url string Identity server issuer URL (default "https://auth.stacklok.com") + -v, --verbose Output additional messages to STDERR ``` ### SEE ALSO diff --git a/docs/docs/ref/cli/minder_completion_bash.md b/docs/docs/ref/cli/minder_completion_bash.md index 37299b624f..c4dd93ee08 100644 --- a/docs/docs/ref/cli/minder_completion_bash.md +++ b/docs/docs/ref/cli/minder_completion_bash.md @@ -55,6 +55,7 @@ minder completion bash --grpc-port int Server port (default 443) --identity-client string Identity server client ID (default "minder-cli") --identity-url string Identity server issuer URL (default "https://auth.stacklok.com") + -v, --verbose Output additional messages to STDERR ``` ### SEE ALSO diff --git a/docs/docs/ref/cli/minder_completion_fish.md b/docs/docs/ref/cli/minder_completion_fish.md index 6618a5a402..da875352a2 100644 --- a/docs/docs/ref/cli/minder_completion_fish.md +++ b/docs/docs/ref/cli/minder_completion_fish.md @@ -40,6 +40,7 @@ minder completion fish [flags] --grpc-port int Server port (default 443) --identity-client string Identity server client ID (default "minder-cli") --identity-url string Identity server issuer URL (default "https://auth.stacklok.com") + -v, --verbose Output additional messages to STDERR ``` ### SEE ALSO diff --git a/docs/docs/ref/cli/minder_completion_powershell.md b/docs/docs/ref/cli/minder_completion_powershell.md index a46176627e..f510be7aae 100644 --- a/docs/docs/ref/cli/minder_completion_powershell.md +++ b/docs/docs/ref/cli/minder_completion_powershell.md @@ -37,6 +37,7 @@ minder completion powershell [flags] --grpc-port int Server port (default 443) --identity-client string Identity server client ID (default "minder-cli") --identity-url string Identity server issuer URL (default "https://auth.stacklok.com") + -v, --verbose Output additional messages to STDERR ``` ### SEE ALSO diff --git a/docs/docs/ref/cli/minder_completion_zsh.md b/docs/docs/ref/cli/minder_completion_zsh.md index 4ac9140660..8cf78d92a1 100644 --- a/docs/docs/ref/cli/minder_completion_zsh.md +++ b/docs/docs/ref/cli/minder_completion_zsh.md @@ -59,6 +59,7 @@ minder completion zsh [flags] --grpc-port int Server port (default 443) --identity-client string Identity server client ID (default "minder-cli") --identity-url string Identity server issuer URL (default "https://auth.stacklok.com") + -v, --verbose Output additional messages to STDERR ``` ### SEE ALSO diff --git a/docs/docs/ref/cli/minder_config.md b/docs/docs/ref/cli/minder_config.md index bed6f84a10..4f774b8676 100644 --- a/docs/docs/ref/cli/minder_config.md +++ b/docs/docs/ref/cli/minder_config.md @@ -36,6 +36,7 @@ By default, we look for the file as $PWD/config.yaml and $XDG_CONFIG_PATH/minder --grpc-port int Server port (default 443) --identity-client string Identity server client ID (default "minder-cli") --identity-url string Identity server issuer URL (default "https://auth.stacklok.com") + -v, --verbose Output additional messages to STDERR ``` ### SEE ALSO diff --git a/docs/docs/ref/cli/minder_docs.md b/docs/docs/ref/cli/minder_docs.md index 1b9408b694..6a1f8b6c25 100644 --- a/docs/docs/ref/cli/minder_docs.md +++ b/docs/docs/ref/cli/minder_docs.md @@ -28,6 +28,7 @@ minder docs [flags] --grpc-port int Server port (default 443) --identity-client string Identity server client ID (default "minder-cli") --identity-url string Identity server issuer URL (default "https://auth.stacklok.com") + -v, --verbose Output additional messages to STDERR ``` ### SEE ALSO diff --git a/docs/docs/ref/cli/minder_history.md b/docs/docs/ref/cli/minder_history.md index 826c6a18f8..c18a5ea1b2 100644 --- a/docs/docs/ref/cli/minder_history.md +++ b/docs/docs/ref/cli/minder_history.md @@ -30,6 +30,7 @@ minder history [flags] --grpc-port int Server port (default 443) --identity-client string Identity server client ID (default "minder-cli") --identity-url string Identity server issuer URL (default "https://auth.stacklok.com") + -v, --verbose Output additional messages to STDERR ``` ### SEE ALSO diff --git a/docs/docs/ref/cli/minder_history_list.md b/docs/docs/ref/cli/minder_history_list.md index 83b7657d7b..28e3f14958 100644 --- a/docs/docs/ref/cli/minder_history_list.md +++ b/docs/docs/ref/cli/minder_history_list.md @@ -40,6 +40,7 @@ minder history list [flags] --identity-url string Identity server issuer URL (default "https://auth.stacklok.com") -o, --output string Output format (one of json,yaml,table) (default "table") -j, --project string ID of the project + -v, --verbose Output additional messages to STDERR ``` ### SEE ALSO diff --git a/docs/docs/ref/cli/minder_profile.md b/docs/docs/ref/cli/minder_profile.md index d6f481a6ae..bff339867b 100644 --- a/docs/docs/ref/cli/minder_profile.md +++ b/docs/docs/ref/cli/minder_profile.md @@ -29,6 +29,7 @@ minder profile [flags] --grpc-port int Server port (default 443) --identity-client string Identity server client ID (default "minder-cli") --identity-url string Identity server issuer URL (default "https://auth.stacklok.com") + -v, --verbose Output additional messages to STDERR ``` ### SEE ALSO diff --git a/docs/docs/ref/cli/minder_profile_apply.md b/docs/docs/ref/cli/minder_profile_apply.md index 5d32425137..9ad468c04a 100644 --- a/docs/docs/ref/cli/minder_profile_apply.md +++ b/docs/docs/ref/cli/minder_profile_apply.md @@ -30,6 +30,7 @@ minder profile apply [flags] --identity-client string Identity server client ID (default "minder-cli") --identity-url string Identity server issuer URL (default "https://auth.stacklok.com") -j, --project string ID of the project + -v, --verbose Output additional messages to STDERR ``` ### SEE ALSO diff --git a/docs/docs/ref/cli/minder_profile_create.md b/docs/docs/ref/cli/minder_profile_create.md index 3d2a209b4a..87ba827588 100644 --- a/docs/docs/ref/cli/minder_profile_create.md +++ b/docs/docs/ref/cli/minder_profile_create.md @@ -32,6 +32,7 @@ minder profile create [flags] --identity-client string Identity server client ID (default "minder-cli") --identity-url string Identity server issuer URL (default "https://auth.stacklok.com") -j, --project string ID of the project + -v, --verbose Output additional messages to STDERR ``` ### SEE ALSO diff --git a/docs/docs/ref/cli/minder_profile_delete.md b/docs/docs/ref/cli/minder_profile_delete.md index d8ef3b122b..b45ca02d25 100644 --- a/docs/docs/ref/cli/minder_profile_delete.md +++ b/docs/docs/ref/cli/minder_profile_delete.md @@ -30,6 +30,7 @@ minder profile delete [flags] --identity-client string Identity server client ID (default "minder-cli") --identity-url string Identity server issuer URL (default "https://auth.stacklok.com") -j, --project string ID of the project + -v, --verbose Output additional messages to STDERR ``` ### SEE ALSO diff --git a/docs/docs/ref/cli/minder_profile_get.md b/docs/docs/ref/cli/minder_profile_get.md index fb2a9fd167..240adfda90 100644 --- a/docs/docs/ref/cli/minder_profile_get.md +++ b/docs/docs/ref/cli/minder_profile_get.md @@ -32,6 +32,7 @@ minder profile get [flags] --identity-client string Identity server client ID (default "minder-cli") --identity-url string Identity server issuer URL (default "https://auth.stacklok.com") -j, --project string ID of the project + -v, --verbose Output additional messages to STDERR ``` ### SEE ALSO diff --git a/docs/docs/ref/cli/minder_profile_list.md b/docs/docs/ref/cli/minder_profile_list.md index 25b6800ab6..2e4d65eec0 100644 --- a/docs/docs/ref/cli/minder_profile_list.md +++ b/docs/docs/ref/cli/minder_profile_list.md @@ -30,6 +30,7 @@ minder profile list [flags] --identity-client string Identity server client ID (default "minder-cli") --identity-url string Identity server issuer URL (default "https://auth.stacklok.com") -j, --project string ID of the project + -v, --verbose Output additional messages to STDERR ``` ### SEE ALSO diff --git a/docs/docs/ref/cli/minder_profile_status.md b/docs/docs/ref/cli/minder_profile_status.md index 94918074a5..fdaa143d7e 100644 --- a/docs/docs/ref/cli/minder_profile_status.md +++ b/docs/docs/ref/cli/minder_profile_status.md @@ -31,6 +31,7 @@ minder profile status [flags] --identity-client string Identity server client ID (default "minder-cli") --identity-url string Identity server issuer URL (default "https://auth.stacklok.com") -j, --project string ID of the project + -v, --verbose Output additional messages to STDERR ``` ### SEE ALSO diff --git a/docs/docs/ref/cli/minder_profile_status_get.md b/docs/docs/ref/cli/minder_profile_status_get.md index 18d3cb3f2b..a04dcea0d7 100644 --- a/docs/docs/ref/cli/minder_profile_status_get.md +++ b/docs/docs/ref/cli/minder_profile_status_get.md @@ -33,6 +33,7 @@ minder profile status get [flags] -n, --name string Profile name to get profile status for -o, --output string Output format (one of json,yaml,table) (default "table") -j, --project string ID of the project + -v, --verbose Output additional messages to STDERR ``` ### SEE ALSO diff --git a/docs/docs/ref/cli/minder_profile_status_list.md b/docs/docs/ref/cli/minder_profile_status_list.md index 4b32d0b607..e46c82caf0 100644 --- a/docs/docs/ref/cli/minder_profile_status_list.md +++ b/docs/docs/ref/cli/minder_profile_status_list.md @@ -34,6 +34,7 @@ minder profile status list [flags] -n, --name string Profile name to get profile status for -o, --output string Output format (one of json,yaml,table) (default "table") -j, --project string ID of the project + -v, --verbose Output additional messages to STDERR ``` ### SEE ALSO diff --git a/docs/docs/ref/cli/minder_project.md b/docs/docs/ref/cli/minder_project.md index 1c732b0f64..4fdcecd3fc 100644 --- a/docs/docs/ref/cli/minder_project.md +++ b/docs/docs/ref/cli/minder_project.md @@ -28,6 +28,7 @@ minder project [flags] --grpc-port int Server port (default 443) --identity-client string Identity server client ID (default "minder-cli") --identity-url string Identity server issuer URL (default "https://auth.stacklok.com") + -v, --verbose Output additional messages to STDERR ``` ### SEE ALSO diff --git a/docs/docs/ref/cli/minder_project_create.md b/docs/docs/ref/cli/minder_project_create.md index 218ab94ae1..c8444bdc53 100644 --- a/docs/docs/ref/cli/minder_project_create.md +++ b/docs/docs/ref/cli/minder_project_create.md @@ -31,6 +31,7 @@ minder project create [flags] --grpc-port int Server port (default 443) --identity-client string Identity server client ID (default "minder-cli") --identity-url string Identity server issuer URL (default "https://auth.stacklok.com") + -v, --verbose Output additional messages to STDERR ``` ### SEE ALSO diff --git a/docs/docs/ref/cli/minder_project_delete.md b/docs/docs/ref/cli/minder_project_delete.md index 2ec0ea02aa..1b851cdcca 100644 --- a/docs/docs/ref/cli/minder_project_delete.md +++ b/docs/docs/ref/cli/minder_project_delete.md @@ -29,6 +29,7 @@ minder project delete [flags] --grpc-port int Server port (default 443) --identity-client string Identity server client ID (default "minder-cli") --identity-url string Identity server issuer URL (default "https://auth.stacklok.com") + -v, --verbose Output additional messages to STDERR ``` ### SEE ALSO diff --git a/docs/docs/ref/cli/minder_project_list.md b/docs/docs/ref/cli/minder_project_list.md index b35e1994f7..c4189706df 100644 --- a/docs/docs/ref/cli/minder_project_list.md +++ b/docs/docs/ref/cli/minder_project_list.md @@ -29,6 +29,7 @@ minder project list [flags] --grpc-port int Server port (default 443) --identity-client string Identity server client ID (default "minder-cli") --identity-url string Identity server issuer URL (default "https://auth.stacklok.com") + -v, --verbose Output additional messages to STDERR ``` ### SEE ALSO diff --git a/docs/docs/ref/cli/minder_project_role.md b/docs/docs/ref/cli/minder_project_role.md index 823b2b69c1..6def541bab 100644 --- a/docs/docs/ref/cli/minder_project_role.md +++ b/docs/docs/ref/cli/minder_project_role.md @@ -29,6 +29,7 @@ minder project role [flags] --grpc-port int Server port (default 443) --identity-client string Identity server client ID (default "minder-cli") --identity-url string Identity server issuer URL (default "https://auth.stacklok.com") + -v, --verbose Output additional messages to STDERR ``` ### SEE ALSO diff --git a/docs/docs/ref/cli/minder_project_role_deny.md b/docs/docs/ref/cli/minder_project_role_deny.md index ef3dcbaffc..8a612f55cb 100644 --- a/docs/docs/ref/cli/minder_project_role_deny.md +++ b/docs/docs/ref/cli/minder_project_role_deny.md @@ -33,6 +33,7 @@ minder project role deny [flags] --identity-client string Identity server client ID (default "minder-cli") --identity-url string Identity server issuer URL (default "https://auth.stacklok.com") -j, --project string ID of the project + -v, --verbose Output additional messages to STDERR ``` ### SEE ALSO diff --git a/docs/docs/ref/cli/minder_project_role_grant.md b/docs/docs/ref/cli/minder_project_role_grant.md index f4304eff9f..f4d83c1b36 100644 --- a/docs/docs/ref/cli/minder_project_role_grant.md +++ b/docs/docs/ref/cli/minder_project_role_grant.md @@ -34,6 +34,7 @@ minder project role grant [flags] --identity-client string Identity server client ID (default "minder-cli") --identity-url string Identity server issuer URL (default "https://auth.stacklok.com") -j, --project string ID of the project + -v, --verbose Output additional messages to STDERR ``` ### SEE ALSO diff --git a/docs/docs/ref/cli/minder_project_role_grant_list.md b/docs/docs/ref/cli/minder_project_role_grant_list.md index da4fe3ad87..860689f6c8 100644 --- a/docs/docs/ref/cli/minder_project_role_grant_list.md +++ b/docs/docs/ref/cli/minder_project_role_grant_list.md @@ -31,6 +31,7 @@ minder project role grant list [flags] --identity-client string Identity server client ID (default "minder-cli") --identity-url string Identity server issuer URL (default "https://auth.stacklok.com") -j, --project string ID of the project + -v, --verbose Output additional messages to STDERR ``` ### SEE ALSO diff --git a/docs/docs/ref/cli/minder_project_role_list.md b/docs/docs/ref/cli/minder_project_role_list.md index 9d01b0730f..4446d0903e 100644 --- a/docs/docs/ref/cli/minder_project_role_list.md +++ b/docs/docs/ref/cli/minder_project_role_list.md @@ -31,6 +31,7 @@ minder project role list [flags] --identity-client string Identity server client ID (default "minder-cli") --identity-url string Identity server issuer URL (default "https://auth.stacklok.com") -j, --project string ID of the project + -v, --verbose Output additional messages to STDERR ``` ### SEE ALSO diff --git a/docs/docs/ref/cli/minder_project_role_update.md b/docs/docs/ref/cli/minder_project_role_update.md index 82ccd93aa1..fe78db9213 100644 --- a/docs/docs/ref/cli/minder_project_role_update.md +++ b/docs/docs/ref/cli/minder_project_role_update.md @@ -34,6 +34,7 @@ minder project role update [flags] --identity-client string Identity server client ID (default "minder-cli") --identity-url string Identity server issuer URL (default "https://auth.stacklok.com") -j, --project string ID of the project + -v, --verbose Output additional messages to STDERR ``` ### SEE ALSO diff --git a/docs/docs/ref/cli/minder_provider.md b/docs/docs/ref/cli/minder_provider.md index adb1e057d5..900709d9fd 100644 --- a/docs/docs/ref/cli/minder_provider.md +++ b/docs/docs/ref/cli/minder_provider.md @@ -29,6 +29,7 @@ minder provider [flags] --grpc-port int Server port (default 443) --identity-client string Identity server client ID (default "minder-cli") --identity-url string Identity server issuer URL (default "https://auth.stacklok.com") + -v, --verbose Output additional messages to STDERR ``` ### SEE ALSO diff --git a/docs/docs/ref/cli/minder_provider_delete.md b/docs/docs/ref/cli/minder_provider_delete.md index 15885fcf04..6363675ad2 100644 --- a/docs/docs/ref/cli/minder_provider_delete.md +++ b/docs/docs/ref/cli/minder_provider_delete.md @@ -31,6 +31,7 @@ minder provider delete [flags] --identity-client string Identity server client ID (default "minder-cli") --identity-url string Identity server issuer URL (default "https://auth.stacklok.com") -j, --project string ID of the project + -v, --verbose Output additional messages to STDERR ``` ### SEE ALSO diff --git a/docs/docs/ref/cli/minder_provider_enroll.md b/docs/docs/ref/cli/minder_provider_enroll.md index fa233b97d5..dd2ae2b732 100644 --- a/docs/docs/ref/cli/minder_provider_enroll.md +++ b/docs/docs/ref/cli/minder_provider_enroll.md @@ -38,6 +38,7 @@ minder provider enroll [flags] --identity-client string Identity server client ID (default "minder-cli") --identity-url string Identity server issuer URL (default "https://auth.stacklok.com") -j, --project string ID of the project + -v, --verbose Output additional messages to STDERR ``` ### SEE ALSO diff --git a/docs/docs/ref/cli/minder_provider_get.md b/docs/docs/ref/cli/minder_provider_get.md index a95b07bef2..a9a0ffa850 100644 --- a/docs/docs/ref/cli/minder_provider_get.md +++ b/docs/docs/ref/cli/minder_provider_get.md @@ -31,6 +31,7 @@ minder provider get [flags] --identity-client string Identity server client ID (default "minder-cli") --identity-url string Identity server issuer URL (default "https://auth.stacklok.com") -j, --project string ID of the project + -v, --verbose Output additional messages to STDERR ``` ### SEE ALSO diff --git a/docs/docs/ref/cli/minder_provider_list.md b/docs/docs/ref/cli/minder_provider_list.md index c12b0789d1..be16d71bed 100644 --- a/docs/docs/ref/cli/minder_provider_list.md +++ b/docs/docs/ref/cli/minder_provider_list.md @@ -30,6 +30,7 @@ minder provider list [flags] --identity-client string Identity server client ID (default "minder-cli") --identity-url string Identity server issuer URL (default "https://auth.stacklok.com") -j, --project string ID of the project + -v, --verbose Output additional messages to STDERR ``` ### SEE ALSO diff --git a/docs/docs/ref/cli/minder_provider_update.md b/docs/docs/ref/cli/minder_provider_update.md index b9024f4ff4..e4258fd3b9 100644 --- a/docs/docs/ref/cli/minder_provider_update.md +++ b/docs/docs/ref/cli/minder_provider_update.md @@ -33,6 +33,7 @@ minder provider update [flags] --identity-client string Identity server client ID (default "minder-cli") --identity-url string Identity server issuer URL (default "https://auth.stacklok.com") -j, --project string ID of the project + -v, --verbose Output additional messages to STDERR ``` ### SEE ALSO diff --git a/docs/docs/ref/cli/minder_quickstart.md b/docs/docs/ref/cli/minder_quickstart.md index 04176c19c4..ab68043e4d 100644 --- a/docs/docs/ref/cli/minder_quickstart.md +++ b/docs/docs/ref/cli/minder_quickstart.md @@ -32,6 +32,7 @@ minder quickstart [flags] --grpc-port int Server port (default 443) --identity-client string Identity server client ID (default "minder-cli") --identity-url string Identity server issuer URL (default "https://auth.stacklok.com") + -v, --verbose Output additional messages to STDERR ``` ### SEE ALSO diff --git a/docs/docs/ref/cli/minder_repo.md b/docs/docs/ref/cli/minder_repo.md index cb62f35728..714edc2305 100644 --- a/docs/docs/ref/cli/minder_repo.md +++ b/docs/docs/ref/cli/minder_repo.md @@ -30,6 +30,7 @@ minder repo [flags] --grpc-port int Server port (default 443) --identity-client string Identity server client ID (default "minder-cli") --identity-url string Identity server issuer URL (default "https://auth.stacklok.com") + -v, --verbose Output additional messages to STDERR ``` ### SEE ALSO diff --git a/docs/docs/ref/cli/minder_repo_delete.md b/docs/docs/ref/cli/minder_repo_delete.md index c39b3cf4d5..11ba32e087 100644 --- a/docs/docs/ref/cli/minder_repo_delete.md +++ b/docs/docs/ref/cli/minder_repo_delete.md @@ -32,6 +32,7 @@ minder repo delete [flags] --identity-url string Identity server issuer URL (default "https://auth.stacklok.com") -j, --project string ID of the project -p, --provider string Name of the provider, i.e. github + -v, --verbose Output additional messages to STDERR ``` ### SEE ALSO diff --git a/docs/docs/ref/cli/minder_repo_get.md b/docs/docs/ref/cli/minder_repo_get.md index 07ce33b909..1919ffffd6 100644 --- a/docs/docs/ref/cli/minder_repo_get.md +++ b/docs/docs/ref/cli/minder_repo_get.md @@ -33,6 +33,7 @@ minder repo get [flags] --identity-url string Identity server issuer URL (default "https://auth.stacklok.com") -j, --project string ID of the project -p, --provider string Name of the provider, i.e. github + -v, --verbose Output additional messages to STDERR ``` ### SEE ALSO diff --git a/docs/docs/ref/cli/minder_repo_list.md b/docs/docs/ref/cli/minder_repo_list.md index 25819fe039..802b47eebe 100644 --- a/docs/docs/ref/cli/minder_repo_list.md +++ b/docs/docs/ref/cli/minder_repo_list.md @@ -31,6 +31,7 @@ minder repo list [flags] --identity-url string Identity server issuer URL (default "https://auth.stacklok.com") -j, --project string ID of the project -p, --provider string Name of the provider, i.e. github + -v, --verbose Output additional messages to STDERR ``` ### SEE ALSO diff --git a/docs/docs/ref/cli/minder_repo_reconcile.md b/docs/docs/ref/cli/minder_repo_reconcile.md index 36d03c2db1..6129630a3c 100644 --- a/docs/docs/ref/cli/minder_repo_reconcile.md +++ b/docs/docs/ref/cli/minder_repo_reconcile.md @@ -33,6 +33,7 @@ minder repo reconcile [flags] --identity-url string Identity server issuer URL (default "https://auth.stacklok.com") -j, --project string ID of the project -p, --provider string Name of the provider, i.e. github + -v, --verbose Output additional messages to STDERR ``` ### SEE ALSO diff --git a/docs/docs/ref/cli/minder_repo_register.md b/docs/docs/ref/cli/minder_repo_register.md index 7d97e6cd0d..833af81d9f 100644 --- a/docs/docs/ref/cli/minder_repo_register.md +++ b/docs/docs/ref/cli/minder_repo_register.md @@ -32,6 +32,7 @@ minder repo register [flags] --identity-url string Identity server issuer URL (default "https://auth.stacklok.com") -j, --project string ID of the project -p, --provider string Name of the provider, i.e. github + -v, --verbose Output additional messages to STDERR ``` ### SEE ALSO diff --git a/docs/docs/ref/cli/minder_ruletype.md b/docs/docs/ref/cli/minder_ruletype.md index 0cbd2e9e5b..ce54ac1c03 100644 --- a/docs/docs/ref/cli/minder_ruletype.md +++ b/docs/docs/ref/cli/minder_ruletype.md @@ -29,6 +29,7 @@ minder ruletype [flags] --grpc-port int Server port (default 443) --identity-client string Identity server client ID (default "minder-cli") --identity-url string Identity server issuer URL (default "https://auth.stacklok.com") + -v, --verbose Output additional messages to STDERR ``` ### SEE ALSO diff --git a/docs/docs/ref/cli/minder_ruletype_apply.md b/docs/docs/ref/cli/minder_ruletype_apply.md index 4f8c1e66cb..eaa7dcfc9d 100644 --- a/docs/docs/ref/cli/minder_ruletype_apply.md +++ b/docs/docs/ref/cli/minder_ruletype_apply.md @@ -30,6 +30,7 @@ minder ruletype apply [flags] --identity-client string Identity server client ID (default "minder-cli") --identity-url string Identity server issuer URL (default "https://auth.stacklok.com") -j, --project string ID of the project + -v, --verbose Output additional messages to STDERR ``` ### SEE ALSO diff --git a/docs/docs/ref/cli/minder_ruletype_create.md b/docs/docs/ref/cli/minder_ruletype_create.md index 0a4203a2e6..895d3f341c 100644 --- a/docs/docs/ref/cli/minder_ruletype_create.md +++ b/docs/docs/ref/cli/minder_ruletype_create.md @@ -30,6 +30,7 @@ minder ruletype create [flags] --identity-client string Identity server client ID (default "minder-cli") --identity-url string Identity server issuer URL (default "https://auth.stacklok.com") -j, --project string ID of the project + -v, --verbose Output additional messages to STDERR ``` ### SEE ALSO diff --git a/docs/docs/ref/cli/minder_ruletype_delete.md b/docs/docs/ref/cli/minder_ruletype_delete.md index ba3762f78a..91e1552a02 100644 --- a/docs/docs/ref/cli/minder_ruletype_delete.md +++ b/docs/docs/ref/cli/minder_ruletype_delete.md @@ -32,6 +32,7 @@ minder ruletype delete [flags] --identity-client string Identity server client ID (default "minder-cli") --identity-url string Identity server issuer URL (default "https://auth.stacklok.com") -j, --project string ID of the project + -v, --verbose Output additional messages to STDERR ``` ### SEE ALSO diff --git a/docs/docs/ref/cli/minder_ruletype_get.md b/docs/docs/ref/cli/minder_ruletype_get.md index 52afa8b431..8f895a07c0 100644 --- a/docs/docs/ref/cli/minder_ruletype_get.md +++ b/docs/docs/ref/cli/minder_ruletype_get.md @@ -32,6 +32,7 @@ minder ruletype get [flags] --identity-client string Identity server client ID (default "minder-cli") --identity-url string Identity server issuer URL (default "https://auth.stacklok.com") -j, --project string ID of the project + -v, --verbose Output additional messages to STDERR ``` ### SEE ALSO diff --git a/docs/docs/ref/cli/minder_ruletype_list.md b/docs/docs/ref/cli/minder_ruletype_list.md index cfe9210870..c601f0dc72 100644 --- a/docs/docs/ref/cli/minder_ruletype_list.md +++ b/docs/docs/ref/cli/minder_ruletype_list.md @@ -30,6 +30,7 @@ minder ruletype list [flags] --identity-client string Identity server client ID (default "minder-cli") --identity-url string Identity server issuer URL (default "https://auth.stacklok.com") -j, --project string ID of the project + -v, --verbose Output additional messages to STDERR ``` ### SEE ALSO diff --git a/docs/docs/ref/cli/minder_set-project.md b/docs/docs/ref/cli/minder_set-project.md index c97178ec24..b9e008af9c 100644 --- a/docs/docs/ref/cli/minder_set-project.md +++ b/docs/docs/ref/cli/minder_set-project.md @@ -30,6 +30,7 @@ minder set-project [flags] --grpc-port int Server port (default 443) --identity-client string Identity server client ID (default "minder-cli") --identity-url string Identity server issuer URL (default "https://auth.stacklok.com") + -v, --verbose Output additional messages to STDERR ``` ### SEE ALSO diff --git a/docs/docs/ref/cli/minder_version.md b/docs/docs/ref/cli/minder_version.md index 5087c2103e..1d6c8d2a2a 100644 --- a/docs/docs/ref/cli/minder_version.md +++ b/docs/docs/ref/cli/minder_version.md @@ -28,6 +28,7 @@ minder version [flags] --grpc-port int Server port (default 443) --identity-client string Identity server client ID (default "minder-cli") --identity-url string Identity server issuer URL (default "https://auth.stacklok.com") + -v, --verbose Output additional messages to STDERR ``` ### SEE ALSO diff --git a/docs/docusaurus.config.js b/docs/docusaurus.config.js index aac24167ba..a6024ae925 100644 --- a/docs/docusaurus.config.js +++ b/docs/docusaurus.config.js @@ -1,17 +1,6 @@ -// -// Copyright 2023 Stacklok, 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. +// SPDX-FileCopyrightText: Copyright 2023 The Minder Authors +// SPDX-License-Identifier: Apache-2.0 + // Package apply provides the apply command for the medctl CLI // @ts-check diff --git a/docs/redocly.yml b/docs/redocly.yml index 58792d6a50..58adb6a88f 100644 --- a/docs/redocly.yml +++ b/docs/redocly.yml @@ -1,17 +1,5 @@ -# -# Copyright 2023 Stacklok, 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. +# SPDX-FileCopyrightText: Copyright 2023 The Minder Authors +# SPDX-License-Identifier: Apache-2.0 theme.openapi: hideDownloadButton: true diff --git a/docs/sidebars.js b/docs/sidebars.js index 2fb7e8c685..156f6ff228 100644 --- a/docs/sidebars.js +++ b/docs/sidebars.js @@ -1,17 +1,6 @@ -// -// Copyright 2023 Stacklok, 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. +// SPDX-FileCopyrightText: Copyright 2023 The Minder Authors +// SPDX-License-Identifier: Apache-2.0 + /** * Creating a sidebar enables you to: diff --git a/docs/src/css/custom.css b/docs/src/css/custom.css index e8bdbd33fa..83a6b8b262 100644 --- a/docs/src/css/custom.css +++ b/docs/src/css/custom.css @@ -1,18 +1,7 @@ -/** - * Copyright 2023 Stacklok, 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. - */ +/* + SPDX-FileCopyrightText: Copyright 2023 The Minder Authors + SPDX-License-Identifier: Apache-2.0 +*/ /** * Any CSS included here will be global. The classic template diff --git a/docs/src/pages/index.module.css b/docs/src/pages/index.module.css index c37a35f59b..34ff7a79dc 100644 --- a/docs/src/pages/index.module.css +++ b/docs/src/pages/index.module.css @@ -1,18 +1,7 @@ -/** - * Copyright 2023 Stacklok, 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. - */ +/* + SPDX-FileCopyrightText: Copyright YYYY The Minder Authors + SPDX-License-Identifier: Apache-2.0 +*/ /** * CSS files with the .module.css suffix will be treated as CSS modules diff --git a/examples/Makefile b/examples/Makefile index e5848f35f1..eb89bad964 100644 --- a/examples/Makefile +++ b/examples/Makefile @@ -1,17 +1,5 @@ -# -# Copyright 2023 Stacklok, 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. +# SPDX-FileCopyrightText: Copyright 2023 The Minder Authors +# SPDX-License-Identifier: Apache-2.0 ## use absolute makefile location diff --git a/go.mod b/go.mod index 66dbe6e2d5..2ced5714c7 100644 --- a/go.mod +++ b/go.mod @@ -71,7 +71,7 @@ require ( github.com/thomaspoignant/go-feature-flag v1.34.0 github.com/xanzy/go-gitlab v0.112.0 github.com/xeipuuv/gojsonschema v1.2.0 - github.com/yuin/goldmark v1.7.7 + github.com/yuin/goldmark v1.7.8 go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.56.0 go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.56.0 go.opentelemetry.io/otel v1.31.0 diff --git a/go.sum b/go.sum index 89d366b957..811e8ef819 100644 --- a/go.sum +++ b/go.sum @@ -1054,8 +1054,8 @@ github.com/yuin/goldmark v1.1.32/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9de github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.4.13/go.mod h1:6yULJ656Px+3vBD8DxQVa3kxgyrAnzto9xy5taEt/CY= github.com/yuin/goldmark v1.7.1/go.mod h1:uzxRWxtg69N339t3louHJ7+O03ezfj6PlliRlaOzY1E= -github.com/yuin/goldmark v1.7.7 h1:5m9rrB1sW3JUMToKFQfb+FGt1U7r57IHu5GrYrG2nqU= -github.com/yuin/goldmark v1.7.7/go.mod h1:uzxRWxtg69N339t3louHJ7+O03ezfj6PlliRlaOzY1E= +github.com/yuin/goldmark v1.7.8 h1:iERMLn0/QJeHFhxSt3p6PeN9mGnvIKSpG9YYorDMnic= +github.com/yuin/goldmark v1.7.8/go.mod h1:uzxRWxtg69N339t3louHJ7+O03ezfj6PlliRlaOzY1E= github.com/yuin/goldmark-emoji v1.0.3 h1:aLRkLHOuBR2czCY4R8olwMjID+tENfhyFDMCRhbIQY4= github.com/yuin/goldmark-emoji v1.0.3/go.mod h1:tTkZEbwu5wkPmgTcitqddVxY9osFZiavD+r4AzQrh1U= github.com/zalando/go-keyring v0.2.3 h1:v9CUu9phlABObO4LPWycf+zwMG7nlbb3t/B5wa97yms= diff --git a/identity/config/stacklok.yaml b/identity/config/stacklok.yaml index bca248bd05..70afd96584 100644 --- a/identity/config/stacklok.yaml +++ b/identity/config/stacklok.yaml @@ -1,16 +1,5 @@ -# Copyright 2024 Stacklok, 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. +# SPDX-FileCopyrightText: Copyright 2024 The Minder Authors +# SPDX-License-Identifier: Apache-2.0 # From: # create realms -s realm=stacklok -s loginTheme=keycloak -s eventsEnabled=true -s 'enabledEventTypes=["DELETE_ACCOUNT"]' -s eventsExpiration=604800 -s enabled=true diff --git a/identity/themes/stacklok/login/resources/css/styles.css b/identity/themes/stacklok/login/resources/css/styles.css index efab8dbb20..5d646902e3 100644 --- a/identity/themes/stacklok/login/resources/css/styles.css +++ b/identity/themes/stacklok/login/resources/css/styles.css @@ -1,18 +1,7 @@ -/** - * Copyright 2023 Stacklok, 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. - */ +/* + SPDX-FileCopyrightText: Copyright 2023 The Minder Authors + SPDX-License-Identifier: Apache-2.0 +*/ :root { --pf-global--primary-color--100: #00BBBE; @@ -31,4 +20,4 @@ div.kc-logo-text { background-image: url(../img/stacklok.png); background-size: contain; -} \ No newline at end of file +} diff --git a/internal/assets/static.go b/internal/assets/static.go index cdf86420f0..f555a86b4e 100644 --- a/internal/assets/static.go +++ b/internal/assets/static.go @@ -1,17 +1,5 @@ -// -// Copyright 2023 Stacklok, 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. +// SPDX-FileCopyrightText: Copyright 2023 The Minder Authors +// SPDX-License-Identifier: Apache-2.0 // Package assets contains the static assets. package assets diff --git a/internal/auth/github.go b/internal/auth/github.go index 190f480608..15b0ac1127 100644 --- a/internal/auth/github.go +++ b/internal/auth/github.go @@ -1,17 +1,5 @@ -// -// Copyright 2023 Stacklok, 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. +// SPDX-FileCopyrightText: Copyright 2023 The Minder Authors +// SPDX-License-Identifier: Apache-2.0 // Package auth contains the authentication logic for the control plane package auth diff --git a/internal/auth/html/oauth_success.html b/internal/auth/html/oauth_success.html index 3aa80f66e7..bb8cd9366a 100644 --- a/internal/auth/html/oauth_success.html +++ b/internal/auth/html/oauth_success.html @@ -1,18 +1,7 @@ diff --git a/internal/auth/interface.go b/internal/auth/interface.go index 1ae18f3ff9..bb0b5110af 100644 --- a/internal/auth/interface.go +++ b/internal/auth/interface.go @@ -1,17 +1,5 @@ -// -// Copyright 2023 Stacklok, 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. +// SPDX-FileCopyrightText: Copyright 2023 The Minder Authors +// SPDX-License-Identifier: Apache-2.0 package auth diff --git a/internal/auth/interface_test.go b/internal/auth/interface_test.go index e30f5944cc..dd430ae1ba 100644 --- a/internal/auth/interface_test.go +++ b/internal/auth/interface_test.go @@ -1,17 +1,5 @@ -// -// Copyright 2023 Stacklok, 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. +// SPDX-FileCopyrightText: Copyright 2023 The Minder Authors +// SPDX-License-Identifier: Apache-2.0 package auth diff --git a/internal/auth/jwt/fuzz_test.go b/internal/auth/jwt/fuzz_test.go index 494125cc54..236daa1f90 100644 --- a/internal/auth/jwt/fuzz_test.go +++ b/internal/auth/jwt/fuzz_test.go @@ -1,17 +1,5 @@ -// -// Copyright 2024 Stacklok, 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. +// SPDX-FileCopyrightText: Copyright 2024 The Minder Authors +// SPDX-License-Identifier: Apache-2.0 package jwt diff --git a/internal/auth/jwt/jwauth_test.go b/internal/auth/jwt/jwauth_test.go index 6e8ad82286..0b192cb520 100644 --- a/internal/auth/jwt/jwauth_test.go +++ b/internal/auth/jwt/jwauth_test.go @@ -1,17 +1,5 @@ -// -// Copyright 2023 Stacklok, 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. +// SPDX-FileCopyrightText: Copyright 2023 The Minder Authors +// SPDX-License-Identifier: Apache-2.0 package jwt diff --git a/internal/auth/jwt/jwtauth.go b/internal/auth/jwt/jwtauth.go index 1825e2debb..33570a2407 100644 --- a/internal/auth/jwt/jwtauth.go +++ b/internal/auth/jwt/jwtauth.go @@ -1,17 +1,5 @@ -// -// Copyright 2023 Stacklok, 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. +// SPDX-FileCopyrightText: Copyright 2023 The Minder Authors +// SPDX-License-Identifier: Apache-2.0 // Package jwt provides the logic for reading and validating JWT tokens package jwt diff --git a/internal/auth/jwt/noop/jwtauth.go b/internal/auth/jwt/noop/jwtauth.go index ea9318cc67..c2591db668 100644 --- a/internal/auth/jwt/noop/jwtauth.go +++ b/internal/auth/jwt/noop/jwtauth.go @@ -1,17 +1,5 @@ -// -// Copyright 2024 Stacklok, 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. +// SPDX-FileCopyrightText: Copyright 2024 The Minder Authors +// SPDX-License-Identifier: Apache-2.0 // Package noop provides a no-op implementation of the Validator interface package noop diff --git a/internal/auth/keycloak/client/client.go b/internal/auth/keycloak/client/client.go index d017379fee..826bd59949 100644 --- a/internal/auth/keycloak/client/client.go +++ b/internal/auth/keycloak/client/client.go @@ -1,17 +1,5 @@ -// -// Copyright 2024 Stacklok, 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. +// SPDX-FileCopyrightText: Copyright 2024 The Minder Authors +// SPDX-License-Identifier: Apache-2.0 // Package client contains an auto-generated KeyCloak client from the OpenAPI spec. package client diff --git a/internal/auth/keycloak/client/oapi-config.yaml b/internal/auth/keycloak/client/oapi-config.yaml index e595e3482d..9841a0764a 100644 --- a/internal/auth/keycloak/client/oapi-config.yaml +++ b/internal/auth/keycloak/client/oapi-config.yaml @@ -1,16 +1,5 @@ -# Copyright 2024 Stacklok, 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. +# SPDX-FileCopyrightText: Copyright 2024 The Minder Authors +# SPDX-License-Identifier: Apache-2.0 # yaml-language-server: $schema=https://raw.githubusercontent.com/deepmap/oapi-codegen/HEAD/configuration-schema.json package: client @@ -20,4 +9,4 @@ generate: client: true output-options: include-tags: - - Users \ No newline at end of file + - Users diff --git a/internal/auth/keycloak/keycloak.go b/internal/auth/keycloak/keycloak.go index 398a1f875c..da18454336 100644 --- a/internal/auth/keycloak/keycloak.go +++ b/internal/auth/keycloak/keycloak.go @@ -1,17 +1,5 @@ -// -// Copyright 2024 Stacklok, 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. +// SPDX-FileCopyrightText: Copyright 2024 The Minder Authors +// SPDX-License-Identifier: Apache-2.0 // Package keycloak provides an implementation of the Keycloak IdentityProvider. package keycloak diff --git a/internal/auth/keycloak/keycloak_test.go b/internal/auth/keycloak/keycloak_test.go index 8299affa41..f8483248ea 100644 --- a/internal/auth/keycloak/keycloak_test.go +++ b/internal/auth/keycloak/keycloak_test.go @@ -1,17 +1,5 @@ -// -// Copyright 2024 Stacklok, 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. +// SPDX-FileCopyrightText: Copyright 2024 The Minder Authors +// SPDX-License-Identifier: Apache-2.0 // Package keycloak provides an implementation of the Keycloak IdentityProvider. package keycloak diff --git a/internal/auth/oauth.go b/internal/auth/oauth.go index 5e696113f9..3f9358c847 100644 --- a/internal/auth/oauth.go +++ b/internal/auth/oauth.go @@ -1,17 +1,5 @@ -// -// Copyright 2023 Stacklok, 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. +// SPDX-FileCopyrightText: Copyright 2023 The Minder Authors +// SPDX-License-Identifier: Apache-2.0 package auth diff --git a/internal/auth/oauth_html.go b/internal/auth/oauth_html.go index ac4d158471..3d760c3ca4 100644 --- a/internal/auth/oauth_html.go +++ b/internal/auth/oauth_html.go @@ -1,17 +1,5 @@ -// -// Copyright 2023 Stacklok, 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. +// SPDX-FileCopyrightText: Copyright 2023 The Minder Authors +// SPDX-License-Identifier: Apache-2.0 package auth diff --git a/internal/authz/authz.go b/internal/authz/authz.go index 9c5cdc65af..da00a7bd7f 100644 --- a/internal/authz/authz.go +++ b/internal/authz/authz.go @@ -1,17 +1,5 @@ -// -// Copyright 2023 Stacklok, 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. +// SPDX-FileCopyrightText: Copyright 2023 The Minder Authors +// SPDX-License-Identifier: Apache-2.0 // Package authz provides the authorization utilities for minder package authz diff --git a/internal/authz/authz_test.go b/internal/authz/authz_test.go index 92d5d27f34..e2fbc865b3 100644 --- a/internal/authz/authz_test.go +++ b/internal/authz/authz_test.go @@ -1,17 +1,5 @@ -// -// Copyright 2024 Stacklok, 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. +// SPDX-FileCopyrightText: Copyright 2024 The Minder Authors +// SPDX-License-Identifier: Apache-2.0 package authz_test diff --git a/internal/authz/fuzz_test.go b/internal/authz/fuzz_test.go index 07c044ad7d..5ebc0f416e 100644 --- a/internal/authz/fuzz_test.go +++ b/internal/authz/fuzz_test.go @@ -1,17 +1,5 @@ -// -// Copyright 2024 Stacklok, 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. +// SPDX-FileCopyrightText: Copyright 2024 The Minder Authors +// SPDX-License-Identifier: Apache-2.0 package authz_test diff --git a/internal/authz/interface.go b/internal/authz/interface.go index de151fa7a9..030d80aa38 100644 --- a/internal/authz/interface.go +++ b/internal/authz/interface.go @@ -1,17 +1,5 @@ -// -// Copyright 2023 Stacklok, 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. +// SPDX-FileCopyrightText: Copyright 2023 The Minder Authors +// SPDX-License-Identifier: Apache-2.0 // Package authz provides the authorization utilities for minder package authz diff --git a/internal/authz/mock/noop_authz.go b/internal/authz/mock/noop_authz.go index 85e0650eaa..3919152bab 100644 --- a/internal/authz/mock/noop_authz.go +++ b/internal/authz/mock/noop_authz.go @@ -1,17 +1,5 @@ -// -// Copyright 2023 Stacklok, 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. +// SPDX-FileCopyrightText: Copyright 2023 The Minder Authors +// SPDX-License-Identifier: Apache-2.0 // Package mock provides a no-op implementation of the minder the authorization client package mock diff --git a/internal/authz/mock/simple_authz.go b/internal/authz/mock/simple_authz.go index d3fbbcfa28..12ecb1577d 100644 --- a/internal/authz/mock/simple_authz.go +++ b/internal/authz/mock/simple_authz.go @@ -1,17 +1,5 @@ -// -// Copyright 2023 Stacklok, 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. +// SPDX-FileCopyrightText: Copyright 2023 The Minder Authors +// SPDX-License-Identifier: Apache-2.0 // Package mock provides a no-op implementation of the minder the authorization client package mock diff --git a/internal/authz/model/minder.fga b/internal/authz/model/minder.fga index cef9df3cd8..6cdc639212 100644 --- a/internal/authz/model/minder.fga +++ b/internal/authz/model/minder.fga @@ -1,17 +1,5 @@ -# -# Copyright 2023 Stacklok, 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. +# SPDX-FileCopyrightText: Copyright 2023 The Minder Authors +# SPDX-License-Identifier: Apache-2.0 # N.B. The OpenFGA language parser is a bit finicky, and does not like # un-terminated apostrophes, and only allows comments at the beginning @@ -95,4 +83,4 @@ type project define profile_status_get: viewer - define entity_reconciliation_task_create: editor \ No newline at end of file + define entity_reconciliation_task_create: editor diff --git a/internal/authz/model/tests/group.tests.yaml b/internal/authz/model/tests/group.tests.yaml index ddcf0fa83c..36384d9bfd 100644 --- a/internal/authz/model/tests/group.tests.yaml +++ b/internal/authz/model/tests/group.tests.yaml @@ -1,17 +1,5 @@ -# -# Copyright 2023 Stacklok, 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. +# SPDX-FileCopyrightText: Copyright 2023 The Minder Authors +# SPDX-License-Identifier: Apache-2.0 name: Auth tests model_file: ../minder.fga @@ -100,4 +88,4 @@ tests: repo_update: true provider_create: false artifact_update: true - provider_get: true \ No newline at end of file + provider_get: true diff --git a/internal/authz/model/tests/simple.tests.yaml b/internal/authz/model/tests/simple.tests.yaml index 39bba46e8b..e5dd744aa6 100644 --- a/internal/authz/model/tests/simple.tests.yaml +++ b/internal/authz/model/tests/simple.tests.yaml @@ -1,17 +1,5 @@ -# -# Copyright 2023 Stacklok, 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. +# SPDX-FileCopyrightText: Copyright 2023 The Minder Authors +# SPDX-License-Identifier: Apache-2.0 name: Auth tests model_file: ../minder.fga @@ -266,4 +254,4 @@ tests: profile_get: false profile_create: true profile_update: true - profile_delete: true \ No newline at end of file + profile_delete: true diff --git a/internal/config/client/config.go b/internal/config/client/config.go index c5900024cd..3436885e01 100644 --- a/internal/config/client/config.go +++ b/internal/config/client/config.go @@ -1,17 +1,5 @@ -// -// Copyright 2024 Stacklok, 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. +// SPDX-FileCopyrightText: Copyright 2024 The Minder Authors +// SPDX-License-Identifier: Apache-2.0 // Package client contains the configuration for the minder cli package client diff --git a/internal/config/client/config_test.go b/internal/config/client/config_test.go index 27d0e7d5e7..6c21990e34 100644 --- a/internal/config/client/config_test.go +++ b/internal/config/client/config_test.go @@ -1,17 +1,5 @@ -// -// Copyright 2024 Stacklok, 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. +// SPDX-FileCopyrightText: Copyright 2024 The Minder Authors +// SPDX-License-Identifier: Apache-2.0 package client_test diff --git a/internal/config/client/identity.go b/internal/config/client/identity.go index 07c4f6e1e3..f06d87824a 100644 --- a/internal/config/client/identity.go +++ b/internal/config/client/identity.go @@ -1,17 +1,5 @@ -// -// Copyright 2024 Stacklok, 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. +// SPDX-FileCopyrightText: Copyright 2024 The Minder Authors +// SPDX-License-Identifier: Apache-2.0 package client diff --git a/internal/config/common.go b/internal/config/common.go index 30989aa2dc..fdecfc08a3 100644 --- a/internal/config/common.go +++ b/internal/config/common.go @@ -1,17 +1,5 @@ -// -// Copyright 2023 Stacklok, 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. +// SPDX-FileCopyrightText: Copyright 2023 The Minder Authors +// SPDX-License-Identifier: Apache-2.0 package config diff --git a/internal/config/reminder/config.go b/internal/config/reminder/config.go index 0f4953a025..26cc9a4c7e 100644 --- a/internal/config/reminder/config.go +++ b/internal/config/reminder/config.go @@ -1,16 +1,5 @@ -// Copyright 2024 Stacklok, 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. +// SPDX-FileCopyrightText: Copyright 2024 The Minder Authors +// SPDX-License-Identifier: Apache-2.0 // Package reminder contains configuration options for the reminder service. package reminder diff --git a/internal/config/reminder/config_test.go b/internal/config/reminder/config_test.go index d13a3eebf6..1cef78adb2 100644 --- a/internal/config/reminder/config_test.go +++ b/internal/config/reminder/config_test.go @@ -1,16 +1,5 @@ -// Copyright 2024 Stacklok, 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. +// SPDX-FileCopyrightText: Copyright 2024 The Minder Authors +// SPDX-License-Identifier: Apache-2.0 package reminder_test diff --git a/internal/config/reminder/events.go b/internal/config/reminder/events.go index aeebbb63e1..6f77e41a8d 100644 --- a/internal/config/reminder/events.go +++ b/internal/config/reminder/events.go @@ -1,17 +1,5 @@ -// -// Copyright 2024 Stacklok, 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. +// SPDX-FileCopyrightText: Copyright 2024 The Minder Authors +// SPDX-License-Identifier: Apache-2.0 package reminder diff --git a/internal/config/reminder/logging.go b/internal/config/reminder/logging.go index bfe7da3cf5..4b36503145 100644 --- a/internal/config/reminder/logging.go +++ b/internal/config/reminder/logging.go @@ -1,16 +1,5 @@ -// Copyright 2024 Stacklok, 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. +// SPDX-FileCopyrightText: Copyright 2024 The Minder Authors +// SPDX-License-Identifier: Apache-2.0 package reminder diff --git a/internal/config/reminder/recurrence.go b/internal/config/reminder/recurrence.go index 262756dcf8..4a60cab018 100644 --- a/internal/config/reminder/recurrence.go +++ b/internal/config/reminder/recurrence.go @@ -1,16 +1,5 @@ -// Copyright 2024 Stacklok, 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. +// SPDX-FileCopyrightText: Copyright 2024 The Minder Authors +// SPDX-License-Identifier: Apache-2.0 package reminder diff --git a/internal/config/server/auth.go b/internal/config/server/auth.go index 4a6b009698..a4939e4e04 100644 --- a/internal/config/server/auth.go +++ b/internal/config/server/auth.go @@ -1,17 +1,5 @@ -// -// Copyright 2023 Stacklok, 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. +// SPDX-FileCopyrightText: Copyright 2023 The Minder Authors +// SPDX-License-Identifier: Apache-2.0 package server diff --git a/internal/config/server/authz.go b/internal/config/server/authz.go index ab683e97cd..3ef1b7518a 100644 --- a/internal/config/server/authz.go +++ b/internal/config/server/authz.go @@ -1,17 +1,5 @@ -// -// Copyright 2023 Stacklok, 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. +// SPDX-FileCopyrightText: Copyright 2023 The Minder Authors +// SPDX-License-Identifier: Apache-2.0 package server diff --git a/internal/config/server/config.go b/internal/config/server/config.go index 46ab718025..6fb5f86a1b 100644 --- a/internal/config/server/config.go +++ b/internal/config/server/config.go @@ -1,17 +1,5 @@ -// -// Copyright 2023 Stacklok, 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. +// SPDX-FileCopyrightText: Copyright 2023 The Minder Authors +// SPDX-License-Identifier: Apache-2.0 // Package server contains a centralized structure for all configuration // options. diff --git a/internal/config/server/config_test.go b/internal/config/server/config_test.go index 8aa59464a8..b5c8ffa0b3 100644 --- a/internal/config/server/config_test.go +++ b/internal/config/server/config_test.go @@ -1,17 +1,5 @@ -// -// Copyright 2023 Stacklok, 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. +// SPDX-FileCopyrightText: Copyright 2023 The Minder Authors +// SPDX-License-Identifier: Apache-2.0 package server_test diff --git a/internal/config/server/crypto.go b/internal/config/server/crypto.go index 42391ac0b5..466db0f0dd 100644 --- a/internal/config/server/crypto.go +++ b/internal/config/server/crypto.go @@ -1,16 +1,5 @@ -// Copyright 2024 Stacklok, 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. +// SPDX-FileCopyrightText: Copyright 2024 The Minder Authors +// SPDX-License-Identifier: Apache-2.0 package server diff --git a/internal/config/server/default_profiles.go b/internal/config/server/default_profiles.go index 28d86d738f..7535bde8c8 100644 --- a/internal/config/server/default_profiles.go +++ b/internal/config/server/default_profiles.go @@ -1,16 +1,5 @@ -// Copyright 2024 Stacklok, 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. +// SPDX-FileCopyrightText: Copyright 2024 The Minder Authors +// SPDX-License-Identifier: Apache-2.0 package server diff --git a/internal/config/server/email.go b/internal/config/server/email.go index 8d74959028..8d8bc3f577 100644 --- a/internal/config/server/email.go +++ b/internal/config/server/email.go @@ -1,17 +1,5 @@ -// -// Copyright 2024 Stacklok, 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. +// SPDX-FileCopyrightText: Copyright 2024 The Minder Authors +// SPDX-License-Identifier: Apache-2.0 package server diff --git a/internal/config/server/events.go b/internal/config/server/events.go index fc400d10d3..78a15eb4eb 100644 --- a/internal/config/server/events.go +++ b/internal/config/server/events.go @@ -1,17 +1,5 @@ -// -// Copyright 2023 Stacklok, 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. +// SPDX-FileCopyrightText: Copyright 2023 The Minder Authors +// SPDX-License-Identifier: Apache-2.0 package server diff --git a/internal/config/server/flags.go b/internal/config/server/flags.go index a818a005e5..547789412c 100644 --- a/internal/config/server/flags.go +++ b/internal/config/server/flags.go @@ -1,17 +1,5 @@ -// -// Copyright 2024 Stacklok, 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. +// SPDX-FileCopyrightText: Copyright 2024 The Minder Authors +// SPDX-License-Identifier: Apache-2.0 package server diff --git a/internal/config/server/github.go b/internal/config/server/github.go index 4e3ca6797e..2bfabbe5e7 100644 --- a/internal/config/server/github.go +++ b/internal/config/server/github.go @@ -1,17 +1,5 @@ -// -// Copyright 2024 Stacklok, 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. +// SPDX-FileCopyrightText: Copyright 2024 The Minder Authors +// SPDX-License-Identifier: Apache-2.0 package server diff --git a/internal/config/server/github_app.go b/internal/config/server/github_app.go index 2953e17274..213373201f 100644 --- a/internal/config/server/github_app.go +++ b/internal/config/server/github_app.go @@ -1,17 +1,5 @@ -// -// Copyright 2024 Stacklok, 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. +// SPDX-FileCopyrightText: Copyright 2024 The Minder Authors +// SPDX-License-Identifier: Apache-2.0 package server diff --git a/internal/config/server/gitlab.go b/internal/config/server/gitlab.go index 58a94c3c6b..71995a4890 100644 --- a/internal/config/server/gitlab.go +++ b/internal/config/server/gitlab.go @@ -1,17 +1,5 @@ -// -// Copyright 2024 Stacklok, 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. +// SPDX-FileCopyrightText: Copyright 2024 The Minder Authors +// SPDX-License-Identifier: Apache-2.0 package server diff --git a/internal/config/server/identity.go b/internal/config/server/identity.go index 3a31182afd..8ff7d09def 100644 --- a/internal/config/server/identity.go +++ b/internal/config/server/identity.go @@ -1,17 +1,5 @@ -// -// Copyright 2023 Stacklok, 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. +// SPDX-FileCopyrightText: Copyright 2023 The Minder Authors +// SPDX-License-Identifier: Apache-2.0 package server diff --git a/internal/config/server/logging.go b/internal/config/server/logging.go index dc7a36aa4a..4949e93264 100644 --- a/internal/config/server/logging.go +++ b/internal/config/server/logging.go @@ -1,17 +1,5 @@ -// -// Copyright 2023 Stacklok, 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. +// SPDX-FileCopyrightText: Copyright 2023 The Minder Authors +// SPDX-License-Identifier: Apache-2.0 package server diff --git a/internal/config/server/marketplace.go b/internal/config/server/marketplace.go index 472d083009..9906ce4451 100644 --- a/internal/config/server/marketplace.go +++ b/internal/config/server/marketplace.go @@ -1,16 +1,5 @@ -// Copyright 2024 Stacklok, 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. +// SPDX-FileCopyrightText: Copyright 2024 The Minder Authors +// SPDX-License-Identifier: Apache-2.0 package server diff --git a/internal/config/server/metrics.go b/internal/config/server/metrics.go index d4fc2e7250..ec435cc488 100644 --- a/internal/config/server/metrics.go +++ b/internal/config/server/metrics.go @@ -1,17 +1,5 @@ -// -// Copyright 2023 Stacklok, 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. +// SPDX-FileCopyrightText: Copyright 2023 The Minder Authors +// SPDX-License-Identifier: Apache-2.0 package server diff --git a/internal/config/server/oauth_client.go b/internal/config/server/oauth_client.go index 95140751f7..9a82ef2d7a 100644 --- a/internal/config/server/oauth_client.go +++ b/internal/config/server/oauth_client.go @@ -1,17 +1,5 @@ -// -// Copyright 2024 Stacklok, 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. +// SPDX-FileCopyrightText: Copyright 2024 The Minder Authors +// SPDX-License-Identifier: Apache-2.0 package server diff --git a/internal/config/server/provider.go b/internal/config/server/provider.go index 5c8f6045ba..69c59fdf31 100644 --- a/internal/config/server/provider.go +++ b/internal/config/server/provider.go @@ -1,17 +1,5 @@ -// -// Copyright 2024 Stacklok, 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. +// SPDX-FileCopyrightText: Copyright 2024 The Minder Authors +// SPDX-License-Identifier: Apache-2.0 package server diff --git a/internal/config/server/server.go b/internal/config/server/server.go index ac3de48224..ba000a0aa8 100644 --- a/internal/config/server/server.go +++ b/internal/config/server/server.go @@ -1,17 +1,5 @@ -// -// Copyright 2023 Stacklok, 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. +// SPDX-FileCopyrightText: Copyright 2023 The Minder Authors +// SPDX-License-Identifier: Apache-2.0 package server diff --git a/internal/config/server/tracing.go b/internal/config/server/tracing.go index f5265c55d8..6df19d1d32 100644 --- a/internal/config/server/tracing.go +++ b/internal/config/server/tracing.go @@ -1,17 +1,5 @@ -// -// Copyright 2023 Stacklok, 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. +// SPDX-FileCopyrightText: Copyright 2023 The Minder Authors +// SPDX-License-Identifier: Apache-2.0 package server diff --git a/internal/config/server/webhook.go b/internal/config/server/webhook.go index 55fe9838ce..8d7ecb89ad 100644 --- a/internal/config/server/webhook.go +++ b/internal/config/server/webhook.go @@ -1,17 +1,5 @@ -// -// Copyright 2023 Stacklok, 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. +// SPDX-FileCopyrightText: Copyright 2023 The Minder Authors +// SPDX-License-Identifier: Apache-2.0 package server diff --git a/internal/config/utils.go b/internal/config/utils.go index 62e48bd741..b1647c5990 100644 --- a/internal/config/utils.go +++ b/internal/config/utils.go @@ -1,17 +1,5 @@ -// -// Copyright 2023 Stacklok, 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. +// SPDX-FileCopyrightText: Copyright 2023 The Minder Authors +// SPDX-License-Identifier: Apache-2.0 // Package config contains the configuration for the minder cli and server package config diff --git a/internal/config/utils_test.go b/internal/config/utils_test.go index 6b3d2ee430..a37490ac4b 100644 --- a/internal/config/utils_test.go +++ b/internal/config/utils_test.go @@ -1,17 +1,5 @@ -// -// Copyright 2024 Stacklok, 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. +// SPDX-FileCopyrightText: Copyright 2024 The Minder Authors +// SPDX-License-Identifier: Apache-2.0 package config diff --git a/internal/constants/doc.go b/internal/constants/doc.go index c75a3eb995..2dc7da759c 100644 --- a/internal/constants/doc.go +++ b/internal/constants/doc.go @@ -1,17 +1,5 @@ -// -// Copyright 2023 Stacklok, 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. +// SPDX-FileCopyrightText: Copyright 2023 The Minder Authors +// SPDX-License-Identifier: Apache-2.0 // Package constants contains constants used throughout the application. package constants diff --git a/internal/constants/prod.go b/internal/constants/prod.go index 2ac3ac14fe..1618149a0c 100644 --- a/internal/constants/prod.go +++ b/internal/constants/prod.go @@ -1,17 +1,5 @@ -// -// Copyright 2023 Stacklok, 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. +// SPDX-FileCopyrightText: Copyright 2023 The Minder Authors +// SPDX-License-Identifier: Apache-2.0 package constants diff --git a/internal/constants/useragent.go b/internal/constants/useragent.go index 0f8bc2fa1a..d9ceb77552 100644 --- a/internal/constants/useragent.go +++ b/internal/constants/useragent.go @@ -1,16 +1,5 @@ -// Copyright 2024 Stacklok, 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. +// SPDX-FileCopyrightText: Copyright 2024 The Minder Authors +// SPDX-License-Identifier: Apache-2.0 package constants diff --git a/internal/constants/version.go b/internal/constants/version.go index 0ed3a16bd6..14b2b2f8ab 100644 --- a/internal/constants/version.go +++ b/internal/constants/version.go @@ -1,17 +1,5 @@ -// -// Copyright 2023 Stacklok, 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. +// SPDX-FileCopyrightText: Copyright 2023 The Minder Authors +// SPDX-License-Identifier: Apache-2.0 package constants diff --git a/internal/controlplane/common.go b/internal/controlplane/common.go index e26add0e82..1c479ee400 100644 --- a/internal/controlplane/common.go +++ b/internal/controlplane/common.go @@ -1,17 +1,5 @@ -// -// Copyright 2023 Stacklok, 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. +// SPDX-FileCopyrightText: Copyright 2023 The Minder Authors +// SPDX-License-Identifier: Apache-2.0 package controlplane diff --git a/internal/controlplane/common_test.go b/internal/controlplane/common_test.go index 7875a1ebe1..2236e164e0 100644 --- a/internal/controlplane/common_test.go +++ b/internal/controlplane/common_test.go @@ -1,16 +1,5 @@ -// Copyright 2024 Stacklok, 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. +// SPDX-FileCopyrightText: Copyright 2024 The Minder Authors +// SPDX-License-Identifier: Apache-2.0 package controlplane diff --git a/internal/controlplane/handlers.go b/internal/controlplane/handlers.go index af0ab72422..ad32422e8f 100644 --- a/internal/controlplane/handlers.go +++ b/internal/controlplane/handlers.go @@ -1,17 +1,5 @@ -// -// Copyright 2023 Stacklok, 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. +// SPDX-FileCopyrightText: Copyright 2023 The Minder Authors +// SPDX-License-Identifier: Apache-2.0 // Package controlplane contains the gRPC server implementation for the control plane package controlplane diff --git a/internal/controlplane/handlers_artifacts.go b/internal/controlplane/handlers_artifacts.go index ac11d0ef4c..b00ce09421 100644 --- a/internal/controlplane/handlers_artifacts.go +++ b/internal/controlplane/handlers_artifacts.go @@ -1,16 +1,5 @@ -// Copyright 2023 Stacklok, 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. +// SPDX-FileCopyrightText: Copyright 2023 The Minder Authors +// SPDX-License-Identifier: Apache-2.0 package controlplane diff --git a/internal/controlplane/handlers_authz.go b/internal/controlplane/handlers_authz.go index 0dc283e9bf..8bf3a532f3 100644 --- a/internal/controlplane/handlers_authz.go +++ b/internal/controlplane/handlers_authz.go @@ -1,16 +1,5 @@ -// Copyright 2023 Stacklok, 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. +// SPDX-FileCopyrightText: Copyright 2023 The Minder Authors +// SPDX-License-Identifier: Apache-2.0 package controlplane diff --git a/internal/controlplane/handlers_authz_test.go b/internal/controlplane/handlers_authz_test.go index 000868edde..8f83057eb1 100644 --- a/internal/controlplane/handlers_authz_test.go +++ b/internal/controlplane/handlers_authz_test.go @@ -1,16 +1,5 @@ -// Copyright 2023 Stacklok, 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. +// SPDX-FileCopyrightText: Copyright 2023 The Minder Authors +// SPDX-License-Identifier: Apache-2.0 package controlplane diff --git a/internal/controlplane/handlers_entities.go b/internal/controlplane/handlers_entities.go index e6d71e4268..f05c3ca11c 100644 --- a/internal/controlplane/handlers_entities.go +++ b/internal/controlplane/handlers_entities.go @@ -1,16 +1,5 @@ -// Copyright 2024 Stacklok, 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. +// SPDX-FileCopyrightText: Copyright 2024 The Minder Authors +// SPDX-License-Identifier: Apache-2.0 package controlplane diff --git a/internal/controlplane/handlers_entities_test.go b/internal/controlplane/handlers_entities_test.go index 9573bebf7f..a6533f22f8 100644 --- a/internal/controlplane/handlers_entities_test.go +++ b/internal/controlplane/handlers_entities_test.go @@ -1,16 +1,5 @@ -// Copyright 2024 Stacklok, 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. +// SPDX-FileCopyrightText: Copyright 2024 The Minder Authors +// SPDX-License-Identifier: Apache-2.0 package controlplane diff --git a/internal/controlplane/handlers_evalstatus.go b/internal/controlplane/handlers_evalstatus.go index 0a61489036..b241411db2 100644 --- a/internal/controlplane/handlers_evalstatus.go +++ b/internal/controlplane/handlers_evalstatus.go @@ -1,17 +1,5 @@ -// -// Copyright 2023 Stacklok, 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. +// SPDX-FileCopyrightText: Copyright 2023 The Minder Authors +// SPDX-License-Identifier: Apache-2.0 package controlplane diff --git a/internal/controlplane/handlers_evalstatus_test.go b/internal/controlplane/handlers_evalstatus_test.go index 1f5e925f1f..7c25bdc5ce 100644 --- a/internal/controlplane/handlers_evalstatus_test.go +++ b/internal/controlplane/handlers_evalstatus_test.go @@ -1,17 +1,5 @@ -// -// Copyright 2024 Stacklok, 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. +// SPDX-FileCopyrightText: Copyright 2024 The Minder Authors +// SPDX-License-Identifier: Apache-2.0 package controlplane diff --git a/internal/controlplane/handlers_invites.go b/internal/controlplane/handlers_invites.go index 00c85d4025..ab245c6167 100644 --- a/internal/controlplane/handlers_invites.go +++ b/internal/controlplane/handlers_invites.go @@ -1,16 +1,5 @@ -// Copyright 2024 Stacklok, 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. +// SPDX-FileCopyrightText: Copyright 2024 The Minder Authors +// SPDX-License-Identifier: Apache-2.0 package controlplane diff --git a/internal/controlplane/handlers_invites_test.go b/internal/controlplane/handlers_invites_test.go index 2f2f765638..0d40335136 100644 --- a/internal/controlplane/handlers_invites_test.go +++ b/internal/controlplane/handlers_invites_test.go @@ -1,16 +1,5 @@ -// Copyright 2024 Stacklok, 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. +// SPDX-FileCopyrightText: Copyright 2024 The Minder Authors +// SPDX-License-Identifier: Apache-2.0 package controlplane diff --git a/internal/controlplane/handlers_oauth.go b/internal/controlplane/handlers_oauth.go index 6647162404..9e2cd38b08 100644 --- a/internal/controlplane/handlers_oauth.go +++ b/internal/controlplane/handlers_oauth.go @@ -1,16 +1,5 @@ -// Copyright 2023 Stacklok, 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. +// SPDX-FileCopyrightText: Copyright 2023 The Minder Authors +// SPDX-License-Identifier: Apache-2.0 package controlplane diff --git a/internal/controlplane/handlers_oauth_test.go b/internal/controlplane/handlers_oauth_test.go index 5c8f109609..c2ad365e5f 100644 --- a/internal/controlplane/handlers_oauth_test.go +++ b/internal/controlplane/handlers_oauth_test.go @@ -1,16 +1,5 @@ -// Copyright 2023 Stacklok, 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. +// SPDX-FileCopyrightText: Copyright 2023 The Minder Authors +// SPDX-License-Identifier: Apache-2.0 package controlplane diff --git a/internal/controlplane/handlers_profile.go b/internal/controlplane/handlers_profile.go index ceb61c4963..f5a7c93db0 100644 --- a/internal/controlplane/handlers_profile.go +++ b/internal/controlplane/handlers_profile.go @@ -1,16 +1,5 @@ -// Copyright 2023 Stacklok, 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. +// SPDX-FileCopyrightText: Copyright 2023 The Minder Authors +// SPDX-License-Identifier: Apache-2.0 package controlplane diff --git a/internal/controlplane/handlers_profile_test.go b/internal/controlplane/handlers_profile_test.go index 1edd704c62..b18b2c71fb 100644 --- a/internal/controlplane/handlers_profile_test.go +++ b/internal/controlplane/handlers_profile_test.go @@ -1,16 +1,5 @@ -// Copyright 2024 Stacklok, 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. +// SPDX-FileCopyrightText: Copyright 2024 The Minder Authors +// SPDX-License-Identifier: Apache-2.0 package controlplane diff --git a/internal/controlplane/handlers_projects.go b/internal/controlplane/handlers_projects.go index 5b17e260bd..c9c24728bf 100644 --- a/internal/controlplane/handlers_projects.go +++ b/internal/controlplane/handlers_projects.go @@ -1,16 +1,5 @@ -// Copyright 2024 Stacklok, 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. +// SPDX-FileCopyrightText: Copyright 2024 The Minder Authors +// SPDX-License-Identifier: Apache-2.0 package controlplane diff --git a/internal/controlplane/handlers_projects_test.go b/internal/controlplane/handlers_projects_test.go index d94fbce94e..109bab13a3 100644 --- a/internal/controlplane/handlers_projects_test.go +++ b/internal/controlplane/handlers_projects_test.go @@ -1,16 +1,5 @@ -// Copyright 2024 Stacklok, 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. +// SPDX-FileCopyrightText: Copyright 2024 The Minder Authors +// SPDX-License-Identifier: Apache-2.0 package controlplane diff --git a/internal/controlplane/handlers_providers.go b/internal/controlplane/handlers_providers.go index bf6dfced0d..032660eaf4 100644 --- a/internal/controlplane/handlers_providers.go +++ b/internal/controlplane/handlers_providers.go @@ -1,16 +1,5 @@ -// Copyright 2024 Stacklok, 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. +// SPDX-FileCopyrightText: Copyright 2024 The Minder Authors +// SPDX-License-Identifier: Apache-2.0 package controlplane diff --git a/internal/controlplane/handlers_providers_test.go b/internal/controlplane/handlers_providers_test.go index 62e413528b..d55ddf0e03 100644 --- a/internal/controlplane/handlers_providers_test.go +++ b/internal/controlplane/handlers_providers_test.go @@ -1,16 +1,5 @@ -// Copyright 2024 Stacklok, 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. +// SPDX-FileCopyrightText: Copyright 2024 The Minder Authors +// SPDX-License-Identifier: Apache-2.0 package controlplane diff --git a/internal/controlplane/handlers_reconciliationtasks.go b/internal/controlplane/handlers_reconciliationtasks.go index 353ca34563..9a0148bcd7 100644 --- a/internal/controlplane/handlers_reconciliationtasks.go +++ b/internal/controlplane/handlers_reconciliationtasks.go @@ -1,16 +1,5 @@ -// Copyright 2024 Stacklok, 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. +// SPDX-FileCopyrightText: Copyright 2024 The Minder Authors +// SPDX-License-Identifier: Apache-2.0 package controlplane diff --git a/internal/controlplane/handlers_reconciliationtasks_test.go b/internal/controlplane/handlers_reconciliationtasks_test.go index 26af82f2f7..32a8424a78 100644 --- a/internal/controlplane/handlers_reconciliationtasks_test.go +++ b/internal/controlplane/handlers_reconciliationtasks_test.go @@ -1,16 +1,5 @@ -// Copyright 2024 Stacklok, 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. +// SPDX-FileCopyrightText: Copyright 2024 The Minder Authors +// SPDX-License-Identifier: Apache-2.0 package controlplane diff --git a/internal/controlplane/handlers_repositories.go b/internal/controlplane/handlers_repositories.go index 2cb342b650..db94c7b93c 100644 --- a/internal/controlplane/handlers_repositories.go +++ b/internal/controlplane/handlers_repositories.go @@ -1,16 +1,5 @@ -// Copyright 2024 Stacklok, 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. +// SPDX-FileCopyrightText: Copyright 2024 The Minder Authors +// SPDX-License-Identifier: Apache-2.0 package controlplane diff --git a/internal/controlplane/handlers_repositories_test.go b/internal/controlplane/handlers_repositories_test.go index dc696effa8..2417e6fb9c 100644 --- a/internal/controlplane/handlers_repositories_test.go +++ b/internal/controlplane/handlers_repositories_test.go @@ -1,16 +1,5 @@ -// Copyright 2023 Stacklok, 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. +// SPDX-FileCopyrightText: Copyright 2023 The Minder Authors +// SPDX-License-Identifier: Apache-2.0 package controlplane diff --git a/internal/controlplane/handlers_ruletype.go b/internal/controlplane/handlers_ruletype.go index 7afe761055..004d714c63 100644 --- a/internal/controlplane/handlers_ruletype.go +++ b/internal/controlplane/handlers_ruletype.go @@ -1,16 +1,5 @@ -// Copyright 2023 Stacklok, 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. +// SPDX-FileCopyrightText: Copyright 2023 The Minder Authors +// SPDX-License-Identifier: Apache-2.0 package controlplane diff --git a/internal/controlplane/handlers_ruletype_test.go b/internal/controlplane/handlers_ruletype_test.go index f0dc0ea5e9..acefebfbd9 100644 --- a/internal/controlplane/handlers_ruletype_test.go +++ b/internal/controlplane/handlers_ruletype_test.go @@ -1,17 +1,5 @@ -// -// Copyright 2024 Stacklok, 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. +// SPDX-FileCopyrightText: Copyright 2024 The Minder Authors +// SPDX-License-Identifier: Apache-2.0 package controlplane diff --git a/internal/controlplane/handlers_test.go b/internal/controlplane/handlers_test.go index 5a407eefb0..eeeb19b396 100644 --- a/internal/controlplane/handlers_test.go +++ b/internal/controlplane/handlers_test.go @@ -1,16 +1,5 @@ -// Copyright 2023 Stacklok, 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. +// SPDX-FileCopyrightText: Copyright 2023 The Minder Authors +// SPDX-License-Identifier: Apache-2.0 package controlplane diff --git a/internal/controlplane/handlers_token.go b/internal/controlplane/handlers_token.go index 045b2826d8..c97aad1e62 100644 --- a/internal/controlplane/handlers_token.go +++ b/internal/controlplane/handlers_token.go @@ -1,16 +1,5 @@ -// Copyright 2024 Stacklok, 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. +// SPDX-FileCopyrightText: Copyright 2024 The Minder Authors +// SPDX-License-Identifier: Apache-2.0 package controlplane diff --git a/internal/controlplane/handlers_user.go b/internal/controlplane/handlers_user.go index 0df28bce1f..7621f4fe23 100644 --- a/internal/controlplane/handlers_user.go +++ b/internal/controlplane/handlers_user.go @@ -1,16 +1,5 @@ -// Copyright 2023 Stacklok, 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. +// SPDX-FileCopyrightText: Copyright 2023 The Minder Authors +// SPDX-License-Identifier: Apache-2.0 package controlplane diff --git a/internal/controlplane/handlers_user_test.go b/internal/controlplane/handlers_user_test.go index a4a74dffb1..6823ef11c8 100644 --- a/internal/controlplane/handlers_user_test.go +++ b/internal/controlplane/handlers_user_test.go @@ -1,16 +1,5 @@ -// Copyright 2023 Stacklok, 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. +// SPDX-FileCopyrightText: Copyright 2023 The Minder Authors +// SPDX-License-Identifier: Apache-2.0 package controlplane diff --git a/internal/controlplane/identity_events.go b/internal/controlplane/identity_events.go index 6468fc6834..1773958e16 100644 --- a/internal/controlplane/identity_events.go +++ b/internal/controlplane/identity_events.go @@ -1,17 +1,5 @@ -// -// Copyright 2023 Stacklok, 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. +// SPDX-FileCopyrightText: Copyright 2023 The Minder Authors +// SPDX-License-Identifier: Apache-2.0 package controlplane diff --git a/internal/controlplane/identity_events_test.go b/internal/controlplane/identity_events_test.go index f8e0c161e7..e0c9b41cfd 100644 --- a/internal/controlplane/identity_events_test.go +++ b/internal/controlplane/identity_events_test.go @@ -1,16 +1,5 @@ -// Copyright 2023 Stacklok, 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. +// SPDX-FileCopyrightText: Copyright 2023 The Minder Authors +// SPDX-License-Identifier: Apache-2.0 package controlplane diff --git a/internal/controlplane/metrics/metrics.go b/internal/controlplane/metrics/metrics.go index 44cd6b1caf..b3618de7b2 100644 --- a/internal/controlplane/metrics/metrics.go +++ b/internal/controlplane/metrics/metrics.go @@ -1,17 +1,5 @@ -// -// Copyright 2024 Stacklok, 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. +// SPDX-FileCopyrightText: Copyright 2024 The Minder Authors +// SPDX-License-Identifier: Apache-2.0 // Package metrics defines the primitives available for the controlplane metrics package metrics diff --git a/internal/controlplane/metrics/noop.go b/internal/controlplane/metrics/noop.go index 17e73aaf09..ed55494aca 100644 --- a/internal/controlplane/metrics/noop.go +++ b/internal/controlplane/metrics/noop.go @@ -1,17 +1,5 @@ -// -// Copyright 2024 Stacklok, 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. +// SPDX-FileCopyrightText: Copyright 2024 The Minder Authors +// SPDX-License-Identifier: Apache-2.0 // Package metrics defines the primitives available for the controlplane metrics package metrics diff --git a/internal/controlplane/register_handlers.go b/internal/controlplane/register_handlers.go index 5e0c8cb9ad..10a1f9fc15 100644 --- a/internal/controlplane/register_handlers.go +++ b/internal/controlplane/register_handlers.go @@ -1,17 +1,5 @@ -// -// Copyright 2023 Stacklok, 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. +// SPDX-FileCopyrightText: Copyright 2023 The Minder Authors +// SPDX-License-Identifier: Apache-2.0 package controlplane diff --git a/internal/controlplane/server.go b/internal/controlplane/server.go index c107553cf8..31e3918f26 100644 --- a/internal/controlplane/server.go +++ b/internal/controlplane/server.go @@ -1,17 +1,5 @@ -// -// Copyright 2023 Stacklok, 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. +// SPDX-FileCopyrightText: Copyright 2023 The Minder Authors +// SPDX-License-Identifier: Apache-2.0 package controlplane diff --git a/internal/controlplane/server_test.go b/internal/controlplane/server_test.go index 017d2a5faf..4b757625f7 100644 --- a/internal/controlplane/server_test.go +++ b/internal/controlplane/server_test.go @@ -1,17 +1,5 @@ -// -// Copyright 2023 Stacklok, 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. +// SPDX-FileCopyrightText: Copyright 2023 The Minder Authors +// SPDX-License-Identifier: Apache-2.0 package controlplane diff --git a/internal/crypto/algorithms/aes256cfb.go b/internal/crypto/algorithms/aes256cfb.go index 16d7b6e10f..afa9cffd4e 100644 --- a/internal/crypto/algorithms/aes256cfb.go +++ b/internal/crypto/algorithms/aes256cfb.go @@ -1,16 +1,5 @@ -// Copyright 2024 Stacklok, 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. +// SPDX-FileCopyrightText: Copyright 2024 The Minder Authors +// SPDX-License-Identifier: Apache-2.0 package algorithms diff --git a/internal/crypto/algorithms/aes256cfb_test.go b/internal/crypto/algorithms/aes256cfb_test.go index 930a34feca..6e110adc9e 100644 --- a/internal/crypto/algorithms/aes256cfb_test.go +++ b/internal/crypto/algorithms/aes256cfb_test.go @@ -1,16 +1,5 @@ -// Copyright 2024 Stacklok, 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. +// SPDX-FileCopyrightText: Copyright 2024 The Minder Authors +// SPDX-License-Identifier: Apache-2.0 package algorithms_test diff --git a/internal/crypto/algorithms/aes256gcm.go b/internal/crypto/algorithms/aes256gcm.go index ec0d30d879..7f6b351ac2 100644 --- a/internal/crypto/algorithms/aes256gcm.go +++ b/internal/crypto/algorithms/aes256gcm.go @@ -1,16 +1,5 @@ -// Copyright 2024 Stacklok, 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. +// SPDX-FileCopyrightText: Copyright 2024 The Minder Authors +// SPDX-License-Identifier: Apache-2.0 // Adapted from: https://github.com/gtank/cryptopasta/blob/bc3a108a5776376aa811eea34b93383837994340/encrypt.go // cryptopasta - basic cryptography examples diff --git a/internal/crypto/algorithms/aes256gcm_test.go b/internal/crypto/algorithms/aes256gcm_test.go index 6ecad58073..0bd785b1d2 100644 --- a/internal/crypto/algorithms/aes256gcm_test.go +++ b/internal/crypto/algorithms/aes256gcm_test.go @@ -1,16 +1,5 @@ -// Copyright 2024 Stacklok, 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. +// SPDX-FileCopyrightText: Copyright 2024 The Minder Authors +// SPDX-License-Identifier: Apache-2.0 package algorithms_test diff --git a/internal/crypto/algorithms/algorithm.go b/internal/crypto/algorithms/algorithm.go index b96d4c146d..5c53db08f3 100644 --- a/internal/crypto/algorithms/algorithm.go +++ b/internal/crypto/algorithms/algorithm.go @@ -1,16 +1,5 @@ -// Copyright 2024 Stacklok, 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. +// SPDX-FileCopyrightText: Copyright 2024 The Minder Authors +// SPDX-License-Identifier: Apache-2.0 // Package algorithms contains implementations of various crypto algorithms // for the crypto engine. diff --git a/internal/crypto/engine.go b/internal/crypto/engine.go index a2210f6d20..1324d026d2 100644 --- a/internal/crypto/engine.go +++ b/internal/crypto/engine.go @@ -1,17 +1,5 @@ -// -// Copyright 2023 Stacklok, 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. +// SPDX-FileCopyrightText: Copyright 2023 The Minder Authors +// SPDX-License-Identifier: Apache-2.0 // Package crypto provides cryptographic functions package crypto diff --git a/internal/crypto/engine_test.go b/internal/crypto/engine_test.go index 2d510bd027..3712b7800e 100644 --- a/internal/crypto/engine_test.go +++ b/internal/crypto/engine_test.go @@ -1,17 +1,5 @@ -// -// Copyright 2023 Stacklok, 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. +// SPDX-FileCopyrightText: Copyright 2023 The Minder Authors +// SPDX-License-Identifier: Apache-2.0 package crypto diff --git a/internal/crypto/fuzz_test.go b/internal/crypto/fuzz_test.go index c0ae421127..dd05f58d39 100644 --- a/internal/crypto/fuzz_test.go +++ b/internal/crypto/fuzz_test.go @@ -1,17 +1,5 @@ -// -// Copyright 2024 Stacklok, 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. +// SPDX-FileCopyrightText: Copyright 2024 The Minder Authors +// SPDX-License-Identifier: Apache-2.0 package crypto diff --git a/internal/crypto/keystores/keystore.go b/internal/crypto/keystores/keystore.go index 623c891668..6499e886dd 100644 --- a/internal/crypto/keystores/keystore.go +++ b/internal/crypto/keystores/keystore.go @@ -1,16 +1,5 @@ -// Copyright 2024 Stacklok, 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. +// SPDX-FileCopyrightText: Copyright 2024 The Minder Authors +// SPDX-License-Identifier: Apache-2.0 // Package keystores contains logic for loading encryption keys from a keystores package keystores diff --git a/internal/crypto/keystores/keystore_test.go b/internal/crypto/keystores/keystore_test.go index 1dc0e09d25..781435e25f 100644 --- a/internal/crypto/keystores/keystore_test.go +++ b/internal/crypto/keystores/keystore_test.go @@ -1,16 +1,5 @@ -// Copyright 2024 Stacklok, 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. +// SPDX-FileCopyrightText: Copyright 2024 The Minder Authors +// SPDX-License-Identifier: Apache-2.0 package keystores_test diff --git a/internal/crypto/models.go b/internal/crypto/models.go index c4ec8718a8..a9359168eb 100644 --- a/internal/crypto/models.go +++ b/internal/crypto/models.go @@ -1,16 +1,5 @@ -// Copyright 2024 Stacklok, 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. +// SPDX-FileCopyrightText: Copyright 2024 The Minder Authors +// SPDX-License-Identifier: Apache-2.0 package crypto diff --git a/internal/crypto/nonce.go b/internal/crypto/nonce.go index d17ca6d2cc..26b05bef83 100644 --- a/internal/crypto/nonce.go +++ b/internal/crypto/nonce.go @@ -1,16 +1,5 @@ -// Copyright 2024 Stacklok, 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. +// SPDX-FileCopyrightText: Copyright 2024 The Minder Authors +// SPDX-License-Identifier: Apache-2.0 package crypto diff --git a/internal/crypto/nonce_test.go b/internal/crypto/nonce_test.go index 32ea2e1290..02626e5985 100644 --- a/internal/crypto/nonce_test.go +++ b/internal/crypto/nonce_test.go @@ -1,16 +1,5 @@ -// Copyright 2024 Stacklok, 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. +// SPDX-FileCopyrightText: Copyright 2024 The Minder Authors +// SPDX-License-Identifier: Apache-2.0 package crypto_test diff --git a/internal/db/domain.go b/internal/db/domain.go index 099862b905..9a8a5bd7ea 100644 --- a/internal/db/domain.go +++ b/internal/db/domain.go @@ -1,16 +1,5 @@ -// Copyright 2024 Stacklok, 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. +// SPDX-FileCopyrightText: Copyright 2024 The Minder Authors +// SPDX-License-Identifier: Apache-2.0 package db diff --git a/internal/db/embedded/testdb.go b/internal/db/embedded/testdb.go index 0331d9ce5a..157ce8d1ff 100644 --- a/internal/db/embedded/testdb.go +++ b/internal/db/embedded/testdb.go @@ -1,16 +1,5 @@ -// Copyright 2024 Stacklok, 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. +// SPDX-FileCopyrightText: Copyright 2024 The Minder Authors +// SPDX-License-Identifier: Apache-2.0 // Package embedded provides a test-only embedded Postgres database for testing queries. package embedded diff --git a/internal/db/entities_test.go b/internal/db/entities_test.go index 8f883132b4..e4df7fa27b 100644 --- a/internal/db/entities_test.go +++ b/internal/db/entities_test.go @@ -1,17 +1,5 @@ -// -// Copyright 2024 Stacklok, 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. +// SPDX-FileCopyrightText: Copyright 2024 The Minder Authors +// SPDX-License-Identifier: Apache-2.0 package db diff --git a/internal/db/entitlements_test.go b/internal/db/entitlements_test.go index 73ac4d96ad..2eb9ca14d5 100644 --- a/internal/db/entitlements_test.go +++ b/internal/db/entitlements_test.go @@ -1,17 +1,5 @@ -// -// Copyright 2023 Stacklok, 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. +// SPDX-FileCopyrightText: Copyright 2023 The Minder Authors +// SPDX-License-Identifier: Apache-2.0 package db diff --git a/internal/db/entity_execution_lock.sql_test.go b/internal/db/entity_execution_lock.sql_test.go index 0625a31cfb..abf0c2bbf2 100644 --- a/internal/db/entity_execution_lock.sql_test.go +++ b/internal/db/entity_execution_lock.sql_test.go @@ -1,17 +1,5 @@ -// -// Copyright 2023 Stacklok, 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. +// SPDX-FileCopyrightText: Copyright 2023 The Minder Authors +// SPDX-License-Identifier: Apache-2.0 package db diff --git a/internal/db/entity_helpers.go b/internal/db/entity_helpers.go index 1307f30d0f..0845d17cb8 100644 --- a/internal/db/entity_helpers.go +++ b/internal/db/entity_helpers.go @@ -1,17 +1,5 @@ -// -// Copyright 2024 Stacklok, 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. +// SPDX-FileCopyrightText: Copyright 2024 The Minder Authors +// SPDX-License-Identifier: Apache-2.0 package db diff --git a/internal/db/errors.go b/internal/db/errors.go index 9cbc69d50b..fdf9d5e3ff 100644 --- a/internal/db/errors.go +++ b/internal/db/errors.go @@ -1,16 +1,5 @@ -// Copyright 2023 Stacklok, 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. +// SPDX-FileCopyrightText: Copyright 2023 The Minder Authors +// SPDX-License-Identifier: Apache-2.0 package db diff --git a/internal/db/eval_history.sql.go b/internal/db/eval_history.sql.go index 9735f2b7dd..be29e52656 100644 --- a/internal/db/eval_history.sql.go +++ b/internal/db/eval_history.sql.go @@ -136,19 +136,8 @@ type GetLatestEvalStateForRuleEntityParams struct { EntityInstanceID uuid.UUID `json:"entity_instance_id"` } -// Copyright 2024 Stacklok, 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. +// SPDX-FileCopyrightText: Copyright 2024 The Minder Authors +// SPDX-License-Identifier: Apache-2.0 func (q *Queries) GetLatestEvalStateForRuleEntity(ctx context.Context, arg GetLatestEvalStateForRuleEntityParams) (EvaluationStatus, error) { row := q.db.QueryRowContext(ctx, getLatestEvalStateForRuleEntity, arg.RuleID, arg.EntityInstanceID) var i EvaluationStatus diff --git a/internal/db/eval_history_test.go b/internal/db/eval_history_test.go index a33d6a698b..55e4e80457 100644 --- a/internal/db/eval_history_test.go +++ b/internal/db/eval_history_test.go @@ -1,17 +1,5 @@ -// -// Copyright 2024 Stacklok, 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. +// SPDX-FileCopyrightText: Copyright 2024 The Minder Authors +// SPDX-License-Identifier: Apache-2.0 package db diff --git a/internal/db/fixtures/db.go b/internal/db/fixtures/db.go index 9fc15df7cd..9c7fef7486 100644 --- a/internal/db/fixtures/db.go +++ b/internal/db/fixtures/db.go @@ -1,16 +1,5 @@ -// Copyright 2024 Stacklok, Inc -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance cf.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. +// SPDX-FileCopyrightText: Copyright 2024 The Minder Authors +// SPDX-License-Identifier: Apache-2.0 // Package fixtures contains code for creating DB fixtures and is used in // various parts of the code. For testing use only. diff --git a/internal/db/main_test.go b/internal/db/main_test.go index 3ccbe32694..fa9f54d509 100644 --- a/internal/db/main_test.go +++ b/internal/db/main_test.go @@ -1,17 +1,5 @@ -// -// Copyright 2023 Stacklok, 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. +// SPDX-FileCopyrightText: Copyright 2023 The Minder Authors +// SPDX-License-Identifier: Apache-2.0 package db diff --git a/internal/db/organizations_test.go b/internal/db/organizations_test.go index 4cd9087b0b..096c090b14 100644 --- a/internal/db/organizations_test.go +++ b/internal/db/organizations_test.go @@ -1,17 +1,5 @@ -// -// Copyright 2023 Stacklok, 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. +// SPDX-FileCopyrightText: Copyright 2023 The Minder Authors +// SPDX-License-Identifier: Apache-2.0 package db diff --git a/internal/db/otel_test.go b/internal/db/otel_test.go index cc42c5b0f3..2a7bd8cba8 100644 --- a/internal/db/otel_test.go +++ b/internal/db/otel_test.go @@ -1,17 +1,5 @@ -// -// Copyright 2024 Stacklok, 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. +// SPDX-FileCopyrightText: Copyright 2024 The Minder Authors +// SPDX-License-Identifier: Apache-2.0 package db diff --git a/internal/db/profile_selector_scan.go b/internal/db/profile_selector_scan.go index 594bf36cdd..cb35c3ca0f 100644 --- a/internal/db/profile_selector_scan.go +++ b/internal/db/profile_selector_scan.go @@ -1,16 +1,5 @@ -// Copyright 2024 Stacklok, 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. +// SPDX-FileCopyrightText: Copyright 2024 The Minder Authors +// SPDX-License-Identifier: Apache-2.0 package db diff --git a/internal/db/profile_selector_scan_test.go b/internal/db/profile_selector_scan_test.go index 21a9a1ae77..c91fed1955 100644 --- a/internal/db/profile_selector_scan_test.go +++ b/internal/db/profile_selector_scan_test.go @@ -1,16 +1,5 @@ -// Copyright 2024 Stacklok, 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. +// SPDX-FileCopyrightText: Copyright 2024 The Minder Authors +// SPDX-License-Identifier: Apache-2.0 package db diff --git a/internal/db/projects_helpers.go b/internal/db/projects_helpers.go index cb275346b1..2397d4fd48 100644 --- a/internal/db/projects_helpers.go +++ b/internal/db/projects_helpers.go @@ -1,17 +1,5 @@ -// -// Copyright 2023 Stacklok, 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. +// SPDX-FileCopyrightText: Copyright 2023 The Minder Authors +// SPDX-License-Identifier: Apache-2.0 package db diff --git a/internal/db/projects_test.go b/internal/db/projects_test.go index 78c7a27543..a1183fd9d7 100644 --- a/internal/db/projects_test.go +++ b/internal/db/projects_test.go @@ -1,17 +1,5 @@ -// -// Copyright 2023 Stacklok, 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. +// SPDX-FileCopyrightText: Copyright 2023 The Minder Authors +// SPDX-License-Identifier: Apache-2.0 package db diff --git a/internal/db/provider_access_tokens_test.go b/internal/db/provider_access_tokens_test.go index a8772fe17a..b76097972d 100644 --- a/internal/db/provider_access_tokens_test.go +++ b/internal/db/provider_access_tokens_test.go @@ -1,17 +1,5 @@ -// -// Copyright 2023 Stacklok, 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. +// SPDX-FileCopyrightText: Copyright 2023 The Minder Authors +// SPDX-License-Identifier: Apache-2.0 package db diff --git a/internal/db/providers_test.go b/internal/db/providers_test.go index cd2750cef2..2d4ca7034d 100644 --- a/internal/db/providers_test.go +++ b/internal/db/providers_test.go @@ -1,17 +1,5 @@ -// -// Copyright 2023 Stacklok, 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. +// SPDX-FileCopyrightText: Copyright 2023 The Minder Authors +// SPDX-License-Identifier: Apache-2.0 package db diff --git a/internal/db/querier.go b/internal/db/querier.go index 4db7adf9b3..d4a4ba7472 100644 --- a/internal/db/querier.go +++ b/internal/db/querier.go @@ -119,19 +119,8 @@ type Querier interface { GetInvitationsByEmail(ctx context.Context, email string) ([]GetInvitationsByEmailRow, error) // GetInvitationsByEmailAndProject retrieves all invitations by email and project. GetInvitationsByEmailAndProject(ctx context.Context, arg GetInvitationsByEmailAndProjectParams) ([]GetInvitationsByEmailAndProjectRow, error) - // Copyright 2024 Stacklok, 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. + // SPDX-FileCopyrightText: Copyright 2024 The Minder Authors + // SPDX-License-Identifier: Apache-2.0 GetLatestEvalStateForRuleEntity(ctx context.Context, arg GetLatestEvalStateForRuleEntityParams) (EvaluationStatus, error) GetParentProjects(ctx context.Context, id uuid.UUID) ([]uuid.UUID, error) GetParentProjectsUntil(ctx context.Context, arg GetParentProjectsUntilParams) ([]uuid.UUID, error) @@ -246,38 +235,16 @@ type Querier interface { UpdateSelector(ctx context.Context, arg UpdateSelectorParams) (ProfileSelector, error) UpsertAccessToken(ctx context.Context, arg UpsertAccessTokenParams) (ProviderAccessToken, error) UpsertArtifact(ctx context.Context, arg UpsertArtifactParams) (Artifact, error) - // Copyright 2024 Stacklok, 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. + // SPDX-FileCopyrightText: Copyright 2024 The Minder Authors + // SPDX-License-Identifier: Apache-2.0 // Bundles -- UpsertBundle(ctx context.Context, arg UpsertBundleParams) error UpsertInstallationID(ctx context.Context, arg UpsertInstallationIDParams) (ProviderGithubAppInstallation, error) UpsertLatestEvaluationStatus(ctx context.Context, arg UpsertLatestEvaluationStatusParams) error UpsertProfileForEntity(ctx context.Context, arg UpsertProfileForEntityParams) (EntityProfile, error) UpsertProperty(ctx context.Context, arg UpsertPropertyParams) (Property, error) - // Copyright 2024 Stacklok, 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. + // SPDX-FileCopyrightText: Copyright 2024 The Minder Authors + // SPDX-License-Identifier: Apache-2.0 UpsertRuleInstance(ctx context.Context, arg UpsertRuleInstanceParams) (uuid.UUID, error) } diff --git a/internal/db/repositories_test.go b/internal/db/repositories_test.go index 1726fdde83..4d7666c1f0 100644 --- a/internal/db/repositories_test.go +++ b/internal/db/repositories_test.go @@ -1,17 +1,5 @@ -// -// Copyright 2023 Stacklok, 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. +// SPDX-FileCopyrightText: Copyright 2023 The Minder Authors +// SPDX-License-Identifier: Apache-2.0 package db diff --git a/internal/db/rule_instances.sql.go b/internal/db/rule_instances.sql.go index 1c0d72b0fe..813360ebdb 100644 --- a/internal/db/rule_instances.sql.go +++ b/internal/db/rule_instances.sql.go @@ -177,19 +177,8 @@ type UpsertRuleInstanceParams struct { ProjectID uuid.UUID `json:"project_id"` } -// Copyright 2024 Stacklok, 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. +// SPDX-FileCopyrightText: Copyright 2024 The Minder Authors +// SPDX-License-Identifier: Apache-2.0 func (q *Queries) UpsertRuleInstance(ctx context.Context, arg UpsertRuleInstanceParams) (uuid.UUID, error) { row := q.db.QueryRowContext(ctx, upsertRuleInstance, arg.ProfileID, diff --git a/internal/db/selectors_test.go b/internal/db/selectors_test.go index 645a969eca..de5bf892f0 100644 --- a/internal/db/selectors_test.go +++ b/internal/db/selectors_test.go @@ -1,17 +1,5 @@ -// -// Copyright 2024 Stacklok, 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. +// SPDX-FileCopyrightText: Copyright 2024 The Minder Authors +// SPDX-License-Identifier: Apache-2.0 package db diff --git a/internal/db/store.go b/internal/db/store.go index 5a9d6073be..21b36a62c5 100644 --- a/internal/db/store.go +++ b/internal/db/store.go @@ -1,17 +1,5 @@ -// -// Copyright 2023 Stacklok, 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. +// SPDX-FileCopyrightText: Copyright 2023 The Minder Authors +// SPDX-License-Identifier: Apache-2.0 package db diff --git a/internal/db/subscriptions.sql.go b/internal/db/subscriptions.sql.go index 10a3cba7fe..3b71d23290 100644 --- a/internal/db/subscriptions.sql.go +++ b/internal/db/subscriptions.sql.go @@ -107,19 +107,8 @@ type UpsertBundleParams struct { Name string `json:"name"` } -// Copyright 2024 Stacklok, 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. +// SPDX-FileCopyrightText: Copyright 2024 The Minder Authors +// SPDX-License-Identifier: Apache-2.0 // Bundles -- func (q *Queries) UpsertBundle(ctx context.Context, arg UpsertBundleParams) error { _, err := q.db.ExecContext(ctx, upsertBundle, arg.Namespace, arg.Name) diff --git a/internal/db/types.go b/internal/db/types.go index 4012e4114f..7be4e539cf 100644 --- a/internal/db/types.go +++ b/internal/db/types.go @@ -1,16 +1,5 @@ -// Copyright 2024 Stacklok, 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. +// SPDX-FileCopyrightText: Copyright 2024 The Minder Authors +// SPDX-License-Identifier: Apache-2.0 // PgTime/PgTimeArray is used to work around the pq driver's inability to map // TIMESTAMPZ[] to []time.Time without some hand holding. diff --git a/internal/db/users_test.go b/internal/db/users_test.go index e49ebd951e..eb4ce21d45 100644 --- a/internal/db/users_test.go +++ b/internal/db/users_test.go @@ -1,17 +1,5 @@ -// -// Copyright 2023 Stacklok, 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. +// SPDX-FileCopyrightText: Copyright 2023 The Minder Authors +// SPDX-License-Identifier: Apache-2.0 package db diff --git a/internal/db/validators.go b/internal/db/validators.go index 7da4fd1ca1..9885af5930 100644 --- a/internal/db/validators.go +++ b/internal/db/validators.go @@ -1,16 +1,5 @@ -// Copyright 2023 Stacklok, 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. +// SPDX-FileCopyrightText: Copyright 2023 The Minder Authors +// SPDX-License-Identifier: Apache-2.0 package db diff --git a/internal/eea/eea.go b/internal/eea/eea.go index eb34df774d..ab380ed35a 100644 --- a/internal/eea/eea.go +++ b/internal/eea/eea.go @@ -1,17 +1,5 @@ -// Copyright 2023 Stacklok, 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 rule provides the CLI subcommand for managing rules +// SPDX-FileCopyrightText: Copyright 2023 The Minder Authors +// SPDX-License-Identifier: Apache-2.0 // Package eea provides objects and event handlers for the EEA. EEA stands for // Event Execution Aggregator. The EEA is responsible for aggregating events diff --git a/internal/eea/eea_test.go b/internal/eea/eea_test.go index e827cb81a3..683a87a3d1 100644 --- a/internal/eea/eea_test.go +++ b/internal/eea/eea_test.go @@ -1,17 +1,5 @@ -// -// Copyright 2023 Stacklok, 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. +// SPDX-FileCopyrightText: Copyright 2023 The Minder Authors +// SPDX-License-Identifier: Apache-2.0 package eea_test diff --git a/internal/email/awsses/awsses.go b/internal/email/awsses/awsses.go index 456041e7e5..a17c178719 100644 --- a/internal/email/awsses/awsses.go +++ b/internal/email/awsses/awsses.go @@ -1,16 +1,5 @@ -// Copyright 2024 Stacklok, 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. +// SPDX-FileCopyrightText: Copyright 2024 The Minder Authors +// SPDX-License-Identifier: Apache-2.0 // Package awsses provides the email utilities for minder package awsses diff --git a/internal/email/email.go b/internal/email/email.go index 293d92ecd7..acbe0a0fd6 100644 --- a/internal/email/email.go +++ b/internal/email/email.go @@ -1,16 +1,5 @@ -// Copyright 2024 Stacklok, 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. +// SPDX-FileCopyrightText: Copyright 2024 The Minder Authors +// SPDX-License-Identifier: Apache-2.0 // Package email provides the email utilities for minder package email diff --git a/internal/email/noop/noop.go b/internal/email/noop/noop.go index 3fca454053..1f3474f78d 100644 --- a/internal/email/noop/noop.go +++ b/internal/email/noop/noop.go @@ -1,16 +1,5 @@ -// Copyright 2024 Stacklok, 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. +// SPDX-FileCopyrightText: Copyright 2024 The Minder Authors +// SPDX-License-Identifier: Apache-2.0 // Package noop provides a noop email utilities for minder package noop diff --git a/internal/email/template.go b/internal/email/template.go index 4294ab6271..5b1f41ca75 100644 --- a/internal/email/template.go +++ b/internal/email/template.go @@ -1,16 +1,5 @@ -// Copyright 2024 Stacklok, 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. +// SPDX-FileCopyrightText: Copyright 2024 The Minder Authors +// SPDX-License-Identifier: Apache-2.0 package email diff --git a/internal/engine/actions/actions.go b/internal/engine/actions/actions.go index ff22e9bf09..c68edabfce 100644 --- a/internal/engine/actions/actions.go +++ b/internal/engine/actions/actions.go @@ -1,17 +1,5 @@ -// Copyright 2023 Stacklok, 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 rule provides the CLI subcommand for managing rules +// SPDX-FileCopyrightText: Copyright 2023 The Minder Authors +// SPDX-License-Identifier: Apache-2.0 // Package actions provide necessary interfaces and implementations for // processing actions, such as remediation and alerts. diff --git a/internal/engine/actions/alert/alert.go b/internal/engine/actions/alert/alert.go index 8cd069adb6..83809c871a 100644 --- a/internal/engine/actions/alert/alert.go +++ b/internal/engine/actions/alert/alert.go @@ -1,17 +1,5 @@ -// Copyright 2023 Stacklok, 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 rule provides the CLI subcommand for managing rules +// SPDX-FileCopyrightText: Copyright 2023 The Minder Authors +// SPDX-License-Identifier: Apache-2.0 // Package alert provides necessary interfaces and implementations for // processing alerts. diff --git a/internal/engine/actions/alert/noop/noop.go b/internal/engine/actions/alert/noop/noop.go index dfab59055a..63b7b8f49e 100644 --- a/internal/engine/actions/alert/noop/noop.go +++ b/internal/engine/actions/alert/noop/noop.go @@ -1,16 +1,5 @@ -// Copyright 2023 Stacklok, 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. +// SPDX-FileCopyrightText: Copyright 2023 The Minder Authors +// SPDX-License-Identifier: Apache-2.0 // Package noop provides a fallback alert engine for cases where // no alert is set. diff --git a/internal/engine/actions/alert/security_advisory/security_advisory.go b/internal/engine/actions/alert/security_advisory/security_advisory.go index f39b90a701..2c0d94b77b 100644 --- a/internal/engine/actions/alert/security_advisory/security_advisory.go +++ b/internal/engine/actions/alert/security_advisory/security_advisory.go @@ -1,17 +1,5 @@ -// Copyright 2023 Stacklok, 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 rule provides the CLI subcommand for managing rules +// SPDX-FileCopyrightText: Copyright 2023 The Minder Authors +// SPDX-License-Identifier: Apache-2.0 // Package security_advisory provides necessary interfaces and implementations for // creating alerts of type security advisory. diff --git a/internal/engine/actions/alert/security_advisory/security_advisory_test.go b/internal/engine/actions/alert/security_advisory/security_advisory_test.go index bb9019c472..d253175630 100644 --- a/internal/engine/actions/alert/security_advisory/security_advisory_test.go +++ b/internal/engine/actions/alert/security_advisory/security_advisory_test.go @@ -1,17 +1,5 @@ -// Copyright 2024 Stacklok, 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 rule provides the CLI subcommand for managing rules +// SPDX-FileCopyrightText: Copyright 2024 The Minder Authors +// SPDX-License-Identifier: Apache-2.0 // Package security_advisory provides necessary interfaces and implementations for // creating alerts of type security advisory. diff --git a/internal/engine/actions/remediate/gh_branch_protect/gh_branch_protect.go b/internal/engine/actions/remediate/gh_branch_protect/gh_branch_protect.go index 110f033b5a..50d8f4a4d0 100644 --- a/internal/engine/actions/remediate/gh_branch_protect/gh_branch_protect.go +++ b/internal/engine/actions/remediate/gh_branch_protect/gh_branch_protect.go @@ -1,16 +1,5 @@ -// Copyright 2023 Stacklok, 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. +// SPDX-FileCopyrightText: Copyright 2023 The Minder Authors +// SPDX-License-Identifier: Apache-2.0 // Package gh_branch_protect provides the github branch protection remediation engine package gh_branch_protect diff --git a/internal/engine/actions/remediate/gh_branch_protect/gh_branch_protect_test.go b/internal/engine/actions/remediate/gh_branch_protect/gh_branch_protect_test.go index c95b3c58f9..888a90044d 100644 --- a/internal/engine/actions/remediate/gh_branch_protect/gh_branch_protect_test.go +++ b/internal/engine/actions/remediate/gh_branch_protect/gh_branch_protect_test.go @@ -1,16 +1,5 @@ -// Copyright 2023 Stacklok, 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. +// SPDX-FileCopyrightText: Copyright 2023 The Minder Authors +// SPDX-License-Identifier: Apache-2.0 // Package gh_branch_protect provides the github branch protection remediation engine package gh_branch_protect diff --git a/internal/engine/actions/remediate/noop/noop.go b/internal/engine/actions/remediate/noop/noop.go index 5ba6a5c7ae..82d09bc818 100644 --- a/internal/engine/actions/remediate/noop/noop.go +++ b/internal/engine/actions/remediate/noop/noop.go @@ -1,16 +1,5 @@ -// Copyright 2023 Stacklok, 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. +// SPDX-FileCopyrightText: Copyright 2023 The Minder Authors +// SPDX-License-Identifier: Apache-2.0 // Package noop provides a fallback remediation engine for cases where // no remediation is set. diff --git a/internal/engine/actions/remediate/pull_request/pull_request.go b/internal/engine/actions/remediate/pull_request/pull_request.go index 0aa33fdc04..9af941562d 100644 --- a/internal/engine/actions/remediate/pull_request/pull_request.go +++ b/internal/engine/actions/remediate/pull_request/pull_request.go @@ -1,16 +1,5 @@ -// Copyright 2023 Stacklok, 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. +// SPDX-FileCopyrightText: Copyright 2023 The Minder Authors +// SPDX-License-Identifier: Apache-2.0 // Package pull_request provides the pull request remediation engine package pull_request @@ -40,6 +29,7 @@ import ( "github.com/mindersec/minder/internal/profiles/models" "github.com/mindersec/minder/internal/util" pb "github.com/mindersec/minder/pkg/api/protobuf/go/minder/v1" + engifv1 "github.com/mindersec/minder/pkg/engine/v1/interfaces" provifv1 "github.com/mindersec/minder/pkg/providers/v1" ) @@ -85,7 +75,7 @@ type Remediator struct { } type paramsPR struct { - ingested *interfaces.Result + ingested *engifv1.Result repo *pb.Repository title string modifier fsModifier diff --git a/internal/engine/actions/remediate/pull_request/pull_request_test.go b/internal/engine/actions/remediate/pull_request/pull_request_test.go index 7f14d407be..58b4e4a505 100644 --- a/internal/engine/actions/remediate/pull_request/pull_request_test.go +++ b/internal/engine/actions/remediate/pull_request/pull_request_test.go @@ -1,16 +1,5 @@ -// Copyright 2023 Stacklok, 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. +// SPDX-FileCopyrightText: Copyright 2023 The Minder Authors +// SPDX-License-Identifier: Apache-2.0 // Package pull_request provides the pull request remediation engine package pull_request @@ -48,6 +37,7 @@ import ( "github.com/mindersec/minder/internal/providers/ratecache" "github.com/mindersec/minder/internal/providers/telemetry" pb "github.com/mindersec/minder/pkg/api/protobuf/go/minder/v1" + interfaces2 "github.com/mindersec/minder/pkg/engine/v1/interfaces" provifv1 "github.com/mindersec/minder/pkg/providers/v1" ) @@ -624,7 +614,7 @@ func TestPullRequestRemediate(t *testing.T) { require.NoError(t, err, "unexpected error creating test worktree") evalParams.SetIngestResult( - &interfaces.Result{ + &interfaces2.Result{ Fs: testWt.Filesystem, Storer: testrepo.Storer, }) diff --git a/internal/engine/actions/remediate/pull_request/types_actions_replace_tags.go b/internal/engine/actions/remediate/pull_request/types_actions_replace_tags.go index c74e75a5f5..e53b847b54 100644 --- a/internal/engine/actions/remediate/pull_request/types_actions_replace_tags.go +++ b/internal/engine/actions/remediate/pull_request/types_actions_replace_tags.go @@ -1,16 +1,5 @@ -// Copyright 2023 Stacklok, 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. +// SPDX-FileCopyrightText: Copyright 2023 The Minder Authors +// SPDX-License-Identifier: Apache-2.0 package pull_request diff --git a/internal/engine/actions/remediate/pull_request/types_content.go b/internal/engine/actions/remediate/pull_request/types_content.go index 388510d322..8c4d9ea4ea 100644 --- a/internal/engine/actions/remediate/pull_request/types_content.go +++ b/internal/engine/actions/remediate/pull_request/types_content.go @@ -1,16 +1,5 @@ -// Copyright 2023 Stacklok, 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. +// SPDX-FileCopyrightText: Copyright 2023 The Minder Authors +// SPDX-License-Identifier: Apache-2.0 // Package pull_request provides the pull request remediation engine package pull_request diff --git a/internal/engine/actions/remediate/pull_request/types_registry.go b/internal/engine/actions/remediate/pull_request/types_registry.go index b01dbdffc6..7a99de6d63 100644 --- a/internal/engine/actions/remediate/pull_request/types_registry.go +++ b/internal/engine/actions/remediate/pull_request/types_registry.go @@ -1,16 +1,5 @@ -// Copyright 2023 Stacklok, 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. +// SPDX-FileCopyrightText: Copyright 2023 The Minder Authors +// SPDX-License-Identifier: Apache-2.0 package pull_request diff --git a/internal/engine/actions/remediate/pull_request/write_helpers.go b/internal/engine/actions/remediate/pull_request/write_helpers.go index 53b1ad59fc..6710b4e56d 100644 --- a/internal/engine/actions/remediate/pull_request/write_helpers.go +++ b/internal/engine/actions/remediate/pull_request/write_helpers.go @@ -1,16 +1,5 @@ -// Copyright 2023 Stacklok, 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. +// SPDX-FileCopyrightText: Copyright 2023 The Minder Authors +// SPDX-License-Identifier: Apache-2.0 package pull_request diff --git a/internal/engine/actions/remediate/remediate.go b/internal/engine/actions/remediate/remediate.go index 3a2ec4a443..3367ab59ec 100644 --- a/internal/engine/actions/remediate/remediate.go +++ b/internal/engine/actions/remediate/remediate.go @@ -1,17 +1,5 @@ -// Copyright 2023 Stacklok, 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 rule provides the CLI subcommand for managing rules +// SPDX-FileCopyrightText: Copyright 2023 The Minder Authors +// SPDX-License-Identifier: Apache-2.0 // Package remediate provides necessary interfaces and implementations for // remediating rules. diff --git a/internal/engine/actions/remediate/remediate_test.go b/internal/engine/actions/remediate/remediate_test.go index f670623888..0c5b448e9a 100644 --- a/internal/engine/actions/remediate/remediate_test.go +++ b/internal/engine/actions/remediate/remediate_test.go @@ -1,17 +1,5 @@ -// Copyright 2023 Stacklok, 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 rule provides the CLI subcommand for managing rules +// SPDX-FileCopyrightText: Copyright 2023 The Minder Authors +// SPDX-License-Identifier: Apache-2.0 // Package remediate_test provides tests for the remediate package. package remediate_test diff --git a/internal/engine/actions/remediate/rest/rest.go b/internal/engine/actions/remediate/rest/rest.go index 512101008a..ec690c367f 100644 --- a/internal/engine/actions/remediate/rest/rest.go +++ b/internal/engine/actions/remediate/rest/rest.go @@ -1,16 +1,5 @@ -// Copyright 2023 Stacklok, 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. +// SPDX-FileCopyrightText: Copyright 2023 The Minder Authors +// SPDX-License-Identifier: Apache-2.0 // Package rest provides the REST remediation engine package rest diff --git a/internal/engine/actions/remediate/rest/rest_test.go b/internal/engine/actions/remediate/rest/rest_test.go index 4b53d15317..0e5fef3019 100644 --- a/internal/engine/actions/remediate/rest/rest_test.go +++ b/internal/engine/actions/remediate/rest/rest_test.go @@ -1,16 +1,5 @@ -// Copyright 2023 Stacklok, 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. +// SPDX-FileCopyrightText: Copyright 2023 The Minder Authors +// SPDX-License-Identifier: Apache-2.0 // Package rest provides tests for the REST remediation engine // we use the package rest directly because we need to test non-exported symbols diff --git a/internal/engine/doc.go b/internal/engine/doc.go index 67cda0d93b..b88e0a4e7f 100644 --- a/internal/engine/doc.go +++ b/internal/engine/doc.go @@ -1,17 +1,5 @@ -// Copyright 2023 Stacklok, 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 rule provides the CLI subcommand for managing rules +// SPDX-FileCopyrightText: Copyright 2023 The Minder Authors +// SPDX-License-Identifier: Apache-2.0 // Package engine provides an implementation of the profile-engine-related // objects, interfaces and functionality. diff --git a/internal/engine/engcontext/context.go b/internal/engine/engcontext/context.go index 829247500b..60d4b64175 100644 --- a/internal/engine/engcontext/context.go +++ b/internal/engine/engcontext/context.go @@ -1,16 +1,5 @@ -// Copyright 2023 Stacklok, 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. +// SPDX-FileCopyrightText: Copyright 2023 The Minder Authors +// SPDX-License-Identifier: Apache-2.0 // Package engcontext defines the EngineContext type. package engcontext diff --git a/internal/engine/entities/entities.go b/internal/engine/entities/entities.go index 6533796975..3f1e1eb8f2 100644 --- a/internal/engine/entities/entities.go +++ b/internal/engine/entities/entities.go @@ -1,17 +1,5 @@ -// Copyright 2023 Stacklok, 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 rule provides the CLI subcommand for managing rules +// SPDX-FileCopyrightText: Copyright 2023 The Minder Authors +// SPDX-License-Identifier: Apache-2.0 // Package entities contains internal helper functions to deal with, // validate and print the Entity protobuf enum. Mostly to interact diff --git a/internal/engine/entities/entity_event.go b/internal/engine/entities/entity_event.go index 96459c72dc..0ef6b4ebc8 100644 --- a/internal/engine/entities/entity_event.go +++ b/internal/engine/entities/entity_event.go @@ -1,16 +1,5 @@ -// Copyright 2023 Stacklok, 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. +// SPDX-FileCopyrightText: Copyright 2023 The Minder Authors +// SPDX-License-Identifier: Apache-2.0 package entities diff --git a/internal/engine/entities/entity_event_test.go b/internal/engine/entities/entity_event_test.go index b64dbf7551..e0542295cd 100644 --- a/internal/engine/entities/entity_event_test.go +++ b/internal/engine/entities/entity_event_test.go @@ -1,16 +1,5 @@ -// Copyright 2023 Stacklok, 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. +// SPDX-FileCopyrightText: Copyright 2023 The Minder Authors +// SPDX-License-Identifier: Apache-2.0 package entities diff --git a/internal/engine/errors/errors.go b/internal/engine/errors/errors.go index 66f11c7b7b..8ceb2d7307 100644 --- a/internal/engine/errors/errors.go +++ b/internal/engine/errors/errors.go @@ -1,17 +1,5 @@ -// Copyright 2023 Stacklok, 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 rule provides the CLI subcommand for managing rules +// SPDX-FileCopyrightText: Copyright 2023 The Minder Authors +// SPDX-License-Identifier: Apache-2.0 // Package errors provides errors for the evaluator engine package errors diff --git a/internal/engine/errors/errors_test.go b/internal/engine/errors/errors_test.go index 09110bd40c..57342a7808 100644 --- a/internal/engine/errors/errors_test.go +++ b/internal/engine/errors/errors_test.go @@ -1,16 +1,5 @@ -// Copyright 2024 Stacklok, 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. +// SPDX-FileCopyrightText: Copyright 2024 The Minder Authors +// SPDX-License-Identifier: Apache-2.0 package errors diff --git a/internal/engine/eval/eval.go b/internal/engine/eval/eval.go index fd219cfb70..6d13f6aca1 100644 --- a/internal/engine/eval/eval.go +++ b/internal/engine/eval/eval.go @@ -1,17 +1,5 @@ -// Copyright 2023 Stacklok, 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 rule provides the CLI subcommand for managing rules +// SPDX-FileCopyrightText: Copyright 2023 The Minder Authors +// SPDX-License-Identifier: Apache-2.0 // Package eval provides necessary interfaces and implementations for evaluating // rules. @@ -27,9 +15,9 @@ import ( "github.com/mindersec/minder/internal/engine/eval/rego" "github.com/mindersec/minder/internal/engine/eval/trusty" "github.com/mindersec/minder/internal/engine/eval/vulncheck" - engif "github.com/mindersec/minder/internal/engine/interfaces" eoptions "github.com/mindersec/minder/internal/engine/options" minderv1 "github.com/mindersec/minder/pkg/api/protobuf/go/minder/v1" + "github.com/mindersec/minder/pkg/engine/v1/interfaces" provinfv1 "github.com/mindersec/minder/pkg/providers/v1" ) @@ -39,7 +27,7 @@ func NewRuleEvaluator( ruletype *minderv1.RuleType, provider provinfv1.Provider, opts ...eoptions.Option, -) (engif.Evaluator, error) { +) (interfaces.Evaluator, error) { e := ruletype.Def.GetEval() if e == nil { return nil, fmt.Errorf("rule type missing eval configuration") diff --git a/internal/engine/eval/eval_test.go b/internal/engine/eval/eval_test.go index 4799f1e889..6939b479ce 100644 --- a/internal/engine/eval/eval_test.go +++ b/internal/engine/eval/eval_test.go @@ -1,17 +1,5 @@ -// Copyright 2023 Stacklok, 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 rule provides the CLI subcommand for managing rules +// SPDX-FileCopyrightText: Copyright 2023 The Minder Authors +// SPDX-License-Identifier: Apache-2.0 // Package eval provides necessary interfaces and implementations for evaluating // rules. diff --git a/internal/engine/eval/homoglyphs/application/homoglyphs_service.go b/internal/engine/eval/homoglyphs/application/homoglyphs_service.go index 61b3a69cc2..ba2b947f44 100644 --- a/internal/engine/eval/homoglyphs/application/homoglyphs_service.go +++ b/internal/engine/eval/homoglyphs/application/homoglyphs_service.go @@ -1,16 +1,5 @@ -// Copyright 2023 Stacklok, 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. +// SPDX-FileCopyrightText: Copyright 2023 The Minder Authors +// SPDX-License-Identifier: Apache-2.0 // Package application contains the application logic for the homoglyphs rule type package application @@ -24,10 +13,10 @@ import ( "github.com/mindersec/minder/internal/engine/eval/homoglyphs/communication" "github.com/mindersec/minder/internal/engine/eval/homoglyphs/domain" - engif "github.com/mindersec/minder/internal/engine/interfaces" eoptions "github.com/mindersec/minder/internal/engine/options" pbinternal "github.com/mindersec/minder/internal/proto" pb "github.com/mindersec/minder/pkg/api/protobuf/go/minder/v1" + "github.com/mindersec/minder/pkg/engine/v1/interfaces" provifv1 "github.com/mindersec/minder/pkg/providers/v1" ) @@ -45,7 +34,7 @@ func NewHomoglyphsEvaluator( reh *pb.RuleType_Definition_Eval_Homoglyphs, ghClient provifv1.GitHub, opts ...eoptions.Option, -) (engif.Evaluator, error) { +) (interfaces.Evaluator, error) { if ghClient == nil { return nil, fmt.Errorf("provider builder is nil") } @@ -70,7 +59,7 @@ func NewHomoglyphsEvaluator( func evaluateHomoglyphs( ctx context.Context, processor domain.HomoglyphProcessor, - res *engif.Result, + res *interfaces.Result, reviewHandler *communication.GhReviewPrHandler, ) ([]*domain.Violation, error) { // create an empty list of violations diff --git a/internal/engine/eval/homoglyphs/application/invisible_characters_eval.go b/internal/engine/eval/homoglyphs/application/invisible_characters_eval.go index 44366cb1d9..2cd9493e21 100644 --- a/internal/engine/eval/homoglyphs/application/invisible_characters_eval.go +++ b/internal/engine/eval/homoglyphs/application/invisible_characters_eval.go @@ -1,16 +1,5 @@ -// Copyright 2023 Stacklok, 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. +// SPDX-FileCopyrightText: Copyright 2023 The Minder Authors +// SPDX-License-Identifier: Apache-2.0 package application @@ -23,8 +12,8 @@ import ( "github.com/mindersec/minder/internal/engine/eval/homoglyphs/communication" "github.com/mindersec/minder/internal/engine/eval/homoglyphs/domain" "github.com/mindersec/minder/internal/engine/eval/templates" - engif "github.com/mindersec/minder/internal/engine/interfaces" eoptions "github.com/mindersec/minder/internal/engine/options" + "github.com/mindersec/minder/pkg/engine/v1/interfaces" provifv1 "github.com/mindersec/minder/pkg/providers/v1" ) @@ -59,7 +48,7 @@ func (ice *InvisibleCharactersEvaluator) Eval( ctx context.Context, _ map[string]any, _ protoreflect.ProtoMessage, - res *engif.Result, + res *interfaces.Result, ) error { violations, err := evaluateHomoglyphs(ctx, ice.processor, res, ice.reviewHandler) if err != nil { diff --git a/internal/engine/eval/homoglyphs/application/invisible_characters_eval_test.go b/internal/engine/eval/homoglyphs/application/invisible_characters_eval_test.go index fda7363be4..d08bb5153f 100644 --- a/internal/engine/eval/homoglyphs/application/invisible_characters_eval_test.go +++ b/internal/engine/eval/homoglyphs/application/invisible_characters_eval_test.go @@ -1,16 +1,5 @@ -// Copyright 2024 Stacklok, 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. +// SPDX-FileCopyrightText: Copyright 2024 The Minder Authors +// SPDX-License-Identifier: Apache-2.0 package application diff --git a/internal/engine/eval/homoglyphs/application/mixed_scripts_eval.go b/internal/engine/eval/homoglyphs/application/mixed_scripts_eval.go index c4615aecf6..68dffcf2a6 100644 --- a/internal/engine/eval/homoglyphs/application/mixed_scripts_eval.go +++ b/internal/engine/eval/homoglyphs/application/mixed_scripts_eval.go @@ -1,16 +1,5 @@ -// Copyright 2023 Stacklok, 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. +// SPDX-FileCopyrightText: Copyright 2023 The Minder Authors +// SPDX-License-Identifier: Apache-2.0 package application @@ -24,8 +13,8 @@ import ( "github.com/mindersec/minder/internal/engine/eval/homoglyphs/communication" "github.com/mindersec/minder/internal/engine/eval/homoglyphs/domain" "github.com/mindersec/minder/internal/engine/eval/templates" - engif "github.com/mindersec/minder/internal/engine/interfaces" eoptions "github.com/mindersec/minder/internal/engine/options" + "github.com/mindersec/minder/pkg/engine/v1/interfaces" provifv1 "github.com/mindersec/minder/pkg/providers/v1" ) @@ -65,7 +54,7 @@ func (mse *MixedScriptsEvaluator) Eval( ctx context.Context, _ map[string]any, _ protoreflect.ProtoMessage, - res *engif.Result, + res *interfaces.Result, ) error { violations, err := evaluateHomoglyphs(ctx, mse.processor, res, mse.reviewHandler) if err != nil { diff --git a/internal/engine/eval/homoglyphs/application/mixed_scripts_eval_test.go b/internal/engine/eval/homoglyphs/application/mixed_scripts_eval_test.go index 5011522b65..a294bbd7f2 100644 --- a/internal/engine/eval/homoglyphs/application/mixed_scripts_eval_test.go +++ b/internal/engine/eval/homoglyphs/application/mixed_scripts_eval_test.go @@ -1,16 +1,5 @@ -// Copyright 2024 Stacklok, 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. +// SPDX-FileCopyrightText: Copyright 2024 The Minder Authors +// SPDX-License-Identifier: Apache-2.0 package application diff --git a/internal/engine/eval/homoglyphs/communication/reviewer.go b/internal/engine/eval/homoglyphs/communication/reviewer.go index 8673bf3809..5cdf27a838 100644 --- a/internal/engine/eval/homoglyphs/communication/reviewer.go +++ b/internal/engine/eval/homoglyphs/communication/reviewer.go @@ -1,16 +1,5 @@ -// Copyright 2023 Stacklok, 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. +// SPDX-FileCopyrightText: Copyright 2023 The Minder Authors +// SPDX-License-Identifier: Apache-2.0 // Package communication contains the communication logic for the homoglyphs rule type package communication diff --git a/internal/engine/eval/homoglyphs/domain/homoglyph_processor.go b/internal/engine/eval/homoglyphs/domain/homoglyph_processor.go index f0217e934e..7856f06f9c 100644 --- a/internal/engine/eval/homoglyphs/domain/homoglyph_processor.go +++ b/internal/engine/eval/homoglyphs/domain/homoglyph_processor.go @@ -1,16 +1,5 @@ -// Copyright 2023 Stacklok, 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. +// SPDX-FileCopyrightText: Copyright 2023 The Minder Authors +// SPDX-License-Identifier: Apache-2.0 package domain diff --git a/internal/engine/eval/homoglyphs/domain/invisible_characters.go b/internal/engine/eval/homoglyphs/domain/invisible_characters.go index a4e3cab821..b1740cab9e 100644 --- a/internal/engine/eval/homoglyphs/domain/invisible_characters.go +++ b/internal/engine/eval/homoglyphs/domain/invisible_characters.go @@ -1,16 +1,5 @@ -// Copyright 2023 Stacklok, 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. +// SPDX-FileCopyrightText: Copyright 2023 The Minder Authors +// SPDX-License-Identifier: Apache-2.0 // Package domain contains the domain logic for the homoglyphs rule type package domain diff --git a/internal/engine/eval/homoglyphs/domain/invisible_characters_test.go b/internal/engine/eval/homoglyphs/domain/invisible_characters_test.go index ac4ba37d51..6862f938c0 100644 --- a/internal/engine/eval/homoglyphs/domain/invisible_characters_test.go +++ b/internal/engine/eval/homoglyphs/domain/invisible_characters_test.go @@ -1,16 +1,5 @@ -// Copyright 2023 Stacklok, 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. +// SPDX-FileCopyrightText: Copyright 2023 The Minder Authors +// SPDX-License-Identifier: Apache-2.0 package domain diff --git a/internal/engine/eval/homoglyphs/domain/mixed_scripts.go b/internal/engine/eval/homoglyphs/domain/mixed_scripts.go index a6fd1a2718..a59cb4a90b 100644 --- a/internal/engine/eval/homoglyphs/domain/mixed_scripts.go +++ b/internal/engine/eval/homoglyphs/domain/mixed_scripts.go @@ -1,16 +1,5 @@ -// Copyright 2023 Stacklok, 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. +// SPDX-FileCopyrightText: Copyright 2023 The Minder Authors +// SPDX-License-Identifier: Apache-2.0 package domain diff --git a/internal/engine/eval/homoglyphs/domain/mixed_scripts_test.go b/internal/engine/eval/homoglyphs/domain/mixed_scripts_test.go index 24fa050010..8e1beb068e 100644 --- a/internal/engine/eval/homoglyphs/domain/mixed_scripts_test.go +++ b/internal/engine/eval/homoglyphs/domain/mixed_scripts_test.go @@ -1,16 +1,5 @@ -// Copyright 2023 Stacklok, 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. +// SPDX-FileCopyrightText: Copyright 2023 The Minder Authors +// SPDX-License-Identifier: Apache-2.0 package domain diff --git a/internal/engine/eval/homoglyphs/domain/resources/invisible_characters_dictionary.go b/internal/engine/eval/homoglyphs/domain/resources/invisible_characters_dictionary.go index 17f7d0a324..f255d4cbd7 100644 --- a/internal/engine/eval/homoglyphs/domain/resources/invisible_characters_dictionary.go +++ b/internal/engine/eval/homoglyphs/domain/resources/invisible_characters_dictionary.go @@ -1,16 +1,5 @@ -// Copyright 2023 Stacklok, 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. +// SPDX-FileCopyrightText: Copyright 2023 The Minder Authors +// SPDX-License-Identifier: Apache-2.0 // Package resources contains resources used by the homoglyphs evaluators. package resources diff --git a/internal/engine/eval/homoglyphs/domain/violation.go b/internal/engine/eval/homoglyphs/domain/violation.go index 1f1ebb10b9..4d9c9769be 100644 --- a/internal/engine/eval/homoglyphs/domain/violation.go +++ b/internal/engine/eval/homoglyphs/domain/violation.go @@ -1,16 +1,5 @@ -// Copyright 2023 Stacklok, 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. +// SPDX-FileCopyrightText: Copyright 2023 The Minder Authors +// SPDX-License-Identifier: Apache-2.0 package domain diff --git a/internal/engine/eval/homoglyphs/util/gh_text_review.go b/internal/engine/eval/homoglyphs/util/gh_text_review.go index 76273181ab..82ee8552eb 100644 --- a/internal/engine/eval/homoglyphs/util/gh_text_review.go +++ b/internal/engine/eval/homoglyphs/util/gh_text_review.go @@ -1,16 +1,5 @@ -// Copyright 2023 Stacklok, 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. +// SPDX-FileCopyrightText: Copyright 2023 The Minder Authors +// SPDX-License-Identifier: Apache-2.0 // Package util contains utility functions for the homoglyphs evaluation engine package util diff --git a/internal/engine/eval/jq/fuzz_test.go b/internal/engine/eval/jq/fuzz_test.go index 0a3225b6ce..9cba4bea78 100644 --- a/internal/engine/eval/jq/fuzz_test.go +++ b/internal/engine/eval/jq/fuzz_test.go @@ -1,16 +1,5 @@ -// Copyright 2024 Stacklok, 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. +// SPDX-FileCopyrightText: Copyright 2024 The Minder Authors +// SPDX-License-Identifier: Apache-2.0 package jq_test @@ -19,8 +8,8 @@ import ( "testing" "github.com/mindersec/minder/internal/engine/eval/jq" - engif "github.com/mindersec/minder/internal/engine/interfaces" pb "github.com/mindersec/minder/pkg/api/protobuf/go/minder/v1" + "github.com/mindersec/minder/pkg/engine/v1/interfaces" ) func FuzzJqEval(f *testing.F) { @@ -49,6 +38,6 @@ func FuzzJqEval(f *testing.F) { } //nolint:gosec // Do not validate the return values so ignore them - jqe.Eval(context.Background(), pol, nil, &engif.Result{Object: obj}) + jqe.Eval(context.Background(), pol, nil, &interfaces.Result{Object: obj}) }) } diff --git a/internal/engine/eval/jq/jq.go b/internal/engine/eval/jq/jq.go index a2971254d5..19836f07f9 100644 --- a/internal/engine/eval/jq/jq.go +++ b/internal/engine/eval/jq/jq.go @@ -1,17 +1,5 @@ -// Copyright 2023 Stacklok, 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 rule provides the CLI subcommand for managing rules +// SPDX-FileCopyrightText: Copyright 2023 The Minder Authors +// SPDX-License-Identifier: Apache-2.0 // Package jq provides the jq profile evaluator package jq @@ -27,10 +15,10 @@ import ( evalerrors "github.com/mindersec/minder/internal/engine/errors" "github.com/mindersec/minder/internal/engine/eval/templates" - engif "github.com/mindersec/minder/internal/engine/interfaces" eoptions "github.com/mindersec/minder/internal/engine/options" "github.com/mindersec/minder/internal/util" pb "github.com/mindersec/minder/pkg/api/protobuf/go/minder/v1" + "github.com/mindersec/minder/pkg/engine/v1/interfaces" ) // Evaluator is an Evaluator that uses the jq library to evaluate rules @@ -82,7 +70,7 @@ func NewJQEvaluator( } // Eval calls the jq library to evaluate the rule -func (jqe *Evaluator) Eval(ctx context.Context, pol map[string]any, _ protoreflect.ProtoMessage, res *engif.Result) error { +func (jqe *Evaluator) Eval(ctx context.Context, pol map[string]any, _ protoreflect.ProtoMessage, res *interfaces.Result) error { if res.Object == nil { return fmt.Errorf("missing object") } diff --git a/internal/engine/eval/jq/jq_test.go b/internal/engine/eval/jq/jq_test.go index 785f3c6c4e..bd34977e76 100644 --- a/internal/engine/eval/jq/jq_test.go +++ b/internal/engine/eval/jq/jq_test.go @@ -1,17 +1,5 @@ -// Copyright 2023 Stacklok, 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 rule provides the CLI subcommand for managing rules +// SPDX-FileCopyrightText: Copyright 2023 The Minder Authors +// SPDX-License-Identifier: Apache-2.0 package jq_test @@ -26,8 +14,8 @@ import ( evalerrors "github.com/mindersec/minder/internal/engine/errors" "github.com/mindersec/minder/internal/engine/eval/jq" "github.com/mindersec/minder/internal/engine/eval/templates" - engif "github.com/mindersec/minder/internal/engine/interfaces" pb "github.com/mindersec/minder/pkg/api/protobuf/go/minder/v1" + "github.com/mindersec/minder/pkg/engine/v1/interfaces" ) func TestNewJQEvaluatorValid(t *testing.T) { @@ -378,7 +366,7 @@ func TestValidJQEvals(t *testing.T) { assert.NoError(t, err, "Got unexpected error") assert.NotNil(t, jqe, "Got unexpected nil") - err = jqe.Eval(context.Background(), tt.args.pol, nil, &engif.Result{Object: tt.args.obj}) + err = jqe.Eval(context.Background(), tt.args.pol, nil, &interfaces.Result{Object: tt.args.obj}) assert.NoError(t, err, "Got unexpected error") }) } @@ -588,7 +576,7 @@ func TestValidJQEvalsFailed(t *testing.T) { assert.NoError(t, err, "Got unexpected error") assert.NotNil(t, jqe, "Got unexpected nil") - err = jqe.Eval(context.Background(), tt.args.pol, nil, &engif.Result{Object: tt.args.obj}) + err = jqe.Eval(context.Background(), tt.args.pol, nil, &interfaces.Result{Object: tt.args.obj}) assert.ErrorIs(t, err, evalerrors.ErrEvaluationFailed, "Got unexpected error") }) } @@ -660,7 +648,7 @@ func TestInvalidJQEvals(t *testing.T) { assert.NoError(t, err, "Got unexpected error") assert.NotNil(t, jqe, "Got unexpected nil") - err = jqe.Eval(context.Background(), tt.args.pol, nil, &engif.Result{Object: tt.args.obj}) + err = jqe.Eval(context.Background(), tt.args.pol, nil, &interfaces.Result{Object: tt.args.obj}) assert.Error(t, err, "Got unexpected error") assert.NotErrorIs(t, err, evalerrors.ErrEvaluationFailed, "Got unexpected error") }) diff --git a/internal/engine/eval/pr_actions/actions.go b/internal/engine/eval/pr_actions/actions.go index 4086287c46..8ccc04de21 100644 --- a/internal/engine/eval/pr_actions/actions.go +++ b/internal/engine/eval/pr_actions/actions.go @@ -1,16 +1,5 @@ -// Copyright 2023 Stacklok, 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. +// SPDX-FileCopyrightText: Copyright 2023 The Minder Authors +// SPDX-License-Identifier: Apache-2.0 // Package pr_actions contains shared code to take on PRs package pr_actions diff --git a/internal/engine/eval/rego/config.go b/internal/engine/eval/rego/config.go index 69bd558a55..fa29c6ee7f 100644 --- a/internal/engine/eval/rego/config.go +++ b/internal/engine/eval/rego/config.go @@ -1,17 +1,5 @@ -// Copyright 2023 Stacklok, 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 rule provides the CLI subcommand for managing rules +// SPDX-FileCopyrightText: Copyright 2023 The Minder Authors +// SPDX-License-Identifier: Apache-2.0 package rego diff --git a/internal/engine/eval/rego/eval.go b/internal/engine/eval/rego/eval.go index 64067878b2..75e6f12b81 100644 --- a/internal/engine/eval/rego/eval.go +++ b/internal/engine/eval/rego/eval.go @@ -1,17 +1,5 @@ -// Copyright 2023 Stacklok, 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 rule provides the CLI subcommand for managing rules +// SPDX-FileCopyrightText: Copyright 2023 The Minder Authors +// SPDX-License-Identifier: Apache-2.0 // Package rego provides the rego rule evaluator package rego @@ -25,9 +13,9 @@ import ( "github.com/open-policy-agent/opa/topdown/print" "google.golang.org/protobuf/reflect/protoreflect" - engif "github.com/mindersec/minder/internal/engine/interfaces" eoptions "github.com/mindersec/minder/internal/engine/options" minderv1 "github.com/mindersec/minder/pkg/api/protobuf/go/minder/v1" + "github.com/mindersec/minder/pkg/engine/v1/interfaces" ) const ( @@ -117,7 +105,9 @@ func (e *Evaluator) newRegoFromOptions(opts ...func(*rego.Rego)) *rego.Rego { } // Eval implements the Evaluator interface. -func (e *Evaluator) Eval(ctx context.Context, pol map[string]any, entity protoreflect.ProtoMessage, res *engif.Result) error { +func (e *Evaluator) Eval( + ctx context.Context, pol map[string]any, entity protoreflect.ProtoMessage, res *interfaces.Result, +) error { // The rego engine is actually able to handle nil // objects quite gracefully, so we don't need to check // this explicitly. diff --git a/internal/engine/eval/rego/fuzz_test.go b/internal/engine/eval/rego/fuzz_test.go index 418c30254e..53fc19a16e 100644 --- a/internal/engine/eval/rego/fuzz_test.go +++ b/internal/engine/eval/rego/fuzz_test.go @@ -1,16 +1,5 @@ -// Copyright 2024 Stacklok, 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. +// SPDX-FileCopyrightText: Copyright 2024 The Minder Authors +// SPDX-License-Identifier: Apache-2.0 package rego @@ -18,8 +7,8 @@ import ( "context" "testing" - engif "github.com/mindersec/minder/internal/engine/interfaces" minderv1 "github.com/mindersec/minder/pkg/api/protobuf/go/minder/v1" + "github.com/mindersec/minder/pkg/engine/v1/interfaces" ) // FuzzRegoEval tests for unexpected behavior in e.Eval(). @@ -42,7 +31,7 @@ func FuzzRegoEval(f *testing.F) { // The fuzzer tests for unexpected behavior, so it is not // important what e.Eval() returns. //nolint:gosec // Ignore the return values from e.Eval() - e.Eval(context.Background(), emptyPol, nil, &engif.Result{ + e.Eval(context.Background(), emptyPol, nil, &interfaces.Result{ Object: map[string]any{ "data": data, }, diff --git a/internal/engine/eval/rego/lib.go b/internal/engine/eval/rego/lib.go index 7e36649adc..87b022ea5d 100644 --- a/internal/engine/eval/rego/lib.go +++ b/internal/engine/eval/rego/lib.go @@ -1,17 +1,5 @@ -// Copyright 2023 Stacklok, 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 rule provides the CLI subcommand for managing rules +// SPDX-FileCopyrightText: Copyright 2023 The Minder Authors +// SPDX-License-Identifier: Apache-2.0 package rego @@ -32,11 +20,11 @@ import ( "github.com/stacklok/frizbee/pkg/replacer" "github.com/stacklok/frizbee/pkg/utils/config" - engif "github.com/mindersec/minder/internal/engine/interfaces" + "github.com/mindersec/minder/pkg/engine/v1/interfaces" ) // MinderRegoLib contains the minder-specific functions for rego -var MinderRegoLib = []func(res *engif.Result) func(*rego.Rego){ +var MinderRegoLib = []func(res *interfaces.Result) func(*rego.Rego){ FileExists, FileLs, FileLsGlob, @@ -46,7 +34,7 @@ var MinderRegoLib = []func(res *engif.Result) func(*rego.Rego){ ListGithubActions, } -func instantiateRegoLib(res *engif.Result) []func(*rego.Rego) { +func instantiateRegoLib(res *interfaces.Result) []func(*rego.Rego) { var lib []func(*rego.Rego) for _, f := range MinderRegoLib { lib = append(lib, f(res)) @@ -58,7 +46,7 @@ func instantiateRegoLib(res *engif.Result) []func(*rego.Rego) { // in the filesystem being evaluated (which comes from the ingester). // It takes one argument, the path to the file to check. // It's exposed as `file.exists`. -func FileExists(res *engif.Result) func(*rego.Rego) { +func FileExists(res *interfaces.Result) func(*rego.Rego) { return rego.Function1( ®o.Function{ Name: "file.exists", @@ -93,7 +81,7 @@ func FileExists(res *engif.Result) func(*rego.Rego) { // FileRead is a rego function that reads a file from the filesystem // being evaluated (which comes from the ingester). It takes one argument, // the path to the file to read. It's exposed as `file.read`. -func FileRead(res *engif.Result) func(*rego.Rego) { +func FileRead(res *interfaces.Result) func(*rego.Rego) { return rego.Function1( ®o.Function{ Name: "file.read", @@ -138,7 +126,7 @@ func FileRead(res *engif.Result) func(*rego.Rego) { // If the file is a directory, it returns the files in the directory. // If the file is a symlink, it follows the symlink and returns the files // in the target. -func FileLs(res *engif.Result) func(*rego.Rego) { +func FileLs(res *interfaces.Result) func(*rego.Rego) { return rego.Function1( ®o.Function{ Name: "file.ls", @@ -208,7 +196,7 @@ func FileLs(res *engif.Result) func(*rego.Rego) { // in the filesystem being evaluated (which comes from the ingester). // It takes one argument, the path to the pattern to match. It's exposed // as `file.ls_glob`. -func FileLsGlob(res *engif.Result) func(*rego.Rego) { +func FileLsGlob(res *interfaces.Result) func(*rego.Rego) { return rego.Function1( ®o.Function{ Name: "file.ls_glob", @@ -247,7 +235,7 @@ func FileLsGlob(res *engif.Result) func(*rego.Rego) { // in the filesystem being evaluated (which comes from the ingester). // It takes one argument, the path to the directory to walk. It's exposed // as `file.walk`. -func FileWalk(res *engif.Result) func(*rego.Rego) { +func FileWalk(res *interfaces.Result) func(*rego.Rego) { return rego.Function1( ®o.Function{ Name: "file.walk", @@ -341,7 +329,7 @@ func fileLsHandleDir(path string, bfs billy.Filesystem) (*ast.Term, error) { // as `github_workflow.ls_actions`. // The function returns a set of strings, each string being the name of an action. // The frizbee library guarantees that the actions are unique. -func ListGithubActions(res *engif.Result) func(*rego.Rego) { +func ListGithubActions(res *interfaces.Result) func(*rego.Rego) { return rego.Function1( ®o.Function{ Name: "github_workflow.ls_actions", @@ -380,7 +368,7 @@ func ListGithubActions(res *engif.Result) func(*rego.Rego) { // in the filesystem being evaluated (which comes from the ingester). // It takes one argument, the path to the file to check. It's exposed // as `file.http_type`. -func FileHTTPType(res *engif.Result) func(*rego.Rego) { +func FileHTTPType(res *interfaces.Result) func(*rego.Rego) { return rego.Function1( ®o.Function{ Name: "file.http_type", diff --git a/internal/engine/eval/rego/lib_test.go b/internal/engine/eval/rego/lib_test.go index 3bb88bed18..8b3325fb28 100644 --- a/internal/engine/eval/rego/lib_test.go +++ b/internal/engine/eval/rego/lib_test.go @@ -1,17 +1,5 @@ -// Copyright 2023 Stacklok, 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 rule provides the CLI subcommand for managing rules +// SPDX-FileCopyrightText: Copyright 2023 The Minder Authors +// SPDX-License-Identifier: Apache-2.0 package rego_test @@ -24,8 +12,8 @@ import ( engerrors "github.com/mindersec/minder/internal/engine/errors" "github.com/mindersec/minder/internal/engine/eval/rego" - engif "github.com/mindersec/minder/internal/engine/interfaces" minderv1 "github.com/mindersec/minder/pkg/api/protobuf/go/minder/v1" + "github.com/mindersec/minder/pkg/engine/v1/interfaces" ) func TestFileExistsWithExistingFile(t *testing.T) { @@ -55,7 +43,7 @@ allow { emptyPol := map[string]any{} // Matches - err = e.Eval(context.Background(), emptyPol, nil, &engif.Result{ + err = e.Eval(context.Background(), emptyPol, nil, &interfaces.Result{ Object: nil, Fs: fs, }) @@ -84,7 +72,7 @@ allow { emptyPol := map[string]any{} - err = e.Eval(context.Background(), emptyPol, nil, &engif.Result{ + err = e.Eval(context.Background(), emptyPol, nil, &interfaces.Result{ Object: nil, Fs: fs, }) @@ -121,7 +109,7 @@ allow { emptyPol := map[string]any{} - err = e.Eval(context.Background(), emptyPol, nil, &engif.Result{ + err = e.Eval(context.Background(), emptyPol, nil, &interfaces.Result{ Object: nil, Fs: fs, }) @@ -158,7 +146,7 @@ allow { emptyPol := map[string]any{} - err = e.Eval(context.Background(), emptyPol, nil, &engif.Result{ + err = e.Eval(context.Background(), emptyPol, nil, &interfaces.Result{ Object: nil, Fs: fs, }) @@ -188,7 +176,7 @@ allow { emptyPol := map[string]any{} - err = e.Eval(context.Background(), emptyPol, nil, &engif.Result{ + err = e.Eval(context.Background(), emptyPol, nil, &interfaces.Result{ Object: nil, Fs: fs, }) @@ -220,7 +208,7 @@ allow { emptyPol := map[string]any{} - err = e.Eval(context.Background(), emptyPol, nil, &engif.Result{ + err = e.Eval(context.Background(), emptyPol, nil, &interfaces.Result{ Object: nil, Fs: fs, }) @@ -257,7 +245,7 @@ allow { emptyPol := map[string]any{} - err = e.Eval(context.Background(), emptyPol, nil, &engif.Result{ + err = e.Eval(context.Background(), emptyPol, nil, &interfaces.Result{ Object: nil, Fs: fs, }) @@ -294,7 +282,7 @@ allow { emptyPol := map[string]any{} - err = e.Eval(context.Background(), emptyPol, nil, &engif.Result{ + err = e.Eval(context.Background(), emptyPol, nil, &interfaces.Result{ Object: nil, Fs: fs, }) @@ -334,7 +322,7 @@ allow { emptyPol := map[string]any{} - err = e.Eval(context.Background(), emptyPol, nil, &engif.Result{ + err = e.Eval(context.Background(), emptyPol, nil, &interfaces.Result{ Object: nil, Fs: fs, }) @@ -377,7 +365,7 @@ allow { emptyPol := map[string]any{} - err = e.Eval(context.Background(), emptyPol, nil, &engif.Result{ + err = e.Eval(context.Background(), emptyPol, nil, &interfaces.Result{ Object: nil, Fs: fs, }) @@ -415,7 +403,7 @@ allow { emptyPol := map[string]any{} - err = e.Eval(context.Background(), emptyPol, nil, &engif.Result{ + err = e.Eval(context.Background(), emptyPol, nil, &interfaces.Result{ Object: nil, Fs: fs, }) @@ -512,7 +500,7 @@ allow { emptyPol := map[string]any{} - err = e.Eval(context.Background(), emptyPol, nil, &engif.Result{ + err = e.Eval(context.Background(), emptyPol, nil, &interfaces.Result{ Object: nil, Fs: fs, }) @@ -548,7 +536,7 @@ allow { emptyPol := map[string]any{} - err = e.Eval(context.Background(), emptyPol, nil, &engif.Result{ + err = e.Eval(context.Background(), emptyPol, nil, &interfaces.Result{ Object: nil, Fs: fs, }) @@ -583,7 +571,7 @@ allow { emptyPol := map[string]any{} - err = e.Eval(context.Background(), emptyPol, nil, &engif.Result{ + err = e.Eval(context.Background(), emptyPol, nil, &interfaces.Result{ Object: nil, Fs: fs, }) @@ -629,7 +617,7 @@ allow { emptyPol := map[string]any{} - err = e.Eval(context.Background(), emptyPol, nil, &engif.Result{ + err = e.Eval(context.Background(), emptyPol, nil, &interfaces.Result{ Object: nil, Fs: fs, }) @@ -665,7 +653,7 @@ allow { emptyPol := map[string]any{} - err = e.Eval(context.Background(), emptyPol, nil, &engif.Result{ + err = e.Eval(context.Background(), emptyPol, nil, &interfaces.Result{ Object: nil, Fs: fs, }) @@ -702,7 +690,7 @@ allow { emptyPol := map[string]any{} - err = e.Eval(context.Background(), emptyPol, nil, &engif.Result{ + err = e.Eval(context.Background(), emptyPol, nil, &interfaces.Result{ Object: nil, Fs: fs, }) @@ -752,7 +740,7 @@ allow { emptyPol := map[string]any{} - err = e.Eval(context.Background(), emptyPol, nil, &engif.Result{ + err = e.Eval(context.Background(), emptyPol, nil, &interfaces.Result{ Object: nil, Fs: fs, }) diff --git a/internal/engine/eval/rego/rego_test.go b/internal/engine/eval/rego/rego_test.go index 98e5add0cc..1e8477d86c 100644 --- a/internal/engine/eval/rego/rego_test.go +++ b/internal/engine/eval/rego/rego_test.go @@ -1,17 +1,5 @@ -// Copyright 2023 Stacklok, 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 rule provides the CLI subcommand for managing rules +// SPDX-FileCopyrightText: Copyright 2023 The Minder Authors +// SPDX-License-Identifier: Apache-2.0 package rego_test @@ -25,8 +13,8 @@ import ( engerrors "github.com/mindersec/minder/internal/engine/errors" "github.com/mindersec/minder/internal/engine/eval/rego" - engif "github.com/mindersec/minder/internal/engine/interfaces" minderv1 "github.com/mindersec/minder/pkg/api/protobuf/go/minder/v1" + "github.com/mindersec/minder/pkg/engine/v1/interfaces" ) // Evaluates a simple query against a simple profile @@ -55,7 +43,7 @@ allow { emptyPol := map[string]any{} // Matches - err = e.Eval(context.Background(), emptyPol, nil, &engif.Result{ + err = e.Eval(context.Background(), emptyPol, nil, &interfaces.Result{ Object: map[string]any{ "data": "foo", }, @@ -63,7 +51,7 @@ allow { require.NoError(t, err, "could not evaluate") // Doesn't match - err = e.Eval(context.Background(), emptyPol, nil, &engif.Result{ + err = e.Eval(context.Background(), emptyPol, nil, &interfaces.Result{ Object: map[string]any{ "data": "bar", }, @@ -97,7 +85,7 @@ skip { emptyPol := map[string]any{} // Doesn't match - err = e.Eval(context.Background(), emptyPol, nil, &engif.Result{ + err = e.Eval(context.Background(), emptyPol, nil, &interfaces.Result{ Object: map[string]any{ "data": "bar", }, @@ -125,7 +113,7 @@ violations[{"msg": msg}] { emptyPol := map[string]any{} // Matches - err = e.Eval(context.Background(), emptyPol, nil, &engif.Result{ + err = e.Eval(context.Background(), emptyPol, nil, &interfaces.Result{ Object: map[string]any{ "data": "foo", }, @@ -133,7 +121,7 @@ violations[{"msg": msg}] { require.NoError(t, err, "could not evaluate") // Doesn't match - err = e.Eval(context.Background(), emptyPol, nil, &engif.Result{ + err = e.Eval(context.Background(), emptyPol, nil, &interfaces.Result{ Object: map[string]any{ "data": "bar", }, @@ -167,7 +155,7 @@ violations[{"msg": msg}] { emptyPol := map[string]any{} - err = e.Eval(context.Background(), emptyPol, nil, &engif.Result{ + err = e.Eval(context.Background(), emptyPol, nil, &interfaces.Result{ Object: map[string]any{ "data": "foo", "datum": "bar", @@ -206,7 +194,7 @@ allow { } // Matches - err = e.Eval(context.Background(), pol, nil, &engif.Result{ + err = e.Eval(context.Background(), pol, nil, &interfaces.Result{ Object: map[string]any{ "data": "foo", }, @@ -214,7 +202,7 @@ allow { require.NoError(t, err, "could not evaluate") // Doesn't match - err = e.Eval(context.Background(), pol, nil, &engif.Result{ + err = e.Eval(context.Background(), pol, nil, &interfaces.Result{ Object: map[string]any{ "data": "bar", }, @@ -244,7 +232,7 @@ violations[{"msg": msg}] { } // Matches - err = e.Eval(context.Background(), pol, nil, &engif.Result{ + err = e.Eval(context.Background(), pol, nil, &interfaces.Result{ Object: map[string]any{ "data": "foo", }, @@ -252,7 +240,7 @@ violations[{"msg": msg}] { require.NoError(t, err, "could not evaluate") // Doesn't match - err = e.Eval(context.Background(), pol, nil, &engif.Result{ + err = e.Eval(context.Background(), pol, nil, &interfaces.Result{ Object: map[string]any{ "data": "bar", }, @@ -307,7 +295,7 @@ func TestConstraintsJSONOutput(t *testing.T) { "data": []string{"foo", "bar"}, } - err = e.Eval(context.Background(), pol, nil, &engif.Result{ + err = e.Eval(context.Background(), pol, nil, &interfaces.Result{ Object: map[string]any{ "data": []string{"foo", "bar", "baz"}, }, @@ -348,7 +336,7 @@ violations[{"msg": msg}] { "data": "foo", } - err = e.Eval(context.Background(), pol, nil, &engif.Result{ + err = e.Eval(context.Background(), pol, nil, &interfaces.Result{ Object: map[string]any{ "data": "bar", }, @@ -380,7 +368,7 @@ func TestOutputTypePassedIntoRule(t *testing.T) { "data": []string{"one", "two"}, } - err = e.Eval(context.Background(), pol, nil, &engif.Result{ + err = e.Eval(context.Background(), pol, nil, &interfaces.Result{ Object: map[string]any{ "data": []string{"two", "three"}, }, @@ -439,7 +427,7 @@ violations[{"msg": msg}] {`, require.NoError(t, err, "could not create evaluator") err = e.Eval(context.Background(), map[string]any{}, nil, - &engif.Result{Object: map[string]any{}}) + &interfaces.Result{Object: map[string]any{}}) assert.Error(t, err, "should have failed to evaluate") } @@ -463,6 +451,6 @@ violations[{"msg": msg}] { require.NoError(t, err, "could not create evaluator") err = e.Eval(context.Background(), map[string]any{}, nil, - &engif.Result{Object: map[string]any{}}) + &interfaces.Result{Object: map[string]any{}}) assert.Error(t, err, "should have failed to evaluate") } diff --git a/internal/engine/eval/rego/result.go b/internal/engine/eval/rego/result.go index 4aa171d266..fff26b5776 100644 --- a/internal/engine/eval/rego/result.go +++ b/internal/engine/eval/rego/result.go @@ -1,17 +1,5 @@ -// Copyright 2023 Stacklok, 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 rule provides the CLI subcommand for managing rules +// SPDX-FileCopyrightText: Copyright 2023 The Minder Authors +// SPDX-License-Identifier: Apache-2.0 package rego diff --git a/internal/engine/eval/rego/result_test.go b/internal/engine/eval/rego/result_test.go index 2f3744fd00..516f026474 100644 --- a/internal/engine/eval/rego/result_test.go +++ b/internal/engine/eval/rego/result_test.go @@ -1,16 +1,5 @@ -// Copyright 2024 Stacklok, 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. +// SPDX-FileCopyrightText: Copyright 2024 The Minder Authors +// SPDX-License-Identifier: Apache-2.0 package rego diff --git a/internal/engine/eval/templates/templates.go b/internal/engine/eval/templates/templates.go index 00c9be7204..fe654788f6 100644 --- a/internal/engine/eval/templates/templates.go +++ b/internal/engine/eval/templates/templates.go @@ -1,16 +1,5 @@ -// Copyright 2024 Stacklok, 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. +// SPDX-FileCopyrightText: Copyright 2024 The Minder Authors +// SPDX-License-Identifier: Apache-2.0 // Package templates contains template strings for evaluation details. package templates diff --git a/internal/engine/eval/trusty/actions.go b/internal/engine/eval/trusty/actions.go index debb491250..5396a65bea 100644 --- a/internal/engine/eval/trusty/actions.go +++ b/internal/engine/eval/trusty/actions.go @@ -1,16 +1,5 @@ -// Copyright 2023 Stacklok, 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. +// SPDX-FileCopyrightText: Copyright 2023 The Minder Authors +// SPDX-License-Identifier: Apache-2.0 // Package trusty provides an evaluator that uses the trusty API package trusty diff --git a/internal/engine/eval/trusty/actions_test.go b/internal/engine/eval/trusty/actions_test.go index 522917224d..2359049d62 100644 --- a/internal/engine/eval/trusty/actions_test.go +++ b/internal/engine/eval/trusty/actions_test.go @@ -1,16 +1,5 @@ -// Copyright 2023 Stacklok, 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. +// SPDX-FileCopyrightText: Copyright 2023 The Minder Authors +// SPDX-License-Identifier: Apache-2.0 // Package trusty provides an evaluator that uses the trusty API package trusty diff --git a/internal/engine/eval/trusty/config.go b/internal/engine/eval/trusty/config.go index c16508b489..bd84365013 100644 --- a/internal/engine/eval/trusty/config.go +++ b/internal/engine/eval/trusty/config.go @@ -1,16 +1,5 @@ -// Copyright 2023 Stacklok, 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. +// SPDX-FileCopyrightText: Copyright 2023 The Minder Authors +// SPDX-License-Identifier: Apache-2.0 // Package trusty provides an evaluator that uses the trusty API package trusty @@ -30,7 +19,32 @@ var ( // SummaryScore is the score to use for the summary score SummaryScore = "score" // DefaultScore is the default score to use - DefaultScore = "" + DefaultScore = "" + defaultAction = pr_actions.ActionReviewPr + defaultEcosystemConfig = []ecosystemConfig{ + { + Name: "npm", + Score: 5.0, + Provenance: 5.0, + Activity: 5.0, + AllowMalicious: false, + AllowDeprecated: false, + }, + { + Name: "pypi", + Score: 5.0, + Provenance: 5.0, + Activity: 5.0, + AllowDeprecated: false, + }, + { + Name: "go", + Score: 5.0, + Provenance: 5.0, + Activity: 5.0, + AllowDeprecated: false, + }, + } ) type ecosystemConfig struct { @@ -61,40 +75,19 @@ type config struct { EcosystemConfig []ecosystemConfig `json:"ecosystem_config" mapstructure:"ecosystem_config" validate:"required"` } -func defaultConfig() *config { - return &config{ - Action: pr_actions.ActionReviewPr, - EcosystemConfig: []ecosystemConfig{ - { - Name: "npm", - Score: 5.0, - Provenance: 5.0, - Activity: 5.0, - AllowMalicious: false, - AllowDeprecated: false, - }, - { - Name: "pypi", - Score: 5.0, - Provenance: 5.0, - Activity: 5.0, - AllowDeprecated: false, - }, - { - Name: "go", - Score: 5.0, - Provenance: 5.0, - Activity: 5.0, - AllowDeprecated: false, - }, - }, +func populateDefaultsIfEmpty(ruleCfg map[string]any) { + if ruleCfg["ecosystem_config"] == nil { + ruleCfg["ecosystem_config"] = defaultEcosystemConfig + } else if ecoCfg, ok := ruleCfg["ecosystem_config"].([]interface{}); ok && len(ecoCfg) == 0 { + ruleCfg["ecosystem_config"] = defaultEcosystemConfig + } + if ruleCfg["action"] == nil { + ruleCfg["action"] = defaultAction } } func parseConfig(ruleCfg map[string]any) (*config, error) { - if len(ruleCfg) == 0 { - return defaultConfig(), nil - } + populateDefaultsIfEmpty(ruleCfg) var conf config validate := validator.New(validator.WithRequiredStructEnabled()) diff --git a/internal/engine/eval/trusty/trusty.go b/internal/engine/eval/trusty/trusty.go index 399a6c2bfd..06bb6e1549 100644 --- a/internal/engine/eval/trusty/trusty.go +++ b/internal/engine/eval/trusty/trusty.go @@ -1,16 +1,5 @@ -// Copyright 2023 Stacklok, 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. +// SPDX-FileCopyrightText: Copyright 2023 The Minder Authors +// SPDX-License-Identifier: Apache-2.0 // Package trusty provides an evaluator that uses the trusty API package trusty @@ -29,9 +18,9 @@ import ( evalerrors "github.com/mindersec/minder/internal/engine/errors" "github.com/mindersec/minder/internal/engine/eval/pr_actions" "github.com/mindersec/minder/internal/engine/eval/templates" - engif "github.com/mindersec/minder/internal/engine/interfaces" eoptions "github.com/mindersec/minder/internal/engine/options" pbinternal "github.com/mindersec/minder/internal/proto" + "github.com/mindersec/minder/pkg/engine/v1/interfaces" provifv1 "github.com/mindersec/minder/pkg/providers/v1" ) @@ -94,7 +83,7 @@ func (e *Evaluator) Eval( ctx context.Context, pol map[string]any, _ protoreflect.ProtoMessage, - res *engif.Result, + res *interfaces.Result, ) error { // Extract the dependency list from the PR prDependencies, err := readPullRequestDependencies(res) @@ -172,7 +161,7 @@ func getEcosystemConfig( } // readPullRequestDependencies returns the dependencies found in theingestion results -func readPullRequestDependencies(res *engif.Result) (*pbinternal.PrDependencies, error) { +func readPullRequestDependencies(res *interfaces.Result) (*pbinternal.PrDependencies, error) { prdeps, ok := res.Object.(*pbinternal.PrDependencies) if !ok { return nil, fmt.Errorf("object type incompatible with the Trusty evaluator") diff --git a/internal/engine/eval/trusty/trusty_test.go b/internal/engine/eval/trusty/trusty_test.go index 0776968bd7..b9da915bc6 100644 --- a/internal/engine/eval/trusty/trusty_test.go +++ b/internal/engine/eval/trusty/trusty_test.go @@ -1,16 +1,5 @@ -// Copyright 2024 Stacklok, 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. +// SPDX-FileCopyrightText: Copyright 2024 The Minder Authors +// SPDX-License-Identifier: Apache-2.0 package trusty @@ -28,9 +17,9 @@ import ( evalerrors "github.com/mindersec/minder/internal/engine/errors" "github.com/mindersec/minder/internal/engine/eval/pr_actions" "github.com/mindersec/minder/internal/engine/eval/templates" - engif "github.com/mindersec/minder/internal/engine/interfaces" pbinternal "github.com/mindersec/minder/internal/proto" mock_github "github.com/mindersec/minder/internal/providers/github/mock" + "github.com/mindersec/minder/pkg/engine/v1/interfaces" provifv1 "github.com/mindersec/minder/pkg/providers/v1" ) @@ -172,7 +161,9 @@ func TestParseRuleConfig(t *testing.T) { }, { "invalid-config", map[string]any{ - "hey": "you", + "ecosystem_config": []string{ + "hey", + }, }, true, }, } { @@ -194,11 +185,11 @@ func TestReadPullRequestDependencies(t *testing.T) { t.Parallel() for _, tc := range []struct { name string - sut *engif.Result + sut *interfaces.Result mustErr bool }{ - {name: "normal", sut: &engif.Result{Object: &pbinternal.PrDependencies{}}, mustErr: false}, - {name: "invalid-object", sut: &engif.Result{Object: context.Background()}, mustErr: true}, + {name: "normal", sut: &interfaces.Result{Object: &pbinternal.PrDependencies{}}, mustErr: false}, + {name: "invalid-object", sut: &interfaces.Result{Object: context.Background()}, mustErr: true}, } { tc := tc t.Run(tc.name, func(t *testing.T) { @@ -608,3 +599,10 @@ func TestEvaluationDetailRendering(t *testing.T) { }) } } + +func defaultConfig() *config { + return &config{ + Action: defaultAction, + EcosystemConfig: defaultEcosystemConfig, + } +} diff --git a/internal/engine/eval/vulncheck/actions.go b/internal/engine/eval/vulncheck/actions.go index 44bfb334b6..cac5da4cb2 100644 --- a/internal/engine/eval/vulncheck/actions.go +++ b/internal/engine/eval/vulncheck/actions.go @@ -1,16 +1,5 @@ -// Copyright 2023 Stacklok, 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. +// SPDX-FileCopyrightText: Copyright 2023 The Minder Authors +// SPDX-License-Identifier: Apache-2.0 // Package vulncheck provides the vulnerability check evaluator package vulncheck diff --git a/internal/engine/eval/vulncheck/config.go b/internal/engine/eval/vulncheck/config.go index 540d8a2933..00fdc977a5 100644 --- a/internal/engine/eval/vulncheck/config.go +++ b/internal/engine/eval/vulncheck/config.go @@ -1,16 +1,5 @@ -// Copyright 2023 Stacklok, 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. +// SPDX-FileCopyrightText: Copyright 2023 The Minder Authors +// SPDX-License-Identifier: Apache-2.0 // Package vulncheck provides the vulnerability check evaluator package vulncheck @@ -30,6 +19,39 @@ type vulnDbType string const ( vulnDbTypeOsv vulnDbType = "osv" + defaultAction = pr_actions.ActionReviewPr +) + +var ( + defaultEcosystemConfig = []ecosystemConfig{ + { + Name: "npm", + DbType: vulnDbTypeOsv, + DbEndpoint: "https://api.osv.dev/v1/query", + PackageRepository: packageRepository{ + Url: "https://registry.npmjs.org", + }, + }, + { + Name: "pypi", + DbType: vulnDbTypeOsv, + DbEndpoint: "https://api.osv.dev/v1/query", + PackageRepository: packageRepository{ + Url: "https://pypi.org/pypi", + }, + }, + { + Name: "go", + DbType: vulnDbTypeOsv, + DbEndpoint: "https://api.osv.dev/v1/query", + PackageRepository: packageRepository{ + Url: "https://proxy.golang.org", + }, + SumRepository: packageRepository{ + Url: "https://sum.golang.org", + }, + }, + } ) type packageRepository struct { @@ -52,45 +74,20 @@ type config struct { EcosystemConfig []ecosystemConfig `json:"ecosystem_config" mapstructure:"ecosystem_config" validate:"required"` } -func defaultConfig() *config { - return &config{ - Action: pr_actions.ActionReviewPr, - EcosystemConfig: []ecosystemConfig{ - { - Name: "npm", - DbType: vulnDbTypeOsv, - DbEndpoint: "https://api.osv.dev/v1/query", - PackageRepository: packageRepository{ - Url: "https://registry.npmjs.org", - }, - }, - { - Name: "pypi", - DbType: vulnDbTypeOsv, - DbEndpoint: "https://api.osv.dev/v1/query", - PackageRepository: packageRepository{ - Url: "https://pypi.org/pypi", - }, - }, - { - Name: "go", - DbType: vulnDbTypeOsv, - DbEndpoint: "https://api.osv.dev/v1/query", - PackageRepository: packageRepository{ - Url: "https://proxy.golang.org", - }, - SumRepository: packageRepository{ - Url: "https://sum.golang.org", - }, - }, - }, +func populateDefaultsIfEmpty(ruleCfg map[string]any) { + if ruleCfg["ecosystem_config"] == nil { + ruleCfg["ecosystem_config"] = defaultEcosystemConfig + } else if ecoCfg, ok := ruleCfg["ecosystem_config"].([]interface{}); ok && len(ecoCfg) == 0 { + ruleCfg["ecosystem_config"] = defaultEcosystemConfig + } + + if ruleCfg["action"] == nil { + ruleCfg["action"] = defaultAction } } func parseConfig(ruleCfg map[string]any) (*config, error) { - if len(ruleCfg) == 0 { - return defaultConfig(), nil - } + populateDefaultsIfEmpty(ruleCfg) var conf config validate := validator.New(validator.WithRequiredStructEnabled()) diff --git a/internal/engine/eval/vulncheck/pkgdb.go b/internal/engine/eval/vulncheck/pkgdb.go index 5489e756eb..bcf7469394 100644 --- a/internal/engine/eval/vulncheck/pkgdb.go +++ b/internal/engine/eval/vulncheck/pkgdb.go @@ -1,16 +1,5 @@ -// Copyright 2023 Stacklok, 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. +// SPDX-FileCopyrightText: Copyright 2023 The Minder Authors +// SPDX-License-Identifier: Apache-2.0 // Package vulncheck provides the vulnerability check evaluator package vulncheck diff --git a/internal/engine/eval/vulncheck/pkgdb_test.go b/internal/engine/eval/vulncheck/pkgdb_test.go index c27eb855b8..d30b92404c 100644 --- a/internal/engine/eval/vulncheck/pkgdb_test.go +++ b/internal/engine/eval/vulncheck/pkgdb_test.go @@ -1,16 +1,5 @@ -// Copyright 2023 Stacklok, 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.role/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. +// SPDX-FileCopyrightText: Copyright 2023 The Minder Authors +// SPDX-License-Identifier: Apache-2.0 // Package vulncheck provides the vulnerability check evaluator package vulncheck diff --git a/internal/engine/eval/vulncheck/report.go b/internal/engine/eval/vulncheck/report.go index c8f3e13784..f5a60b2837 100644 --- a/internal/engine/eval/vulncheck/report.go +++ b/internal/engine/eval/vulncheck/report.go @@ -1,16 +1,5 @@ -// Copyright 2024 Stacklok, 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. +// SPDX-FileCopyrightText: Copyright 2024 The Minder Authors +// SPDX-License-Identifier: Apache-2.0 // Package vulncheck provides the vulnerability check evaluator package vulncheck diff --git a/internal/engine/eval/vulncheck/review.go b/internal/engine/eval/vulncheck/review.go index 376ec44c44..0427ff438f 100644 --- a/internal/engine/eval/vulncheck/review.go +++ b/internal/engine/eval/vulncheck/review.go @@ -1,16 +1,5 @@ -// Copyright 2023 Stacklok, 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. +// SPDX-FileCopyrightText: Copyright 2023 The Minder Authors +// SPDX-License-Identifier: Apache-2.0 // Package vulncheck provides the vulnerability check evaluator package vulncheck diff --git a/internal/engine/eval/vulncheck/review_test.go b/internal/engine/eval/vulncheck/review_test.go index 12962cb1f9..c0baf37c60 100644 --- a/internal/engine/eval/vulncheck/review_test.go +++ b/internal/engine/eval/vulncheck/review_test.go @@ -1,16 +1,5 @@ -// Copyright 2023 Stacklok, 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. +// SPDX-FileCopyrightText: Copyright 2023 The Minder Authors +// SPDX-License-Identifier: Apache-2.0 // Package vulncheck provides the vulnerability check evaluator package vulncheck diff --git a/internal/engine/eval/vulncheck/vulncheck.go b/internal/engine/eval/vulncheck/vulncheck.go index a7ac3488f0..2aeb637755 100644 --- a/internal/engine/eval/vulncheck/vulncheck.go +++ b/internal/engine/eval/vulncheck/vulncheck.go @@ -1,16 +1,5 @@ -// Copyright 2023 Stacklok, 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. +// SPDX-FileCopyrightText: Copyright 2023 The Minder Authors +// SPDX-License-Identifier: Apache-2.0 // Package vulncheck provides the vulnerability check evaluator package vulncheck @@ -28,10 +17,10 @@ import ( evalerrors "github.com/mindersec/minder/internal/engine/errors" "github.com/mindersec/minder/internal/engine/eval/templates" - engif "github.com/mindersec/minder/internal/engine/interfaces" eoptions "github.com/mindersec/minder/internal/engine/options" "github.com/mindersec/minder/internal/flags" pbinternal "github.com/mindersec/minder/internal/proto" + "github.com/mindersec/minder/pkg/engine/v1/interfaces" provifv1 "github.com/mindersec/minder/pkg/providers/v1" ) @@ -82,7 +71,7 @@ func (e *Evaluator) Eval( ctx context.Context, pol map[string]any, _ protoreflect.ProtoMessage, - res *engif.Result, + res *interfaces.Result, ) error { vulnerablePackages, err := e.getVulnerableDependencies(ctx, pol, res) if err != nil { @@ -111,7 +100,7 @@ func (e *Evaluator) Eval( // getVulnerableDependencies returns a slice containing vulnerable dependencies. // TODO: it would be nice if we could express this in rego over // `input.ingested.deps[_].dep`, rather than building this in to core. -func (e *Evaluator) getVulnerableDependencies(ctx context.Context, pol map[string]any, res *engif.Result) ([]string, error) { +func (e *Evaluator) getVulnerableDependencies(ctx context.Context, pol map[string]any, res *interfaces.Result) ([]string, error) { var vulnerablePackages []string prdeps, ok := res.Object.(*pbinternal.PrDependencies) diff --git a/internal/engine/eval/vulncheck/vulncheck_test.go b/internal/engine/eval/vulncheck/vulncheck_test.go index 78c7939585..3cd0871086 100644 --- a/internal/engine/eval/vulncheck/vulncheck_test.go +++ b/internal/engine/eval/vulncheck/vulncheck_test.go @@ -1,16 +1,5 @@ -// Copyright 2024 Stacklok, 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. +// SPDX-FileCopyrightText: Copyright 2024 The Minder Authors +// SPDX-License-Identifier: Apache-2.0 package vulncheck diff --git a/internal/engine/eval/vulncheck/vulndb.go b/internal/engine/eval/vulncheck/vulndb.go index db58fe0635..4164f61482 100644 --- a/internal/engine/eval/vulncheck/vulndb.go +++ b/internal/engine/eval/vulncheck/vulndb.go @@ -1,16 +1,5 @@ -// Copyright 2023 Stacklok, 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. +// SPDX-FileCopyrightText: Copyright 2023 The Minder Authors +// SPDX-License-Identifier: Apache-2.0 // Package vulncheck provides the vulnerability check evaluator package vulncheck diff --git a/internal/engine/eval/vulncheck/vulndb_test.go b/internal/engine/eval/vulncheck/vulndb_test.go index f500a19ad5..95a7fbec75 100644 --- a/internal/engine/eval/vulncheck/vulndb_test.go +++ b/internal/engine/eval/vulncheck/vulndb_test.go @@ -1,16 +1,5 @@ -// Copyright 2023 Stacklok, 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. +// SPDX-FileCopyrightText: Copyright 2023 The Minder Authors +// SPDX-License-Identifier: Apache-2.0 package vulncheck diff --git a/internal/engine/eval_status.go b/internal/engine/eval_status.go index bfcc672c32..f88d184b8b 100644 --- a/internal/engine/eval_status.go +++ b/internal/engine/eval_status.go @@ -1,16 +1,5 @@ -// Copyright 2023 Stacklok, 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. +// SPDX-FileCopyrightText: Copyright 2023 The Minder Authors +// SPDX-License-Identifier: Apache-2.0 package engine diff --git a/internal/engine/executor.go b/internal/engine/executor.go index f0be37d2ae..a58212995f 100644 --- a/internal/engine/executor.go +++ b/internal/engine/executor.go @@ -1,16 +1,5 @@ -// Copyright 2023 Stacklok, 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. +// SPDX-FileCopyrightText: Copyright 2023 The Minder Authors +// SPDX-License-Identifier: Apache-2.0 package engine @@ -197,7 +186,13 @@ func (e *executor) evaluateRule( if profileEvalStatus != nil { evalErr = profileEvalStatus } else { - evalErr = ruleEngine.Eval(ctx, inf, evalParams) + // enrich the logger with the entity type and execution ID + ctx := zerolog.Ctx(ctx).With(). + Str("entity_type", inf.Type.ToString()). + Str("execution_id", inf.ExecutionID.String()). + Logger().WithContext(ctx) + evalErr = ruleEngine.Eval(ctx, inf.Entity, evalParams.GetRule().Def, evalParams.GetRule().Params, evalParams) + } evalParams.SetEvalErr(evalErr) diff --git a/internal/engine/executor_test.go b/internal/engine/executor_test.go index 0ba64e8688..8d634585f5 100644 --- a/internal/engine/executor_test.go +++ b/internal/engine/executor_test.go @@ -1,16 +1,5 @@ -// Copyright 2023 Stacklok, 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. +// SPDX-FileCopyrightText: Copyright 2023 The Minder Authors +// SPDX-License-Identifier: Apache-2.0 package engine_test diff --git a/internal/engine/handler.go b/internal/engine/handler.go index d8ce5ab000..65d87612bf 100644 --- a/internal/engine/handler.go +++ b/internal/engine/handler.go @@ -1,16 +1,5 @@ -// Copyright 2024 Stacklok, 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. +// SPDX-FileCopyrightText: Copyright 2024 The Minder Authors +// SPDX-License-Identifier: Apache-2.0 package engine diff --git a/internal/engine/handler_test.go b/internal/engine/handler_test.go index 7180d1877a..2de330d9d3 100644 --- a/internal/engine/handler_test.go +++ b/internal/engine/handler_test.go @@ -1,16 +1,5 @@ -// Copyright 2023 Stacklok, 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. +// SPDX-FileCopyrightText: Copyright 2023 The Minder Authors +// SPDX-License-Identifier: Apache-2.0 package engine_test diff --git a/internal/engine/ingestcache/cache_test.go b/internal/engine/ingestcache/cache_test.go index 8000175e4e..c94465076a 100644 --- a/internal/engine/ingestcache/cache_test.go +++ b/internal/engine/ingestcache/cache_test.go @@ -1,16 +1,5 @@ -// Copyright 2023 Stacklok, 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. +// SPDX-FileCopyrightText: Copyright 2023 The Minder Authors +// SPDX-License-Identifier: Apache-2.0 package ingestcache_test @@ -26,15 +15,15 @@ import ( "github.com/mindersec/minder/internal/engine/ingester/diff" "github.com/mindersec/minder/internal/engine/ingester/git" "github.com/mindersec/minder/internal/engine/ingester/rest" - engif "github.com/mindersec/minder/internal/engine/interfaces" minderv1 "github.com/mindersec/minder/pkg/api/protobuf/go/minder/v1" + "github.com/mindersec/minder/pkg/engine/v1/interfaces" ) func TestCache(t *testing.T) { t.Parallel() type args struct { - in0 engif.Ingester + in0 interfaces.Ingester in1 protoreflect.ProtoMessage in2 map[string]any } @@ -126,7 +115,7 @@ func TestCache(t *testing.T) { _, ok := cache.Get(tt.args.in0, tt.args.in1, tt.args.in2) require.False(t, ok, "cache should be empty") - res := &engif.Result{ + res := &interfaces.Result{ Object: map[string]any{ "foo": "bar", }, @@ -150,7 +139,7 @@ func TestCache(t *testing.T) { _, ok := cache.Get(tt.args.in0, tt.args.in1, tt.args.in2) require.False(t, ok, "cache should be empty") - res := &engif.Result{ + res := &interfaces.Result{ Object: map[string]any{ "foo": "bar", }, diff --git a/internal/engine/ingestcache/ingestcache.go b/internal/engine/ingestcache/ingestcache.go index 470e82d815..7408473ec6 100644 --- a/internal/engine/ingestcache/ingestcache.go +++ b/internal/engine/ingestcache/ingestcache.go @@ -1,16 +1,5 @@ -// Copyright 2023 Stacklok, 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. +// SPDX-FileCopyrightText: Copyright 2023 The Minder Authors +// SPDX-License-Identifier: Apache-2.0 package ingestcache @@ -25,7 +14,7 @@ import ( "google.golang.org/protobuf/encoding/protojson" "google.golang.org/protobuf/reflect/protoreflect" - engif "github.com/mindersec/minder/internal/engine/interfaces" + "github.com/mindersec/minder/pkg/engine/v1/interfaces" ) // ErrBuildingCacheKey is the error returned when building a cache key fails @@ -33,22 +22,22 @@ var ErrBuildingCacheKey = errors.New("error building cache key") type cache struct { // cache is the actual cache - cache *xsync.MapOf[string, *engif.Result] + cache *xsync.MapOf[string, *interfaces.Result] } // NewCache returns a new cache func NewCache() Cache { return &cache{ - cache: xsync.NewMapOf[string, *engif.Result](), + cache: xsync.NewMapOf[string, *interfaces.Result](), } } // Get attempts to get a result from the cache func (c *cache) Get( - ingester engif.Ingester, + ingester interfaces.Ingester, entity protoreflect.ProtoMessage, params map[string]any, -) (*engif.Result, bool) { +) (*interfaces.Result, bool) { key, err := buildCacheKey(ingester, entity, params) if err != nil { // TODO we might want to log this @@ -61,10 +50,10 @@ func (c *cache) Get( // Set sets a result in the cache func (c *cache) Set( - ingester engif.Ingester, + ingester interfaces.Ingester, entity protoreflect.ProtoMessage, params map[string]any, - result *engif.Result, + result *interfaces.Result, ) { key, err := buildCacheKey(ingester, entity, params) if err != nil { @@ -77,7 +66,7 @@ func (c *cache) Set( } func buildCacheKey( - ingester engif.Ingester, + ingester interfaces.Ingester, entity protoreflect.ProtoMessage, ruleparams map[string]any, ) (string, error) { diff --git a/internal/engine/ingestcache/interface.go b/internal/engine/ingestcache/interface.go index 9d2f7f37af..455ea5ade5 100644 --- a/internal/engine/ingestcache/interface.go +++ b/internal/engine/ingestcache/interface.go @@ -1,16 +1,5 @@ -// Copyright 2023 Stacklok, 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. +// SPDX-FileCopyrightText: Copyright 2023 The Minder Authors +// SPDX-License-Identifier: Apache-2.0 // Package ingestcache a cache that is used to cache the results of ingesting data. // The intent is to reduce the number of calls to external services. @@ -19,11 +8,11 @@ package ingestcache import ( "google.golang.org/protobuf/reflect/protoreflect" - engif "github.com/mindersec/minder/internal/engine/interfaces" + "github.com/mindersec/minder/pkg/engine/v1/interfaces" ) // Cache is the interface for the ingest cache. type Cache interface { - Get(ingester engif.Ingester, entity protoreflect.ProtoMessage, params map[string]any) (*engif.Result, bool) - Set(ingester engif.Ingester, entity protoreflect.ProtoMessage, params map[string]any, result *engif.Result) + Get(ingester interfaces.Ingester, entity protoreflect.ProtoMessage, params map[string]any) (*interfaces.Result, bool) + Set(ingester interfaces.Ingester, entity protoreflect.ProtoMessage, params map[string]any, result *interfaces.Result) } diff --git a/internal/engine/ingestcache/noop.go b/internal/engine/ingestcache/noop.go index 5f1a62cca8..ed01c0239a 100644 --- a/internal/engine/ingestcache/noop.go +++ b/internal/engine/ingestcache/noop.go @@ -1,23 +1,12 @@ -// Copyright 2023 Stacklok, 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. +// SPDX-FileCopyrightText: Copyright 2023 The Minder Authors +// SPDX-License-Identifier: Apache-2.0 package ingestcache import ( "google.golang.org/protobuf/reflect/protoreflect" - engif "github.com/mindersec/minder/internal/engine/interfaces" + "github.com/mindersec/minder/pkg/engine/v1/interfaces" ) // NoopCache is the interface for the ingest cache. @@ -31,18 +20,18 @@ func NewNoopCache() Cache { // Get implements the Cache interface but does nothing func (*NoopCache) Get( - _ engif.Ingester, + _ interfaces.Ingester, _ protoreflect.ProtoMessage, _ map[string]any, -) (*engif.Result, bool) { +) (*interfaces.Result, bool) { return nil, false } // Set implements the Cache interface but does nothing func (*NoopCache) Set( - _ engif.Ingester, + _ interfaces.Ingester, _ protoreflect.ProtoMessage, _ map[string]any, - _ *engif.Result, + _ *interfaces.Result, ) { } diff --git a/internal/engine/ingester/artifact/artifact.go b/internal/engine/ingester/artifact/artifact.go index 86a32c97f7..946e8f4740 100644 --- a/internal/engine/ingester/artifact/artifact.go +++ b/internal/engine/ingester/artifact/artifact.go @@ -1,17 +1,5 @@ -// Copyright 2023 Stacklok, 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 rule provides the CLI subcommand for managing rules +// SPDX-FileCopyrightText: Copyright 2023 The Minder Authors +// SPDX-License-Identifier: Apache-2.0 // Package artifact provides the artifact ingestion engine package artifact @@ -27,13 +15,13 @@ import ( "google.golang.org/protobuf/proto" evalerrors "github.com/mindersec/minder/internal/engine/errors" - engif "github.com/mindersec/minder/internal/engine/interfaces" - "github.com/mindersec/minder/internal/entities/checkpoints" artif "github.com/mindersec/minder/internal/providers/artifact" "github.com/mindersec/minder/internal/verifier" "github.com/mindersec/minder/internal/verifier/sigstore/container" "github.com/mindersec/minder/internal/verifier/verifyif" pb "github.com/mindersec/minder/pkg/api/protobuf/go/minder/v1" + "github.com/mindersec/minder/pkg/engine/v1/interfaces" + "github.com/mindersec/minder/pkg/entities/v1/checkpoints" provifv1 "github.com/mindersec/minder/pkg/providers/v1" ) @@ -96,7 +84,7 @@ func (i *Ingest) Ingest( ctx context.Context, ent proto.Message, params map[string]any, -) (*engif.Result, error) { +) (*interfaces.Result, error) { cfg, err := configFromParams(params) if err != nil { return nil, err @@ -114,7 +102,7 @@ func (i *Ingest) Ingest( return nil, err } - return &engif.Result{ + return &interfaces.Result{ Object: applicable, // We would ideally return an artifact's digest here, but // the current state of the artifact ingester is actually evaluating diff --git a/internal/engine/ingester/artifact/artifact_test.go b/internal/engine/ingester/artifact/artifact_test.go index c0869191db..4b3d4356de 100644 --- a/internal/engine/ingester/artifact/artifact_test.go +++ b/internal/engine/ingester/artifact/artifact_test.go @@ -1,17 +1,5 @@ -// Copyright 2023 Stacklok, 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 rule provides the CLI subcommand for managing rules +// SPDX-FileCopyrightText: Copyright 2023 The Minder Authors +// SPDX-License-Identifier: Apache-2.0 package artifact diff --git a/internal/engine/ingester/artifact/config.go b/internal/engine/ingester/artifact/config.go index 5b4d20fbbb..3197d5a62d 100644 --- a/internal/engine/ingester/artifact/config.go +++ b/internal/engine/ingester/artifact/config.go @@ -1,17 +1,5 @@ -// Copyright 2023 Stacklok, 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 rule provides the CLI subcommand for managing rules +// SPDX-FileCopyrightText: Copyright 2023 The Minder Authors +// SPDX-License-Identifier: Apache-2.0 // Package artifact provides the artifact ingestion engine package artifact diff --git a/internal/engine/ingester/builtin/builtin.go b/internal/engine/ingester/builtin/builtin.go index c5c2d3b580..51bfb0166f 100644 --- a/internal/engine/ingester/builtin/builtin.go +++ b/internal/engine/ingester/builtin/builtin.go @@ -1,17 +1,5 @@ -// Copyright 2023 Stacklok, 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 rule provides the CLI subcommand for managing rules +// SPDX-FileCopyrightText: Copyright 2023 The Minder Authors +// SPDX-License-Identifier: Apache-2.0 // Package builtin provides the builtin ingestion engine package builtin @@ -28,10 +16,10 @@ import ( "google.golang.org/protobuf/reflect/protoreflect" evalerrors "github.com/mindersec/minder/internal/engine/errors" - engif "github.com/mindersec/minder/internal/engine/interfaces" - "github.com/mindersec/minder/internal/entities/checkpoints" "github.com/mindersec/minder/internal/util" pb "github.com/mindersec/minder/pkg/api/protobuf/go/minder/v1" + "github.com/mindersec/minder/pkg/engine/v1/interfaces" + "github.com/mindersec/minder/pkg/entities/v1/checkpoints" "github.com/mindersec/minder/pkg/rule_methods" ) @@ -73,7 +61,7 @@ func (idi *BuiltinRuleDataIngest) GetConfig() protoreflect.ProtoMessage { } // Ingest calls the builtin method and populates the data to be returned -func (idi *BuiltinRuleDataIngest) Ingest(ctx context.Context, ent protoreflect.ProtoMessage, params map[string]any) (*engif.Result, error) { +func (idi *BuiltinRuleDataIngest) Ingest(ctx context.Context, ent protoreflect.ProtoMessage, params map[string]any) (*interfaces.Result, error) { method, err := idi.ruleMethods.GetMethod(idi.method) if err != nil { return nil, fmt.Errorf("cannot get method: %w", err) @@ -110,7 +98,7 @@ func (idi *BuiltinRuleDataIngest) Ingest(ctx context.Context, ent protoreflect.P return nil, fmt.Errorf("cannot unmarshal json: %w", err) } - return &engif.Result{ + return &interfaces.Result{ Object: resultObj, Checkpoint: checkpoints.NewCheckpointV1Now(), }, nil diff --git a/internal/engine/ingester/builtin/builtin_test.go b/internal/engine/ingester/builtin/builtin_test.go index 4ed56c583f..47648dbdb0 100644 --- a/internal/engine/ingester/builtin/builtin_test.go +++ b/internal/engine/ingester/builtin/builtin_test.go @@ -1,17 +1,5 @@ -// Copyright 2023 Stacklok, 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 rule provides the CLI subcommand for managing rules +// SPDX-FileCopyrightText: Copyright 2023 The Minder Authors +// SPDX-License-Identifier: Apache-2.0 // Package builtin provides the builtin ingestion engine // this test is directly in the builtin package because it is testing the internals of the ingestor and setting diff --git a/internal/engine/ingester/diff/config.go b/internal/engine/ingester/diff/config.go index 9ab1e8ecb7..1873997823 100644 --- a/internal/engine/ingester/diff/config.go +++ b/internal/engine/ingester/diff/config.go @@ -1,16 +1,5 @@ -// Copyright 2023 Stacklok, 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. +// SPDX-FileCopyrightText: Copyright 2023 The Minder Authors +// SPDX-License-Identifier: Apache-2.0 // Package diff provides the diff rule data ingest engine package diff diff --git a/internal/engine/ingester/diff/diff.go b/internal/engine/ingester/diff/diff.go index 096814726f..a7623d39f5 100644 --- a/internal/engine/ingester/diff/diff.go +++ b/internal/engine/ingester/diff/diff.go @@ -1,16 +1,5 @@ -// Copyright 2023 Stacklok, 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. +// SPDX-FileCopyrightText: Copyright 2023 The Minder Authors +// SPDX-License-Identifier: Apache-2.0 // Package diff provides the diff rule data ingest engine package diff @@ -38,10 +27,10 @@ import ( "github.com/rs/zerolog" "google.golang.org/protobuf/reflect/protoreflect" - engif "github.com/mindersec/minder/internal/engine/interfaces" - "github.com/mindersec/minder/internal/entities/checkpoints" pbinternal "github.com/mindersec/minder/internal/proto" pb "github.com/mindersec/minder/pkg/api/protobuf/go/minder/v1" + "github.com/mindersec/minder/pkg/engine/v1/interfaces" + "github.com/mindersec/minder/pkg/entities/v1/checkpoints" provifv1 "github.com/mindersec/minder/pkg/providers/v1" ) @@ -94,7 +83,7 @@ func (di *Diff) Ingest( ctx context.Context, ent protoreflect.ProtoMessage, _ map[string]any, -) (*engif.Result, error) { +) (*interfaces.Result, error) { pr, ok := ent.(*pb.PullRequest) if !ok { return nil, fmt.Errorf("entity is not a pull request") @@ -122,7 +111,7 @@ func (di *Diff) Ingest( } } -func (di *Diff) getDepTypeDiff(ctx context.Context, prNumber int, pr *pb.PullRequest) (*engif.Result, error) { +func (di *Diff) getDepTypeDiff(ctx context.Context, prNumber int, pr *pb.PullRequest) (*interfaces.Result, error) { deps := pbinternal.PrDependencies{Pr: pr} page := 0 @@ -147,10 +136,10 @@ func (di *Diff) getDepTypeDiff(ctx context.Context, prNumber int, pr *pb.PullReq page = resp.NextPage } - return &engif.Result{Object: &deps, Checkpoint: checkpoints.NewCheckpointV1Now()}, nil + return &interfaces.Result{Object: &deps, Checkpoint: checkpoints.NewCheckpointV1Now()}, nil } -func (di *Diff) getFullTypeDiff(ctx context.Context, prNumber int, pr *pb.PullRequest) (*engif.Result, error) { +func (di *Diff) getFullTypeDiff(ctx context.Context, prNumber int, pr *pb.PullRequest) (*interfaces.Result, error) { diff := &pbinternal.PrContents{Pr: pr} page := 0 @@ -175,7 +164,7 @@ func (di *Diff) getFullTypeDiff(ctx context.Context, prNumber int, pr *pb.PullRe page = resp.NextPage } - return &engif.Result{Object: diff, Checkpoint: checkpoints.NewCheckpointV1Now()}, nil + return &interfaces.Result{Object: diff, Checkpoint: checkpoints.NewCheckpointV1Now()}, nil } func (di *Diff) ingestFileForDepDiff( @@ -207,7 +196,7 @@ func (di *Diff) ingestFileForDepDiff( return batchCtxDeps, nil } -func (di *Diff) getScalibrTypeDiff(ctx context.Context, _ int, pr *pb.PullRequest) (*engif.Result, error) { +func (di *Diff) getScalibrTypeDiff(ctx context.Context, _ int, pr *pb.PullRequest) (*interfaces.Result, error) { deps := pbinternal.PrDependencies{Pr: pr} // TODO: we should be able to just fetch the additional commits between base and target. @@ -241,7 +230,7 @@ func (di *Diff) getScalibrTypeDiff(ctx context.Context, _ int, pr *pb.PullReques } } - return &engif.Result{Object: &deps, Checkpoint: checkpoints.NewCheckpointV1Now()}, nil + return &interfaces.Result{Object: &deps, Checkpoint: checkpoints.NewCheckpointV1Now()}, nil } func inventorySorter(a *extractor.Inventory, b *extractor.Inventory) int { diff --git a/internal/engine/ingester/diff/diff_test.go b/internal/engine/ingester/diff/diff_test.go index 5012ae7100..0cebbc03c5 100644 --- a/internal/engine/ingester/diff/diff_test.go +++ b/internal/engine/ingester/diff/diff_test.go @@ -1,16 +1,5 @@ -// Copyright 2023 Stacklok, 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. +// SPDX-FileCopyrightText: Copyright 2023 The Minder Authors +// SPDX-License-Identifier: Apache-2.0 // Package diff provides the diff rule data ingest engine package diff diff --git a/internal/engine/ingester/diff/fuzz_test.go b/internal/engine/ingester/diff/fuzz_test.go index c2dd68134f..fd473f4110 100644 --- a/internal/engine/ingester/diff/fuzz_test.go +++ b/internal/engine/ingester/diff/fuzz_test.go @@ -1,16 +1,5 @@ -// Copyright 2024 Stacklok, 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. +// SPDX-FileCopyrightText: Copyright 2024 The Minder Authors +// SPDX-License-Identifier: Apache-2.0 package diff diff --git a/internal/engine/ingester/diff/parse.go b/internal/engine/ingester/diff/parse.go index 6fe18efcd1..d5e8221d84 100644 --- a/internal/engine/ingester/diff/parse.go +++ b/internal/engine/ingester/diff/parse.go @@ -1,16 +1,5 @@ -// Copyright 2023 Stacklok, 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. +// SPDX-FileCopyrightText: Copyright 2023 The Minder Authors +// SPDX-License-Identifier: Apache-2.0 // Package diff provides the diff rule data ingest engine package diff diff --git a/internal/engine/ingester/diff/parse_test.go b/internal/engine/ingester/diff/parse_test.go index 4624ed5172..c62cfebf47 100644 --- a/internal/engine/ingester/diff/parse_test.go +++ b/internal/engine/ingester/diff/parse_test.go @@ -1,16 +1,5 @@ -// Copyright 2023 Stacklok, 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. +// SPDX-FileCopyrightText: Copyright 2023 The Minder Authors +// SPDX-License-Identifier: Apache-2.0 // Package diff provides the diff rule data ingest engine package diff diff --git a/internal/engine/ingester/git/config.go b/internal/engine/ingester/git/config.go index bb42094fa5..92b7efe460 100644 --- a/internal/engine/ingester/git/config.go +++ b/internal/engine/ingester/git/config.go @@ -1,16 +1,5 @@ -// Copyright 2023 Stacklok, 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. +// SPDX-FileCopyrightText: Copyright 2023 The Minder Authors +// SPDX-License-Identifier: Apache-2.0 // Package git provides the git rule data ingest engine package git diff --git a/internal/engine/ingester/git/git.go b/internal/engine/ingester/git/git.go index bef15ed572..6a74700634 100644 --- a/internal/engine/ingester/git/git.go +++ b/internal/engine/ingester/git/git.go @@ -1,17 +1,5 @@ -// Copyright 2023 Stacklok, 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 rule provides the CLI subcommand for managing rules +// SPDX-FileCopyrightText: Copyright 2023 The Minder Authors +// SPDX-License-Identifier: Apache-2.0 // Package git provides the git rule data ingest engine package git @@ -25,9 +13,9 @@ import ( "google.golang.org/protobuf/reflect/protoreflect" engerrors "github.com/mindersec/minder/internal/engine/errors" - engif "github.com/mindersec/minder/internal/engine/interfaces" - "github.com/mindersec/minder/internal/entities/checkpoints" pb "github.com/mindersec/minder/pkg/api/protobuf/go/minder/v1" + "github.com/mindersec/minder/pkg/engine/v1/interfaces" + "github.com/mindersec/minder/pkg/entities/v1/checkpoints" provifv1 "github.com/mindersec/minder/pkg/providers/v1" ) @@ -70,7 +58,7 @@ func (gi *Git) GetConfig() protoreflect.ProtoMessage { } // Ingest does the actual data ingestion for a rule type by cloning a git repo -func (gi *Git) Ingest(ctx context.Context, ent protoreflect.ProtoMessage, params map[string]any) (*engif.Result, error) { +func (gi *Git) Ingest(ctx context.Context, ent protoreflect.ProtoMessage, params map[string]any) (*interfaces.Result, error) { userCfg := &IngesterConfig{} if err := mapstructure.Decode(params, userCfg); err != nil { return nil, fmt.Errorf("failed to read git ingester configuration from params: %w", err) @@ -114,7 +102,7 @@ func (gi *Git) Ingest(ctx context.Context, ent protoreflect.ProtoMessage, params WithBranch(branch). WithCommitHash(hsh.String()) - return &engif.Result{ + return &interfaces.Result{ Object: nil, Fs: wt.Filesystem, Storer: r.Storer, diff --git a/internal/engine/ingester/git/git_test.go b/internal/engine/ingester/git/git_test.go index c15b452d48..1c8373e91d 100644 --- a/internal/engine/ingester/git/git_test.go +++ b/internal/engine/ingester/git/git_test.go @@ -1,16 +1,5 @@ -// Copyright 2023 Stacklok, 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. +// SPDX-FileCopyrightText: Copyright 2023 The Minder Authors +// SPDX-License-Identifier: Apache-2.0 package git_test diff --git a/internal/engine/ingester/ingester.go b/internal/engine/ingester/ingester.go index 3fd3631aef..541f193d57 100644 --- a/internal/engine/ingester/ingester.go +++ b/internal/engine/ingester/ingester.go @@ -1,17 +1,5 @@ -// Copyright 2023 Stacklok, 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 rule provides the CLI subcommand for managing rules +// SPDX-FileCopyrightText: Copyright 2023 The Minder Authors +// SPDX-License-Identifier: Apache-2.0 // Package ingester provides necessary interfaces and implementations for ingesting // data for rules. @@ -26,20 +14,20 @@ import ( "github.com/mindersec/minder/internal/engine/ingester/diff" "github.com/mindersec/minder/internal/engine/ingester/git" "github.com/mindersec/minder/internal/engine/ingester/rest" - engif "github.com/mindersec/minder/internal/engine/interfaces" pb "github.com/mindersec/minder/pkg/api/protobuf/go/minder/v1" + "github.com/mindersec/minder/pkg/engine/v1/interfaces" provinfv1 "github.com/mindersec/minder/pkg/providers/v1" ) // test that the ingester implementations implements the interface // this would be probably nicer in the implementation file, but that would cause an import loop -var _ engif.Ingester = (*artifact.Ingest)(nil) -var _ engif.Ingester = (*builtin.BuiltinRuleDataIngest)(nil) -var _ engif.Ingester = (*rest.Ingestor)(nil) +var _ interfaces.Ingester = (*artifact.Ingest)(nil) +var _ interfaces.Ingester = (*builtin.BuiltinRuleDataIngest)(nil) +var _ interfaces.Ingester = (*rest.Ingestor)(nil) // NewRuleDataIngest creates a new rule data ingest based no the given rule // type definition. -func NewRuleDataIngest(rt *pb.RuleType, provider provinfv1.Provider) (engif.Ingester, error) { +func NewRuleDataIngest(rt *pb.RuleType, provider provinfv1.Provider) (interfaces.Ingester, error) { ing := rt.Def.GetIngest() switch ing.GetType() { diff --git a/internal/engine/ingester/ingester_test.go b/internal/engine/ingester/ingester_test.go index 1c628deb5e..f26359762b 100644 --- a/internal/engine/ingester/ingester_test.go +++ b/internal/engine/ingester/ingester_test.go @@ -1,17 +1,5 @@ -// Copyright 2023 Stacklok, 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 rule provides the CLI subcommand for managing rules +// SPDX-FileCopyrightText: Copyright 2023 The Minder Authors +// SPDX-License-Identifier: Apache-2.0 // Package ingester provides necessary interfaces and implementations for ingesting // data for rules. diff --git a/internal/engine/ingester/rest/rest.go b/internal/engine/ingester/rest/rest.go index c7b0431aaa..d09e249c8e 100644 --- a/internal/engine/ingester/rest/rest.go +++ b/internal/engine/ingester/rest/rest.go @@ -1,16 +1,5 @@ -// Copyright 2023 Stacklok, 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. +// SPDX-FileCopyrightText: Copyright 2023 The Minder Authors +// SPDX-License-Identifier: Apache-2.0 // Package rest provides the REST rule data ingest engine package rest @@ -29,10 +18,10 @@ import ( "github.com/rs/zerolog/log" "google.golang.org/protobuf/reflect/protoreflect" - engif "github.com/mindersec/minder/internal/engine/interfaces" - "github.com/mindersec/minder/internal/entities/checkpoints" "github.com/mindersec/minder/internal/util" pb "github.com/mindersec/minder/pkg/api/protobuf/go/minder/v1" + "github.com/mindersec/minder/pkg/engine/v1/interfaces" + "github.com/mindersec/minder/pkg/entities/v1/checkpoints" provifv1 "github.com/mindersec/minder/pkg/providers/v1" ) @@ -116,7 +105,9 @@ func (rdi *Ingestor) GetConfig() protoreflect.ProtoMessage { } // Ingest calls the REST endpoint and returns the data -func (rdi *Ingestor) Ingest(ctx context.Context, ent protoreflect.ProtoMessage, params map[string]any) (*engif.Result, error) { +func (rdi *Ingestor) Ingest( + ctx context.Context, ent protoreflect.ProtoMessage, params map[string]any, +) (*interfaces.Result, error) { retp := &EndpointTemplateParams{ Entity: ent, Params: params, @@ -154,7 +145,7 @@ func (rdi *Ingestor) Ingest(ctx context.Context, ent protoreflect.ProtoMessage, return nil, fmt.Errorf("cannot parse body: %w", err) } - return &engif.Result{ + return &interfaces.Result{ Object: data, Checkpoint: checkpoints.NewCheckpointV1Now().WithHTTP(endpoint, rdi.method), }, nil diff --git a/internal/engine/ingester/rest/rest_test.go b/internal/engine/ingester/rest/rest_test.go index 26f89fa405..39f9bdcdbf 100644 --- a/internal/engine/ingester/rest/rest_test.go +++ b/internal/engine/ingester/rest/rest_test.go @@ -1,17 +1,5 @@ -// Copyright 2023 Stacklok, 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 rule provides the CLI subcommand for managing rules +// SPDX-FileCopyrightText: Copyright 2023 The Minder Authors +// SPDX-License-Identifier: Apache-2.0 package rest @@ -29,7 +17,6 @@ import ( "google.golang.org/protobuf/proto" "google.golang.org/protobuf/reflect/protoreflect" - engif "github.com/mindersec/minder/internal/engine/interfaces" "github.com/mindersec/minder/internal/providers/credentials" "github.com/mindersec/minder/internal/providers/github/clients" "github.com/mindersec/minder/internal/providers/github/properties" @@ -37,6 +24,7 @@ import ( "github.com/mindersec/minder/internal/providers/telemetry" "github.com/mindersec/minder/internal/providers/testproviders" pb "github.com/mindersec/minder/pkg/api/protobuf/go/minder/v1" + "github.com/mindersec/minder/pkg/engine/v1/interfaces" provifv1 "github.com/mindersec/minder/pkg/providers/v1" ) @@ -188,7 +176,7 @@ func TestRestIngest(t *testing.T) { newIngArgs newRestIngestArgs ingArgs ingestArgs testHandler http.HandlerFunc - ingResultFn func() *engif.Result + ingResultFn func() *interfaces.Result wantErr bool }{ { @@ -217,13 +205,13 @@ func TestRestIngest(t *testing.T) { assert.NoError(t, err, "unexpected error writing response") writer.WriteHeader(http.StatusOK) }, - ingResultFn: func() *engif.Result { + ingResultFn: func() *interfaces.Result { var jReply any if err := json.NewDecoder(strings.NewReader(validProtectionReply)).Decode(&jReply); err != nil { return nil } - return &engif.Result{ + return &interfaces.Result{ Object: jReply, } }, @@ -259,13 +247,13 @@ func TestRestIngest(t *testing.T) { writer.WriteHeader(http.StatusNotFound) }, - ingResultFn: func() *engif.Result { + ingResultFn: func() *interfaces.Result { var jReply any if err := json.NewDecoder(strings.NewReader(notFoundReply)).Decode(&jReply); err != nil { return nil } - return &engif.Result{ + return &interfaces.Result{ Object: jReply, } }, diff --git a/internal/engine/interfaces/interface.go b/internal/engine/interfaces/interface.go index 1418d0ede6..ed4a08df43 100644 --- a/internal/engine/interfaces/interface.go +++ b/internal/engine/interfaces/interface.go @@ -1,17 +1,5 @@ -// Copyright 2023 Stacklok, 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 rule provides the CLI subcommand for managing rules +// SPDX-FileCopyrightText: Copyright 2023 The Minder Authors +// SPDX-License-Identifier: Apache-2.0 // Package interfaces provides necessary interfaces and implementations for // implementing engine plugins @@ -21,61 +9,16 @@ import ( "context" "encoding/json" - billy "github.com/go-git/go-billy/v5" - "github.com/go-git/go-git/v5/storage" "github.com/google/uuid" "github.com/rs/zerolog" "google.golang.org/protobuf/reflect/protoreflect" "github.com/mindersec/minder/internal/db" evalerrors "github.com/mindersec/minder/internal/engine/errors" - "github.com/mindersec/minder/internal/entities/checkpoints" "github.com/mindersec/minder/internal/profiles/models" + "github.com/mindersec/minder/pkg/engine/v1/interfaces" ) -// Ingester is the interface for a rule type ingester -type Ingester interface { - // Ingest does the actual data ingestion for a rule type - Ingest(ctx context.Context, ent protoreflect.ProtoMessage, params map[string]any) (*Result, error) - // GetType returns the type of the ingester - GetType() string - // GetConfig returns the config for the ingester - GetConfig() protoreflect.ProtoMessage -} - -// Evaluator is the interface for a rule type evaluator -type Evaluator interface { - Eval(ctx context.Context, profile map[string]any, entity protoreflect.ProtoMessage, res *Result) error -} - -// Result is the result of an ingester -type Result struct { - // Object is the object that was ingested. Normally comes from an external - // system like an HTTP server. - Object any - // Fs is the filesystem that was created as a result of the ingestion. This - // is normally used by the evaluator to do rule evaluation. The filesystem - // may be a git repo, or a memory filesystem. - Fs billy.Filesystem - // Storer is the git storer that was created as a result of the ingestion. - // FIXME: It might be cleaner to either wrap both Fs and Storer in a struct - // or pass out the git.Repository structure instead of the storer. - Storer storage.Storer - - // Checkpoint is the checkpoint at which the ingestion was done. This is - // used to persist the state of the entity at ingestion time. - Checkpoint *checkpoints.CheckpointEnvelopeV1 -} - -// GetCheckpoint returns the checkpoint of the result -func (r *Result) GetCheckpoint() *checkpoints.CheckpointEnvelopeV1 { - if r == nil { - return nil - } - - return r.Checkpoint -} - // ActionType represents the type of action, i.e., remediate, alert, etc. type ActionType string @@ -105,7 +48,7 @@ const ( // a repo and most profiles are expecting a repo, the RepoID parameter is mandatory. For entities // other than artifacts, the ArtifactID should be 0 that is translated to NULL in the database. type EvalStatusParams struct { - Result *Result + Result *interfaces.Result Profile *models.ProfileAggregate Rule *models.RuleInstance ProjectID uuid.UUID @@ -125,7 +68,7 @@ type EvalStatusParams struct { // Ensure EvalStatusParams implements the necessary interfaces var _ ActionsParams = (*EvalStatusParams)(nil) var _ EvalParamsReader = (*EvalStatusParams)(nil) -var _ EvalParamsReadWriter = (*EvalStatusParams)(nil) +var _ interfaces.ResultSink = (*EvalStatusParams)(nil) // GetEvalErr returns the evaluation error func (e *EvalStatusParams) GetEvalErr() error { @@ -197,12 +140,12 @@ func (e *EvalStatusParams) GetProfile() *models.ProfileAggregate { } // SetIngestResult sets the result of the ingestion for use later on in the actions -func (e *EvalStatusParams) SetIngestResult(res *Result) { +func (e *EvalStatusParams) SetIngestResult(res *interfaces.Result) { e.Result = res } // GetIngestResult returns the result of the ingestion, if any -func (e *EvalStatusParams) GetIngestResult() *Result { +func (e *EvalStatusParams) GetIngestResult() *interfaces.Result { return e.Result } @@ -223,18 +166,13 @@ func (e *EvalStatusParams) DecorateLogger(l zerolog.Logger) zerolog.Logger { // EvalParamsReader is the interface used for a rule type evaluator type EvalParamsReader interface { GetRule() *models.RuleInstance - GetIngestResult() *Result -} - -// EvalParamsReadWriter is the interface used for a rule type engine, allows setting the ingestion result -type EvalParamsReadWriter interface { - EvalParamsReader - SetIngestResult(*Result) + GetIngestResult() *interfaces.Result } // ActionsParams is the interface used for processing a rule type action type ActionsParams interface { EvalParamsReader + interfaces.ResultSink GetActionsOnOff() map[ActionType]models.ActionOpt GetActionsErr() evalerrors.ActionsError GetEvalErr() error diff --git a/internal/engine/metrics.go b/internal/engine/metrics.go index df0dda4a24..2b4c9c8ba2 100644 --- a/internal/engine/metrics.go +++ b/internal/engine/metrics.go @@ -1,16 +1,5 @@ -// Copyright 2023 Stacklok, 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. +// SPDX-FileCopyrightText: Copyright 2023 The Minder Authors +// SPDX-License-Identifier: Apache-2.0 package engine diff --git a/internal/engine/options/options.go b/internal/engine/options/options.go index a7e74b8f88..7e2ceb1353 100644 --- a/internal/engine/options/options.go +++ b/internal/engine/options/options.go @@ -1,16 +1,5 @@ -// Copyright 2024 Stacklok, 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. +// SPDX-FileCopyrightText: Copyright 2024 The Minder Authors +// SPDX-License-Identifier: Apache-2.0 // Package options provides necessary interfaces and implementations // for implementing evaluator configuration options. @@ -19,7 +8,7 @@ package options import ( "github.com/open-feature/go-sdk/openfeature" - "github.com/mindersec/minder/internal/engine/interfaces" + "github.com/mindersec/minder/pkg/engine/v1/interfaces" ) // SupportsFlags interface advertises the fact that the implementer diff --git a/internal/engine/rtengine/cache.go b/internal/engine/rtengine/cache.go index f122d2aeeb..3c67690e9d 100644 --- a/internal/engine/rtengine/cache.go +++ b/internal/engine/rtengine/cache.go @@ -1,16 +1,5 @@ -// Copyright 2024 Stacklok, 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. +// SPDX-FileCopyrightText: Copyright 2024 The Minder Authors +// SPDX-License-Identifier: Apache-2.0 package rtengine @@ -26,16 +15,17 @@ import ( "github.com/mindersec/minder/internal/engine/ingestcache" eoptions "github.com/mindersec/minder/internal/engine/options" "github.com/mindersec/minder/internal/ruletypes" + rtengine2 "github.com/mindersec/minder/pkg/engine/v1/rtengine" provinfv1 "github.com/mindersec/minder/pkg/providers/v1" ) // Cache contains a set of RuleTypeEngine instances type Cache interface { // GetRuleEngine retrieves the rule type engine instance for the specified rule type - GetRuleEngine(context.Context, uuid.UUID) (*RuleTypeEngine, error) + GetRuleEngine(context.Context, uuid.UUID) (*rtengine2.RuleTypeEngine, error) } -type cacheType = map[uuid.UUID]*RuleTypeEngine +type cacheType = map[uuid.UUID]*rtengine2.RuleTypeEngine type ruleEngineCache struct { store db.Store @@ -86,7 +76,7 @@ func NewRuleEngineCache( return &ruleEngineCache{engines: engines, opts: opts}, nil } -func (r *ruleEngineCache) GetRuleEngine(ctx context.Context, ruleTypeID uuid.UUID) (*RuleTypeEngine, error) { +func (r *ruleEngineCache) GetRuleEngine(ctx context.Context, ruleTypeID uuid.UUID) (*rtengine2.RuleTypeEngine, error) { if ruleTypeEngine, ok := r.engines[ruleTypeID]; ok { return ruleTypeEngine, nil } @@ -124,7 +114,7 @@ func cacheRuleEngine( ingestCache ingestcache.Cache, engineCache cacheType, opts ...eoptions.Option, -) (*RuleTypeEngine, error) { +) (*rtengine2.RuleTypeEngine, error) { // Parse the rule type pbRuleType, err := ruletypes.RuleTypePBFromDB(ruleType) if err != nil { @@ -132,7 +122,7 @@ func cacheRuleEngine( } // Create the rule type engine - ruleEngine, err := NewRuleTypeEngine(ctx, pbRuleType, provider, opts...) + ruleEngine, err := rtengine2.NewRuleTypeEngine(ctx, pbRuleType, provider, opts...) if err != nil { return nil, fmt.Errorf("error creating rule type engine: %w", err) } diff --git a/internal/engine/rtengine/cache_test.go b/internal/engine/rtengine/cache_test.go index 1a0369953f..8fec738e45 100644 --- a/internal/engine/rtengine/cache_test.go +++ b/internal/engine/rtengine/cache_test.go @@ -1,16 +1,5 @@ -// Copyright 2024 Stacklok, 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. +// SPDX-FileCopyrightText: Copyright 2024 The Minder Authors +// SPDX-License-Identifier: Apache-2.0 package rtengine @@ -28,6 +17,7 @@ import ( dbf "github.com/mindersec/minder/internal/db/fixtures" "github.com/mindersec/minder/internal/engine/ingestcache" "github.com/mindersec/minder/internal/providers/testproviders" + rtengine2 "github.com/mindersec/minder/pkg/engine/v1/rtengine" ) func TestGetRuleEngine(t *testing.T) { @@ -41,7 +31,7 @@ func TestGetRuleEngine(t *testing.T) { }{ { Name: "Retrieves rule engine from cache", - Cache: cacheType{ruleTypeID: &RuleTypeEngine{}}, + Cache: cacheType{ruleTypeID: &rtengine2.RuleTypeEngine{}}, }, { Name: "Returns error when rule type does not exist", diff --git a/internal/engine/rtengine/docs.go b/internal/engine/rtengine/docs.go new file mode 100644 index 0000000000..e1815a2920 --- /dev/null +++ b/internal/engine/rtengine/docs.go @@ -0,0 +1,5 @@ +// SPDX-FileCopyrightText: Copyright 2024 The Minder Authors +// SPDX-License-Identifier: Apache-2.0 + +// Package rtengine contains utilities for the rule type engine. +package rtengine diff --git a/internal/engine/selectors/selectors.go b/internal/engine/selectors/selectors.go index 9be6cbcb15..0612f76626 100644 --- a/internal/engine/selectors/selectors.go +++ b/internal/engine/selectors/selectors.go @@ -1,17 +1,5 @@ -// -// Copyright 2024 Stacklok, 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. +// SPDX-FileCopyrightText: Copyright 2024 The Minder Authors +// SPDX-License-Identifier: Apache-2.0 //go:generate go run go.uber.org/mock/mockgen -package mock_$GOPACKAGE -destination=./mock/$GOFILE -source=./$GOFILE diff --git a/internal/engine/selectors/selectors_test.go b/internal/engine/selectors/selectors_test.go index 05ac55d38a..1eb5462f6b 100644 --- a/internal/engine/selectors/selectors_test.go +++ b/internal/engine/selectors/selectors_test.go @@ -1,17 +1,5 @@ -// -// Copyright 2024 Stacklok, 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. +// SPDX-FileCopyrightText: Copyright 2024 The Minder Authors +// SPDX-License-Identifier: Apache-2.0 package selectors diff --git a/internal/entities/handlers/handler.go b/internal/entities/handlers/handler.go index a3bfe48e01..6913c6e491 100644 --- a/internal/entities/handlers/handler.go +++ b/internal/entities/handlers/handler.go @@ -1,17 +1,5 @@ -// -// Copyright 2024 Stacklok, 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. +// SPDX-FileCopyrightText: Copyright 2024 The Minder Authors +// SPDX-License-Identifier: Apache-2.0 // Package handlers contains the message handlers for entities. package handlers diff --git a/internal/entities/handlers/handler_test.go b/internal/entities/handlers/handler_test.go index 1d24c5a700..ef27c22ea4 100644 --- a/internal/entities/handlers/handler_test.go +++ b/internal/entities/handlers/handler_test.go @@ -1,17 +1,5 @@ -// -// Copyright 2024 Stacklok, 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. +// SPDX-FileCopyrightText: Copyright 2024 The Minder Authors +// SPDX-License-Identifier: Apache-2.0 package handlers diff --git a/internal/entities/handlers/message/message.go b/internal/entities/handlers/message/message.go index c814eccda5..f40d7c771c 100644 --- a/internal/entities/handlers/message/message.go +++ b/internal/entities/handlers/message/message.go @@ -1,17 +1,5 @@ -// -// Copyright 2024 Stacklok, 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. +// SPDX-FileCopyrightText: Copyright 2024 The Minder Authors +// SPDX-License-Identifier: Apache-2.0 // Package message contains the message creation strategies package message diff --git a/internal/entities/handlers/message/message_test.go b/internal/entities/handlers/message/message_test.go index 7a42ac6e34..a0c6a31186 100644 --- a/internal/entities/handlers/message/message_test.go +++ b/internal/entities/handlers/message/message_test.go @@ -1,17 +1,5 @@ -// -// Copyright 2024 Stacklok, 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. +// SPDX-FileCopyrightText: Copyright 2024 The Minder Authors +// SPDX-License-Identifier: Apache-2.0 package message diff --git a/internal/entities/handlers/strategies/entity/add_originating_entity.go b/internal/entities/handlers/strategies/entity/add_originating_entity.go index a326dba3d3..2518d131cc 100644 --- a/internal/entities/handlers/strategies/entity/add_originating_entity.go +++ b/internal/entities/handlers/strategies/entity/add_originating_entity.go @@ -1,18 +1,6 @@ -// Copyright 2024 Stacklok, 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 entity contains the entity creation strategies +// SPDX-FileCopyrightText: Copyright 2024 The Minder Authors +// SPDX-License-Identifier: Apache-2.0 + package entity import ( diff --git a/internal/entities/handlers/strategies/entity/common.go b/internal/entities/handlers/strategies/entity/common.go index 5eed5daacd..bd49c10670 100644 --- a/internal/entities/handlers/strategies/entity/common.go +++ b/internal/entities/handlers/strategies/entity/common.go @@ -1,16 +1,5 @@ -// Copyright 2024 Stacklok, 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. +// SPDX-FileCopyrightText: Copyright 2024 The Minder Authors +// SPDX-License-Identifier: Apache-2.0 // Package entity contains the entity creation strategies package entity diff --git a/internal/entities/handlers/strategies/entity/del_originating_entity.go b/internal/entities/handlers/strategies/entity/del_originating_entity.go index d1b315864b..305deebc11 100644 --- a/internal/entities/handlers/strategies/entity/del_originating_entity.go +++ b/internal/entities/handlers/strategies/entity/del_originating_entity.go @@ -1,18 +1,6 @@ -// Copyright 2024 Stacklok, 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. +// SPDX-FileCopyrightText: Copyright 2024 The Minder Authors +// SPDX-License-Identifier: Apache-2.0 -// Package entity contains the entity creation strategies package entity import ( diff --git a/internal/entities/handlers/strategies/entity/get_by_upstream_props.go b/internal/entities/handlers/strategies/entity/get_by_upstream_props.go index e7013b32fb..81f5655e6b 100644 --- a/internal/entities/handlers/strategies/entity/get_by_upstream_props.go +++ b/internal/entities/handlers/strategies/entity/get_by_upstream_props.go @@ -1,18 +1,6 @@ -// Copyright 2024 Stacklok, 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. +// SPDX-FileCopyrightText: Copyright 2024 The Minder Authors +// SPDX-License-Identifier: Apache-2.0 -// Package entity contains the entity creation strategies package entity import ( diff --git a/internal/entities/handlers/strategies/entity/refresh_by_id.go b/internal/entities/handlers/strategies/entity/refresh_by_id.go index d2f0bd2c7b..25fbf1fd1f 100644 --- a/internal/entities/handlers/strategies/entity/refresh_by_id.go +++ b/internal/entities/handlers/strategies/entity/refresh_by_id.go @@ -1,18 +1,6 @@ -// Copyright 2024 Stacklok, 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. +// SPDX-FileCopyrightText: Copyright 2024 The Minder Authors +// SPDX-License-Identifier: Apache-2.0 -// Package entity contains the entity creation strategies package entity import ( diff --git a/internal/entities/handlers/strategies/entity/refresh_by_upstream_props.go b/internal/entities/handlers/strategies/entity/refresh_by_upstream_props.go index a59b5fad0f..38e01a416a 100644 --- a/internal/entities/handlers/strategies/entity/refresh_by_upstream_props.go +++ b/internal/entities/handlers/strategies/entity/refresh_by_upstream_props.go @@ -1,18 +1,6 @@ -// Copyright 2024 Stacklok, 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. +// SPDX-FileCopyrightText: Copyright 2024 The Minder Authors +// SPDX-License-Identifier: Apache-2.0 -// Package entity contains the entity creation strategies package entity import ( diff --git a/internal/entities/handlers/strategies/message/empty.go b/internal/entities/handlers/strategies/message/empty.go index 32ea73b504..11746afa9b 100644 --- a/internal/entities/handlers/strategies/message/empty.go +++ b/internal/entities/handlers/strategies/message/empty.go @@ -1,17 +1,5 @@ -// -// Copyright 2024 Stacklok, 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. +// SPDX-FileCopyrightText: Copyright 2024 The Minder Authors +// SPDX-License-Identifier: Apache-2.0 // Package message contains the message creation strategies package message diff --git a/internal/entities/handlers/strategies/message/entity_info_wrapper.go b/internal/entities/handlers/strategies/message/entity_info_wrapper.go index d74c4d5e9d..e151abb649 100644 --- a/internal/entities/handlers/strategies/message/entity_info_wrapper.go +++ b/internal/entities/handlers/strategies/message/entity_info_wrapper.go @@ -1,17 +1,5 @@ -// -// Copyright 2024 Stacklok, 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. +// SPDX-FileCopyrightText: Copyright 2024 The Minder Authors +// SPDX-License-Identifier: Apache-2.0 // Package message contains the message creation strategies package message diff --git a/internal/entities/handlers/strategies/message/minder_entity.go b/internal/entities/handlers/strategies/message/minder_entity.go index 2e7997bfe9..92d32a85a6 100644 --- a/internal/entities/handlers/strategies/message/minder_entity.go +++ b/internal/entities/handlers/strategies/message/minder_entity.go @@ -1,17 +1,5 @@ -// -// Copyright 2024 Stacklok, 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. +// SPDX-FileCopyrightText: Copyright 2024 The Minder Authors +// SPDX-License-Identifier: Apache-2.0 // Package message contains the message creation strategies package message diff --git a/internal/entities/handlers/strategies/strategies.go b/internal/entities/handlers/strategies/strategies.go index 9aef75b6f9..5abe1c8b6d 100644 --- a/internal/entities/handlers/strategies/strategies.go +++ b/internal/entities/handlers/strategies/strategies.go @@ -1,16 +1,5 @@ -// Copyright 2024 Stacklok, 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. +// SPDX-FileCopyrightText: Copyright 2024 The Minder Authors +// SPDX-License-Identifier: Apache-2.0 // Package strategies contains the message creation strategies for entities and messages package strategies diff --git a/internal/entities/models/models.go b/internal/entities/models/models.go index 70b2b2de19..50a7529300 100644 --- a/internal/entities/models/models.go +++ b/internal/entities/models/models.go @@ -1,16 +1,5 @@ -// Copyright 2024 Stacklok, 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. +// SPDX-FileCopyrightText: Copyright 2024 The Minder Authors +// SPDX-License-Identifier: Apache-2.0 // Package models contains domain models for entities package models diff --git a/internal/entities/properties/constants.go b/internal/entities/properties/constants.go index 4efde7fc54..d885c3b682 100644 --- a/internal/entities/properties/constants.go +++ b/internal/entities/properties/constants.go @@ -1,17 +1,5 @@ -// -// Copyright 2024 Stacklok, 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. +// SPDX-FileCopyrightText: Copyright 2024 The Minder Authors +// SPDX-License-Identifier: Apache-2.0 package properties diff --git a/internal/entities/properties/properties.go b/internal/entities/properties/properties.go index fc8e90dd84..c20d6275fb 100644 --- a/internal/entities/properties/properties.go +++ b/internal/entities/properties/properties.go @@ -1,17 +1,5 @@ -// -// Copyright 2024 Stacklok, 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. +// SPDX-FileCopyrightText: Copyright 2024 The Minder Authors +// SPDX-License-Identifier: Apache-2.0 // Package properties provides a simple way to access properties of an entity package properties diff --git a/internal/entities/properties/properties_test.go b/internal/entities/properties/properties_test.go index 79320bb3cc..3cb20019e4 100644 --- a/internal/entities/properties/properties_test.go +++ b/internal/entities/properties/properties_test.go @@ -1,17 +1,5 @@ -// -// Copyright 2024 Stacklok, 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. +// SPDX-FileCopyrightText: Copyright 2024 The Minder Authors +// SPDX-License-Identifier: Apache-2.0 package properties diff --git a/internal/entities/properties/service/entitycache.go b/internal/entities/properties/service/entitycache.go index 5f92fe3abb..e6dd0a98d2 100644 --- a/internal/entities/properties/service/entitycache.go +++ b/internal/entities/properties/service/entitycache.go @@ -1,17 +1,5 @@ -// -// Copyright 2024 Stacklok, 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. +// SPDX-FileCopyrightText: Copyright 2024 The Minder Authors +// SPDX-License-Identifier: Apache-2.0 package service diff --git a/internal/entities/properties/service/helpers.go b/internal/entities/properties/service/helpers.go index 31c769bb0c..333e57d8c1 100644 --- a/internal/entities/properties/service/helpers.go +++ b/internal/entities/properties/service/helpers.go @@ -1,17 +1,5 @@ -// -// Copyright 2024 Stacklok, 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. +// SPDX-FileCopyrightText: Copyright 2024 The Minder Authors +// SPDX-License-Identifier: Apache-2.0 package service diff --git a/internal/entities/properties/service/mock/fixtures/fixtures.go b/internal/entities/properties/service/mock/fixtures/fixtures.go index 0d97107a4c..c0d8e26e78 100644 --- a/internal/entities/properties/service/mock/fixtures/fixtures.go +++ b/internal/entities/properties/service/mock/fixtures/fixtures.go @@ -1,16 +1,5 @@ -// Copyright 2024 Stacklok, Inc -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance cf.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. +// SPDX-FileCopyrightText: Copyright 2024 The Minder Authors +// SPDX-License-Identifier: Apache-2.0 // Package fixtures contains code for creating RepositoryService // fixtures and is used in various parts of the code. For testing use diff --git a/internal/entities/properties/service/options.go b/internal/entities/properties/service/options.go index d37e73dc4d..4e6aedbcaf 100644 --- a/internal/entities/properties/service/options.go +++ b/internal/entities/properties/service/options.go @@ -1,17 +1,5 @@ -// -// Copyright 2024 Stacklok, 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. +// SPDX-FileCopyrightText: Copyright 2024 The Minder Authors +// SPDX-License-Identifier: Apache-2.0 package service diff --git a/internal/entities/properties/service/service.go b/internal/entities/properties/service/service.go index 7b8326c995..48f4e54478 100644 --- a/internal/entities/properties/service/service.go +++ b/internal/entities/properties/service/service.go @@ -1,17 +1,5 @@ -// -// Copyright 2024 Stacklok, 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. +// SPDX-FileCopyrightText: Copyright 2024 The Minder Authors +// SPDX-License-Identifier: Apache-2.0 // Package service provides a service to interact with properties of an entity package service diff --git a/internal/entities/properties/service/service_test.go b/internal/entities/properties/service/service_test.go index b61e1e2ecb..74937d5879 100644 --- a/internal/entities/properties/service/service_test.go +++ b/internal/entities/properties/service/service_test.go @@ -1,17 +1,5 @@ -// -// Copyright 2024 Stacklok, 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. +// SPDX-FileCopyrightText: Copyright 2024 The Minder Authors +// SPDX-License-Identifier: Apache-2.0 package service diff --git a/internal/events/common/driver.go b/internal/events/common/driver.go index fb69094f24..5dc6679979 100644 --- a/internal/events/common/driver.go +++ b/internal/events/common/driver.go @@ -1,17 +1,5 @@ -// -// Copyright 2024 Stacklok, 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. +// SPDX-FileCopyrightText: Copyright 2024 The Minder Authors +// SPDX-License-Identifier: Apache-2.0 // Package common contains common interfaces and types used by the eventer. package common diff --git a/internal/events/constants.go b/internal/events/constants.go index 5e5b68c52b..b2b73a1087 100644 --- a/internal/events/constants.go +++ b/internal/events/constants.go @@ -1,17 +1,5 @@ -// -// Copyright 2024 Stacklok, 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. +// SPDX-FileCopyrightText: Copyright 2024 The Minder Authors +// SPDX-License-Identifier: Apache-2.0 package events diff --git a/internal/events/eventer.go b/internal/events/eventer.go index d8d7a4623a..c447b88870 100644 --- a/internal/events/eventer.go +++ b/internal/events/eventer.go @@ -1,17 +1,5 @@ -// -// Copyright 2023 Stacklok, 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. +// SPDX-FileCopyrightText: Copyright 2023 The Minder Authors +// SPDX-License-Identifier: Apache-2.0 // Package events provides the eventer object which is responsible for setting up the watermill router // and handling the incoming events diff --git a/internal/events/eventer_test.go b/internal/events/eventer_test.go index 0697c05c64..ebb3b3adb0 100644 --- a/internal/events/eventer_test.go +++ b/internal/events/eventer_test.go @@ -1,17 +1,5 @@ -// -// Copyright 2023 Stacklok, 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. +// SPDX-FileCopyrightText: Copyright 2023 The Minder Authors +// SPDX-License-Identifier: Apache-2.0 package events_test diff --git a/internal/events/gochannel/gochannel.go b/internal/events/gochannel/gochannel.go index b3a710d382..d3a5151a56 100644 --- a/internal/events/gochannel/gochannel.go +++ b/internal/events/gochannel/gochannel.go @@ -1,17 +1,5 @@ -// -// Copyright 2024 Stacklok, 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. +// SPDX-FileCopyrightText: Copyright 2024 The Minder Authors +// SPDX-License-Identifier: Apache-2.0 // Package gochannel provides a gochannel implementation of the eventer package gochannel diff --git a/internal/events/interfaces.go b/internal/events/interfaces.go index 8d39617317..822f35c26f 100644 --- a/internal/events/interfaces.go +++ b/internal/events/interfaces.go @@ -1,17 +1,5 @@ -// -// Copyright 2024 Stacklok, 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. +// SPDX-FileCopyrightText: Copyright 2024 The Minder Authors +// SPDX-License-Identifier: Apache-2.0 package events diff --git a/internal/events/metrics.go b/internal/events/metrics.go index 2795037afd..5c573a5b58 100644 --- a/internal/events/metrics.go +++ b/internal/events/metrics.go @@ -1,17 +1,5 @@ -// -// Copyright 2024 Stacklok, 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. +// SPDX-FileCopyrightText: Copyright 2024 The Minder Authors +// SPDX-License-Identifier: Apache-2.0 package events diff --git a/internal/events/nats/natschannel.go b/internal/events/nats/natschannel.go index 099774a270..d459db0301 100644 --- a/internal/events/nats/natschannel.go +++ b/internal/events/nats/natschannel.go @@ -1,17 +1,5 @@ -// -// Copyright 2024 Stacklok, 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. +// SPDX-FileCopyrightText: Copyright 2024 The Minder Authors +// SPDX-License-Identifier: Apache-2.0 // Package nats provides a nants+cloudevents implementation of the eventer interface package nats diff --git a/internal/events/nats/natschannel_test.go b/internal/events/nats/natschannel_test.go index 0c1748948d..11af0e4083 100644 --- a/internal/events/nats/natschannel_test.go +++ b/internal/events/nats/natschannel_test.go @@ -1,17 +1,5 @@ -// -// Copyright 2024 Stacklok, 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. +// SPDX-FileCopyrightText: Copyright 2024 The Minder Authors +// SPDX-License-Identifier: Apache-2.0 // Package nats provides a nants+cloudevents implementation of the eventer interface package nats diff --git a/internal/events/sql/postgres.go b/internal/events/sql/postgres.go index aae9344f72..2389c12d00 100644 --- a/internal/events/sql/postgres.go +++ b/internal/events/sql/postgres.go @@ -1,17 +1,5 @@ -// -// Copyright 2024 Stacklok, 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. +// SPDX-FileCopyrightText: Copyright 2024 The Minder Authors +// SPDX-License-Identifier: Apache-2.0 // Package sql provides the eventer implementation for the SQL database. package sql diff --git a/internal/events/stubs/eventer.go b/internal/events/stubs/eventer.go index 2fad25de16..85b62c9161 100644 --- a/internal/events/stubs/eventer.go +++ b/internal/events/stubs/eventer.go @@ -1,16 +1,5 @@ -// Copyright 2024 Stacklok, 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. +// SPDX-FileCopyrightText: Copyright 2024 The Minder Authors +// SPDX-License-Identifier: Apache-2.0 // Package stubs contains stubs for the eventer package package stubs diff --git a/internal/flags/constants.go b/internal/flags/constants.go index 2eedd6ff86..65c5ce8049 100644 --- a/internal/flags/constants.go +++ b/internal/flags/constants.go @@ -1,17 +1,5 @@ -// -// Copyright 2024 Stacklok, 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. +// SPDX-FileCopyrightText: Copyright 2024 The Minder Authors +// SPDX-License-Identifier: Apache-2.0 package flags diff --git a/internal/flags/flags.go b/internal/flags/flags.go index d801f36705..bada1415ca 100644 --- a/internal/flags/flags.go +++ b/internal/flags/flags.go @@ -1,17 +1,5 @@ -// -// Copyright 2024 Stacklok, 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. +// SPDX-FileCopyrightText: Copyright 2024 The Minder Authors +// SPDX-License-Identifier: Apache-2.0 // Package flags containts utilities for managing feature flags. package flags diff --git a/internal/flags/flags_test.go b/internal/flags/flags_test.go index 2a926accde..37cfb8ba2a 100644 --- a/internal/flags/flags_test.go +++ b/internal/flags/flags_test.go @@ -1,17 +1,5 @@ -// -// Copyright 2024 Stacklok, 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. +// SPDX-FileCopyrightText: Copyright 2024 The Minder Authors +// SPDX-License-Identifier: Apache-2.0 // Package flags containts utilities for managing feature flags. package flags diff --git a/internal/flags/test_client.go b/internal/flags/test_client.go index 2ea77d7673..1930fe3807 100644 --- a/internal/flags/test_client.go +++ b/internal/flags/test_client.go @@ -1,17 +1,5 @@ -// -// Copyright 2023 Stacklok, 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. +// SPDX-FileCopyrightText: Copyright 2023 The Minder Authors +// SPDX-License-Identifier: Apache-2.0 package flags diff --git a/internal/history/models.go b/internal/history/models.go index cdebb5a1e6..bdf579691f 100644 --- a/internal/history/models.go +++ b/internal/history/models.go @@ -1,16 +1,5 @@ -// Copyright 2024 Stacklok, 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. +// SPDX-FileCopyrightText: Copyright 2024 The Minder Authors +// SPDX-License-Identifier: Apache-2.0 package history diff --git a/internal/history/models_test.go b/internal/history/models_test.go index c53844d46f..36a11b9856 100644 --- a/internal/history/models_test.go +++ b/internal/history/models_test.go @@ -1,16 +1,5 @@ -// Copyright 2024 Stacklok, 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. +// SPDX-FileCopyrightText: Copyright 2024 The Minder Authors +// SPDX-License-Identifier: Apache-2.0 package history diff --git a/internal/history/service.go b/internal/history/service.go index d97bb9f646..fe606046c2 100644 --- a/internal/history/service.go +++ b/internal/history/service.go @@ -1,16 +1,5 @@ -// Copyright 2024 Stacklok, 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. +// SPDX-FileCopyrightText: Copyright 2024 The Minder Authors +// SPDX-License-Identifier: Apache-2.0 // Package history contains logic for tracking evaluation history package history diff --git a/internal/history/service_test.go b/internal/history/service_test.go index 945f95b9ed..8c65cb3e69 100644 --- a/internal/history/service_test.go +++ b/internal/history/service_test.go @@ -1,16 +1,5 @@ -// Copyright 2024 Stacklok, 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. +// SPDX-FileCopyrightText: Copyright 2024 The Minder Authors +// SPDX-License-Identifier: Apache-2.0 package history diff --git a/internal/invites/invite.go b/internal/invites/invite.go index 7d65289fb4..b500564583 100644 --- a/internal/invites/invite.go +++ b/internal/invites/invite.go @@ -1,17 +1,5 @@ -// -// Copyright 2024 Stacklok, 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. +// SPDX-FileCopyrightText: Copyright 2024 The Minder Authors +// SPDX-License-Identifier: Apache-2.0 // Package invites provides the invite utilities for minder package invites diff --git a/internal/invites/service.go b/internal/invites/service.go index b602b5f671..39fb0eace5 100644 --- a/internal/invites/service.go +++ b/internal/invites/service.go @@ -1,17 +1,5 @@ -// -// Copyright 2024 Stacklok, 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. +// SPDX-FileCopyrightText: Copyright 2024 The Minder Authors +// SPDX-License-Identifier: Apache-2.0 package invites diff --git a/internal/invites/service_test.go b/internal/invites/service_test.go index 93f1ca6c92..4d8bc11922 100644 --- a/internal/invites/service_test.go +++ b/internal/invites/service_test.go @@ -1,17 +1,5 @@ -// -// Copyright 2024 Stacklok, 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. +// SPDX-FileCopyrightText: Copyright 2024 The Minder Authors +// SPDX-License-Identifier: Apache-2.0 package invites diff --git a/internal/logger/logger_setup.go b/internal/logger/logger_setup.go index ac9205963b..9485fb4494 100644 --- a/internal/logger/logger_setup.go +++ b/internal/logger/logger_setup.go @@ -1,16 +1,5 @@ -// Copyright 2023 Stacklok, 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. +// SPDX-FileCopyrightText: Copyright 2023 The Minder Authors +// SPDX-License-Identifier: Apache-2.0 package logger diff --git a/internal/logger/logging_interceptor.go b/internal/logger/logging_interceptor.go index c0562f4a53..f59872a14f 100644 --- a/internal/logger/logging_interceptor.go +++ b/internal/logger/logging_interceptor.go @@ -1,16 +1,5 @@ -// Copyright 2023 Stacklok, 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. +// SPDX-FileCopyrightText: Copyright 2023 The Minder Authors +// SPDX-License-Identifier: Apache-2.0 // Package logger provides a general logging tools package logger diff --git a/internal/logger/telemetry_store.go b/internal/logger/telemetry_store.go index 4b7d225500..04e8067275 100644 --- a/internal/logger/telemetry_store.go +++ b/internal/logger/telemetry_store.go @@ -1,16 +1,5 @@ -// Copyright 2024 Stacklok, 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. +// SPDX-FileCopyrightText: Copyright 2024 The Minder Authors +// SPDX-License-Identifier: Apache-2.0 package logger diff --git a/internal/logger/telemetry_store_test.go b/internal/logger/telemetry_store_test.go index 1e965b8183..e2174e6422 100644 --- a/internal/logger/telemetry_store_test.go +++ b/internal/logger/telemetry_store_test.go @@ -1,16 +1,5 @@ -// Copyright 2024 Stacklok, 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. +// SPDX-FileCopyrightText: Copyright 2024 The Minder Authors +// SPDX-License-Identifier: Apache-2.0 package logger_test diff --git a/internal/logger/telemetry_store_watermill.go b/internal/logger/telemetry_store_watermill.go index 953d0c7155..096f734cf2 100644 --- a/internal/logger/telemetry_store_watermill.go +++ b/internal/logger/telemetry_store_watermill.go @@ -1,16 +1,5 @@ -// Copyright 2024 Stacklok, 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. +// SPDX-FileCopyrightText: Copyright 2024 The Minder Authors +// SPDX-License-Identifier: Apache-2.0 package logger diff --git a/internal/logger/telemetry_store_watermill_test.go b/internal/logger/telemetry_store_watermill_test.go index 9452ce365b..41f7b1357e 100644 --- a/internal/logger/telemetry_store_watermill_test.go +++ b/internal/logger/telemetry_store_watermill_test.go @@ -1,16 +1,5 @@ -// Copyright 2024 Stacklok, 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. +// SPDX-FileCopyrightText: Copyright 2024 The Minder Authors +// SPDX-License-Identifier: Apache-2.0 package logger_test diff --git a/internal/marketplaces/bundles/mock/fixtures/reader.go b/internal/marketplaces/bundles/mock/fixtures/reader.go index 3d18c70535..88f37f5cfc 100644 --- a/internal/marketplaces/bundles/mock/fixtures/reader.go +++ b/internal/marketplaces/bundles/mock/fixtures/reader.go @@ -1,16 +1,5 @@ -// Copyright 2024 Stacklok, Inc -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance cf.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. +// SPDX-FileCopyrightText: Copyright 2024 The Minder Authors +// SPDX-License-Identifier: Apache-2.0 // Package fixtures contains code for creating bundle fixtures and is used in // various parts of the code. For testing use only. @@ -20,6 +9,7 @@ package fixtures import ( "errors" + mockbundle "github.com/mindersec/minder/internal/marketplaces/bundles/mock" v1 "github.com/mindersec/minder/pkg/api/protobuf/go/minder/v1" "github.com/mindersec/minder/pkg/mindpak" diff --git a/internal/marketplaces/bundles/mock/fixtures/source.go b/internal/marketplaces/bundles/mock/fixtures/source.go index ebdaf2da57..1e0460ae68 100644 --- a/internal/marketplaces/bundles/mock/fixtures/source.go +++ b/internal/marketplaces/bundles/mock/fixtures/source.go @@ -1,16 +1,5 @@ -// Copyright 2024 Stacklok, Inc -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance cf.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. +// SPDX-FileCopyrightText: Copyright 2024 The Minder Authors +// SPDX-License-Identifier: Apache-2.0 //nolint:all package fixtures diff --git a/internal/marketplaces/factory.go b/internal/marketplaces/factory.go index c4a64f6146..8a1a23576c 100644 --- a/internal/marketplaces/factory.go +++ b/internal/marketplaces/factory.go @@ -1,16 +1,5 @@ -// Copyright 2024 Stacklok, 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. +// SPDX-FileCopyrightText: Copyright 2024 The Minder Authors +// SPDX-License-Identifier: Apache-2.0 package marketplaces diff --git a/internal/marketplaces/namespaces/validation.go b/internal/marketplaces/namespaces/validation.go index 918a8bf525..ac8d316aef 100644 --- a/internal/marketplaces/namespaces/validation.go +++ b/internal/marketplaces/namespaces/validation.go @@ -1,16 +1,5 @@ -// Copyright 2024 Stacklok, 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. +// SPDX-FileCopyrightText: Copyright 2024 The Minder Authors +// SPDX-License-Identifier: Apache-2.0 // Package namespaces contains logic relating to the namespacing of Rule Types // and Profiles diff --git a/internal/marketplaces/service.go b/internal/marketplaces/service.go index 6f69e48805..af0e1eddf9 100644 --- a/internal/marketplaces/service.go +++ b/internal/marketplaces/service.go @@ -1,16 +1,5 @@ -// Copyright 2024 Stacklok, 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. +// SPDX-FileCopyrightText: Copyright 2024 The Minder Authors +// SPDX-License-Identifier: Apache-2.0 // Package marketplaces holds logic for the importing rule types and profiles // from bundles into projects. diff --git a/internal/marketplaces/service_test.go b/internal/marketplaces/service_test.go index 80abc56cc0..3fd4c77a73 100644 --- a/internal/marketplaces/service_test.go +++ b/internal/marketplaces/service_test.go @@ -1,16 +1,5 @@ -// Copyright 2024 Stacklok, 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. +// SPDX-FileCopyrightText: Copyright 2024 The Minder Authors +// SPDX-License-Identifier: Apache-2.0 package marketplaces_test diff --git a/internal/marketplaces/subscriptions/mock/fixtures/subscription.go b/internal/marketplaces/subscriptions/mock/fixtures/subscription.go index 81eb0e84ef..970112f283 100644 --- a/internal/marketplaces/subscriptions/mock/fixtures/subscription.go +++ b/internal/marketplaces/subscriptions/mock/fixtures/subscription.go @@ -1,16 +1,5 @@ -// Copyright 2024 Stacklok, Inc -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance cf.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. +// SPDX-FileCopyrightText: Copyright 2024 The Minder Authors +// SPDX-License-Identifier: Apache-2.0 // Package fixtures contains code for creating subscription fixtures and is used in // various parts of the code. For testing use only. @@ -20,6 +9,7 @@ package fixtures import ( "errors" + mocksubscription "github.com/mindersec/minder/internal/marketplaces/subscriptions/mock" "go.uber.org/mock/gomock" ) diff --git a/internal/marketplaces/subscriptions/service.go b/internal/marketplaces/subscriptions/service.go index 4692612fe1..c920e19e72 100644 --- a/internal/marketplaces/subscriptions/service.go +++ b/internal/marketplaces/subscriptions/service.go @@ -1,16 +1,5 @@ -// Copyright 2024 Stacklok, 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. +// SPDX-FileCopyrightText: Copyright 2024 The Minder Authors +// SPDX-License-Identifier: Apache-2.0 // Package subscriptions contains logic relating to the concept of // `subscriptions` - which describe a linkage between a project and a diff --git a/internal/marketplaces/subscriptions/service_test.go b/internal/marketplaces/subscriptions/service_test.go index 3b642bda93..01eb3e5b5e 100644 --- a/internal/marketplaces/subscriptions/service_test.go +++ b/internal/marketplaces/subscriptions/service_test.go @@ -1,16 +1,5 @@ -// Copyright 2024 Stacklok, 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. +// SPDX-FileCopyrightText: Copyright 2024 The Minder Authors +// SPDX-License-Identifier: Apache-2.0 package subscriptions_test diff --git a/internal/metrics/meters/factory.go b/internal/metrics/meters/factory.go index 64ff85d3cb..58d71262af 100644 --- a/internal/metrics/meters/factory.go +++ b/internal/metrics/meters/factory.go @@ -1,16 +1,5 @@ -// Copyright 2024 Stacklok, 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. +// SPDX-FileCopyrightText: Copyright 2024 The Minder Authors +// SPDX-License-Identifier: Apache-2.0 // Package meters contains the OpenTelemetry meter factories. package meters diff --git a/internal/profiles/mock/fixtures/service.go b/internal/profiles/mock/fixtures/service.go index 34e128fb4e..157de7fbaa 100644 --- a/internal/profiles/mock/fixtures/service.go +++ b/internal/profiles/mock/fixtures/service.go @@ -1,16 +1,5 @@ -// Copyright 2024 Stacklok, Inc -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance cf.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. +// SPDX-FileCopyrightText: Copyright 2024 The Minder Authors +// SPDX-License-Identifier: Apache-2.0 // Package fixtures contains code for creating ProfileService fixtures and is used in // various parts of the code. For testing use only. @@ -20,6 +9,7 @@ package fixtures import ( "errors" + mockprofsvc "github.com/mindersec/minder/internal/profiles/mock" minderv1 "github.com/mindersec/minder/pkg/api/protobuf/go/minder/v1" "go.uber.org/mock/gomock" diff --git a/internal/profiles/models/models.go b/internal/profiles/models/models.go index 9f1358f46b..caf053237f 100644 --- a/internal/profiles/models/models.go +++ b/internal/profiles/models/models.go @@ -1,16 +1,5 @@ -// Copyright 2024 Stacklok, 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. +// SPDX-FileCopyrightText: Copyright 2024 The Minder Authors +// SPDX-License-Identifier: Apache-2.0 // Package models contains domain models for profiles package models diff --git a/internal/profiles/rule_names.go b/internal/profiles/rule_names.go index 7133ce5d4b..d0890e860e 100644 --- a/internal/profiles/rule_names.go +++ b/internal/profiles/rule_names.go @@ -1,16 +1,5 @@ -// Copyright 2024 Stacklok, 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. +// SPDX-FileCopyrightText: Copyright 2024 The Minder Authors +// SPDX-License-Identifier: Apache-2.0 package profiles diff --git a/internal/profiles/rule_validator.go b/internal/profiles/rule_validator.go index de6b306a1b..e0c7a168dd 100644 --- a/internal/profiles/rule_validator.go +++ b/internal/profiles/rule_validator.go @@ -1,17 +1,5 @@ -// Copyright 2023 Stacklok, 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 rule provides the CLI subcommand for managing rules +// SPDX-FileCopyrightText: Copyright 2023 The Minder Authors +// SPDX-License-Identifier: Apache-2.0 package profiles @@ -20,7 +8,6 @@ import ( "strings" "github.com/xeipuuv/gojsonschema" - "google.golang.org/protobuf/types/known/structpb" minderv1 "github.com/mindersec/minder/pkg/api/protobuf/go/minder/v1" ) @@ -76,19 +63,12 @@ func (r *RuleValidator) ValidateRuleDefAgainstSchema(contextualProfile map[strin // ValidateParamsAgainstSchema validates the given parameters against the // schema for this rule type -func (r *RuleValidator) ValidateParamsAgainstSchema(params *structpb.Struct) error { +func (r *RuleValidator) ValidateParamsAgainstSchema(params map[string]any) error { if r.paramSchema == nil { return nil } - if params == nil { - return &RuleValidationError{ - RuleType: r.ruleTypeName, - Err: "params cannot be nil", - } - } - - if err := validateAgainstSchema(r.paramSchema, params.AsMap()); err != nil { + if err := validateAgainstSchema(r.paramSchema, params); err != nil { return &RuleValidationError{ RuleType: r.ruleTypeName, Err: err.Error(), diff --git a/internal/profiles/rule_validator_test.go b/internal/profiles/rule_validator_test.go index a10cf1d04a..345855028a 100644 --- a/internal/profiles/rule_validator_test.go +++ b/internal/profiles/rule_validator_test.go @@ -1,17 +1,5 @@ -// Copyright 2023 Stacklok, 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 rule provides the CLI subcommand for managing rules +// SPDX-FileCopyrightText: Copyright 2023 The Minder Authors +// SPDX-License-Identifier: Apache-2.0 package profiles_test @@ -22,7 +10,6 @@ import ( "github.com/stretchr/testify/require" - "github.com/mindersec/minder/internal/engine/rtengine" "github.com/mindersec/minder/internal/profiles" minderv1 "github.com/mindersec/minder/pkg/api/protobuf/go/minder/v1" ) @@ -67,7 +54,7 @@ func TestExampleRulesAreValidatedCorrectly(t *testing.T) { rval, err := profiles.NewRuleValidator(rt) require.NoError(t, err, "failed to create rule validator for rule type %s", path) - rules, err := rtengine.GetRulesFromProfileOfType(pol, rt) + rules, err := profiles.GetRulesFromProfileOfType(pol, rt) require.NoError(t, err, "failed to get rules from profile for rule type %s", path) t.Log("validating rules") @@ -75,7 +62,7 @@ func TestExampleRulesAreValidatedCorrectly(t *testing.T) { err := rval.ValidateRuleDefAgainstSchema(ruleCall.Def.AsMap()) require.NoError(t, err, "failed to validate rule definition for rule type %s", path) - err = rval.ValidateParamsAgainstSchema(ruleCall.GetParams()) + err = rval.ValidateParamsAgainstSchema(ruleCall.GetParams().AsMap()) require.NoError(t, err, "failed to validate rule parameters for rule type %s", path) } diff --git a/internal/profiles/service.go b/internal/profiles/service.go index e7292e5ccf..e2c59e7c79 100644 --- a/internal/profiles/service.go +++ b/internal/profiles/service.go @@ -1,16 +1,5 @@ -// Copyright 2024 Stacklok, 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. +// SPDX-FileCopyrightText: Copyright 2024 The Minder Authors +// SPDX-License-Identifier: Apache-2.0 package profiles diff --git a/internal/profiles/store.go b/internal/profiles/store.go index b2263aef4f..5d0abab12a 100644 --- a/internal/profiles/store.go +++ b/internal/profiles/store.go @@ -1,16 +1,5 @@ -// Copyright 2024 Stacklok, 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. +// SPDX-FileCopyrightText: Copyright 2024 The Minder Authors +// SPDX-License-Identifier: Apache-2.0 package profiles diff --git a/internal/profiles/types.go b/internal/profiles/types.go index 847853cfa1..3b428c63da 100644 --- a/internal/profiles/types.go +++ b/internal/profiles/types.go @@ -1,16 +1,5 @@ -// Copyright 2024 Stacklok, 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. +// SPDX-FileCopyrightText: Copyright 2024 The Minder Authors +// SPDX-License-Identifier: Apache-2.0 // Package profiles contains business logic relating to the Profile entity in Minder package profiles diff --git a/internal/profiles/util.go b/internal/profiles/util.go index 11a7ac4d8a..99092b73d4 100644 --- a/internal/profiles/util.go +++ b/internal/profiles/util.go @@ -1,16 +1,5 @@ -// Copyright 2023 Stacklok, 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. +// SPDX-FileCopyrightText: Copyright 2023 The Minder Authors +// SPDX-License-Identifier: Apache-2.0 package profiles @@ -472,3 +461,26 @@ func selectorsToProfile( }) } } + +// GetRulesFromProfileOfType returns the rules from the profile of the given type +func GetRulesFromProfileOfType(p *pb.Profile, rt *pb.RuleType) ([]*pb.Profile_Rule, error) { + contextualRules, err := GetRulesForEntity(p, pb.EntityFromString(rt.Def.InEntity)) + if err != nil { + return nil, fmt.Errorf("error getting rules for entity: %w", err) + } + + rules := []*pb.Profile_Rule{} + err = TraverseRules(contextualRules, func(r *pb.Profile_Rule) error { + if r.Type == rt.Name { + rules = append(rules, r) + } + return nil + }) + + // This shouldn't happen + if err != nil { + return nil, fmt.Errorf("error traversing rules: %w", err) + } + + return rules, nil +} diff --git a/internal/profiles/util_test.go b/internal/profiles/util_test.go index 8e5171d47d..0d7b941fba 100644 --- a/internal/profiles/util_test.go +++ b/internal/profiles/util_test.go @@ -1,17 +1,5 @@ -// Copyright 2023 Stacklok, 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 rule provides the CLI subcommand for managing rules +// SPDX-FileCopyrightText: Copyright 2023 The Minder Authors +// SPDX-License-Identifier: Apache-2.0 package profiles_test diff --git a/internal/profiles/validator.go b/internal/profiles/validator.go index 52cc5faedf..ebc305734e 100644 --- a/internal/profiles/validator.go +++ b/internal/profiles/validator.go @@ -1,16 +1,5 @@ -// Copyright 2024 Stacklok, 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. +// SPDX-FileCopyrightText: Copyright 2024 The Minder Authors +// SPDX-License-Identifier: Apache-2.0 package profiles @@ -143,7 +132,7 @@ func (_ *Validator) validateRuleParams( return fmt.Errorf("error validating rule: %w", err) } - if err := ruleValidator.ValidateParamsAgainstSchema(profileRule.GetParams()); err != nil { + if err := ruleValidator.ValidateParamsAgainstSchema(profileRule.GetParams().AsMap()); err != nil { return fmt.Errorf("error validating rule params: %w", err) } diff --git a/internal/profiles/validator_test.go b/internal/profiles/validator_test.go index 2c94b305b0..64a104ec73 100644 --- a/internal/profiles/validator_test.go +++ b/internal/profiles/validator_test.go @@ -1,16 +1,5 @@ -// Copyright 2024 Stacklok, 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. +// SPDX-FileCopyrightText: Copyright 2024 The Minder Authors +// SPDX-License-Identifier: Apache-2.0 package profiles_test diff --git a/internal/projects/creator.go b/internal/projects/creator.go index 0adf40ac4d..165f9b4f90 100644 --- a/internal/projects/creator.go +++ b/internal/projects/creator.go @@ -1,16 +1,5 @@ -// Copyright 2024 Stacklok, 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. +// SPDX-FileCopyrightText: Copyright 2024 The Minder Authors +// SPDX-License-Identifier: Apache-2.0 package projects diff --git a/internal/projects/creator_test.go b/internal/projects/creator_test.go index 2fe3a6cebf..5951661dcd 100644 --- a/internal/projects/creator_test.go +++ b/internal/projects/creator_test.go @@ -1,17 +1,5 @@ -// -// Copyright 2024 Stacklok, 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. +// SPDX-FileCopyrightText: Copyright 2024 The Minder Authors +// SPDX-License-Identifier: Apache-2.0 package projects_test diff --git a/internal/projects/deleter.go b/internal/projects/deleter.go index 0bcd05c91b..565812d0a5 100644 --- a/internal/projects/deleter.go +++ b/internal/projects/deleter.go @@ -1,17 +1,5 @@ -// -// Copyright 2024 Stacklok, 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. +// SPDX-FileCopyrightText: Copyright 2024 The Minder Authors +// SPDX-License-Identifier: Apache-2.0 package projects diff --git a/internal/projects/deleter_test.go b/internal/projects/deleter_test.go index 29333cefed..6bde1a2774 100644 --- a/internal/projects/deleter_test.go +++ b/internal/projects/deleter_test.go @@ -1,17 +1,5 @@ -// -// Copyright 2024 Stacklok, 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. +// SPDX-FileCopyrightText: Copyright 2024 The Minder Authors +// SPDX-License-Identifier: Apache-2.0 package projects_test diff --git a/internal/projects/features/features.go b/internal/projects/features/features.go index 9243d9e05e..7c6d8145b0 100644 --- a/internal/projects/features/features.go +++ b/internal/projects/features/features.go @@ -1,17 +1,5 @@ -// -// Copyright 2024 Stacklok, 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. +// SPDX-FileCopyrightText: Copyright 2024 The Minder Authors +// SPDX-License-Identifier: Apache-2.0 // Package features provides the features checks for the projects package features diff --git a/internal/projects/meta.go b/internal/projects/meta.go index dd4e43d4e0..f72214b485 100644 --- a/internal/projects/meta.go +++ b/internal/projects/meta.go @@ -1,17 +1,5 @@ -// -// Copyright 2024 Stacklok, 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. +// SPDX-FileCopyrightText: Copyright 2024 The Minder Authors +// SPDX-License-Identifier: Apache-2.0 // Package projects contains utilities for working with projects. package projects diff --git a/internal/projects/meta_test.go b/internal/projects/meta_test.go index 19fb8e17ea..ca0eff520a 100644 --- a/internal/projects/meta_test.go +++ b/internal/projects/meta_test.go @@ -1,17 +1,5 @@ -// -// Copyright 2024 Stacklok, 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. +// SPDX-FileCopyrightText: Copyright 2024 The Minder Authors +// SPDX-License-Identifier: Apache-2.0 // Package projects contains utilities for working with projects. package projects diff --git a/internal/proto/buf.yaml b/internal/proto/buf.yaml index fbc96fc05c..b2c439e62d 100644 --- a/internal/proto/buf.yaml +++ b/internal/proto/buf.yaml @@ -1,17 +1,5 @@ -# -# Copyright 2023 Stacklok, 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. +# SPDX-FileCopyrightText: Copyright 2023 The Minder Authors +# SPDX-License-Identifier: Apache-2.0 version: v1 breaking: @@ -22,4 +10,4 @@ lint: - DEFAULT except: - PACKAGE_DIRECTORY_MATCH - allow_comment_ignores: true \ No newline at end of file + allow_comment_ignores: true diff --git a/internal/proto/internal.pb.go b/internal/proto/internal.pb.go index 3b58935c69..43f5ed9118 100644 --- a/internal/proto/internal.pb.go +++ b/internal/proto/internal.pb.go @@ -1,17 +1,5 @@ -// -// Copyright 2024 Stacklok, 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. +// SPDX-FileCopyrightText: Copyright 2024 The Minder Authors +// SPDX-License-Identifier: Apache-2.0 // Code generated by protoc-gen-go. DO NOT EDIT. // versions: diff --git a/internal/proto/internal.proto b/internal/proto/internal.proto index 72a03e12c9..665adce779 100644 --- a/internal/proto/internal.proto +++ b/internal/proto/internal.proto @@ -1,17 +1,5 @@ -// -// Copyright 2024 Stacklok, 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. +// SPDX-FileCopyrightText: Copyright 2024 The Minder Authors +// SPDX-License-Identifier: Apache-2.0 syntax = "proto3"; diff --git a/internal/proto/pkg_ecosystems.go b/internal/proto/pkg_ecosystems.go index fe4f00b4e5..2319ae07a8 100644 --- a/internal/proto/pkg_ecosystems.go +++ b/internal/proto/pkg_ecosystems.go @@ -1,16 +1,5 @@ -// Copyright 2023 Stacklok, 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. +// SPDX-FileCopyrightText: Copyright 2023 The Minder Authors +// SPDX-License-Identifier: Apache-2.0 package proto diff --git a/internal/providers/artifact/versionsfilter.go b/internal/providers/artifact/versionsfilter.go index 4db7bffcd0..fa93b3edc3 100644 --- a/internal/providers/artifact/versionsfilter.go +++ b/internal/providers/artifact/versionsfilter.go @@ -1,17 +1,5 @@ -// Copyright 2024 Stacklok, 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 rule provides the CLI subcommand for managing rules +// SPDX-FileCopyrightText: Copyright 2024 The Minder Authors +// SPDX-License-Identifier: Apache-2.0 // Package artifact provides functions and utilities for artifact providers package artifact diff --git a/internal/providers/artifact/versionsfilter_test.go b/internal/providers/artifact/versionsfilter_test.go index 60ea91b032..ae4ad775ae 100644 --- a/internal/providers/artifact/versionsfilter_test.go +++ b/internal/providers/artifact/versionsfilter_test.go @@ -1,17 +1,5 @@ -// Copyright 2024 Stacklok, 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 rule provides the CLI subcommand for managing rules +// SPDX-FileCopyrightText: Copyright 2024 The Minder Authors +// SPDX-License-Identifier: Apache-2.0 package artifact diff --git a/internal/providers/classes.go b/internal/providers/classes.go index 501fe54cb2..d73e88d635 100644 --- a/internal/providers/classes.go +++ b/internal/providers/classes.go @@ -1,16 +1,5 @@ -// Copyright 2024 Stacklok, 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. +// SPDX-FileCopyrightText: Copyright 2024 The Minder Authors +// SPDX-License-Identifier: Apache-2.0 package providers diff --git a/internal/providers/credentials/empty_credential.go b/internal/providers/credentials/empty_credential.go index 036eceeba5..c8b3c0240c 100644 --- a/internal/providers/credentials/empty_credential.go +++ b/internal/providers/credentials/empty_credential.go @@ -1,16 +1,5 @@ -// Copyright 2024 Stacklok, 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. +// SPDX-FileCopyrightText: Copyright 2024 The Minder Authors +// SPDX-License-Identifier: Apache-2.0 // Package credentials provides the implementations for the credentials package credentials diff --git a/internal/providers/credentials/empty_credential_test.go b/internal/providers/credentials/empty_credential_test.go index 5d8a5e24de..b2457ab05c 100644 --- a/internal/providers/credentials/empty_credential_test.go +++ b/internal/providers/credentials/empty_credential_test.go @@ -1,16 +1,5 @@ -// Copyright 2024 Stacklok, 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. +// SPDX-FileCopyrightText: Copyright 2024 The Minder Authors +// SPDX-License-Identifier: Apache-2.0 package credentials diff --git a/internal/providers/credentials/github_app_jwt.go b/internal/providers/credentials/github_app_jwt.go index d86b5db14f..719e88b63a 100644 --- a/internal/providers/credentials/github_app_jwt.go +++ b/internal/providers/credentials/github_app_jwt.go @@ -1,17 +1,6 @@ // -// Copyright 2024 Stacklok, 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. +// SPDX-FileCopyrightText: Copyright 2024 The Minder Authors +// SPDX-License-Identifier: Apache-2.0 package credentials diff --git a/internal/providers/credentials/github_app_jwt_test.go b/internal/providers/credentials/github_app_jwt_test.go index 24e4ecc2be..0d07c131de 100644 --- a/internal/providers/credentials/github_app_jwt_test.go +++ b/internal/providers/credentials/github_app_jwt_test.go @@ -1,17 +1,6 @@ // -// Copyright 2024 Stacklok, 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. +// SPDX-FileCopyrightText: Copyright 2024 The Minder Authors +// SPDX-License-Identifier: Apache-2.0 package credentials diff --git a/internal/providers/credentials/github_installation_token_credential.go b/internal/providers/credentials/github_installation_token_credential.go index 927075a236..fc2a58b8db 100644 --- a/internal/providers/credentials/github_installation_token_credential.go +++ b/internal/providers/credentials/github_installation_token_credential.go @@ -1,16 +1,5 @@ -// Copyright 2024 Stacklok, 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. +// SPDX-FileCopyrightText: Copyright 2024 The Minder Authors +// SPDX-License-Identifier: Apache-2.0 package credentials diff --git a/internal/providers/credentials/github_installation_token_credential_test.go b/internal/providers/credentials/github_installation_token_credential_test.go index a1fcc1b509..df34eed014 100644 --- a/internal/providers/credentials/github_installation_token_credential_test.go +++ b/internal/providers/credentials/github_installation_token_credential_test.go @@ -1,16 +1,5 @@ -// Copyright 2024 Stacklok, 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. +// SPDX-FileCopyrightText: Copyright 2024 The Minder Authors +// SPDX-License-Identifier: Apache-2.0 package credentials diff --git a/internal/providers/credentials/github_token_credential.go b/internal/providers/credentials/github_token_credential.go index ffe8dfdb45..6abed5666d 100644 --- a/internal/providers/credentials/github_token_credential.go +++ b/internal/providers/credentials/github_token_credential.go @@ -1,16 +1,5 @@ -// Copyright 2024 Stacklok, 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. +// SPDX-FileCopyrightText: Copyright 2024 The Minder Authors +// SPDX-License-Identifier: Apache-2.0 // Package credentials provides the implementations for the credentials package credentials diff --git a/internal/providers/credentials/github_token_credential_test.go b/internal/providers/credentials/github_token_credential_test.go index cdf904c7f0..050ba85e4d 100644 --- a/internal/providers/credentials/github_token_credential_test.go +++ b/internal/providers/credentials/github_token_credential_test.go @@ -1,16 +1,5 @@ -// Copyright 2024 Stacklok, 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. +// SPDX-FileCopyrightText: Copyright 2024 The Minder Authors +// SPDX-License-Identifier: Apache-2.0 package credentials diff --git a/internal/providers/credentials/gitlab_token_credentials.go b/internal/providers/credentials/gitlab_token_credentials.go index b756043766..6c16bd4ad2 100644 --- a/internal/providers/credentials/gitlab_token_credentials.go +++ b/internal/providers/credentials/gitlab_token_credentials.go @@ -1,16 +1,5 @@ -// Copyright 2024 Stacklok, 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. +// SPDX-FileCopyrightText: Copyright 2024 The Minder Authors +// SPDX-License-Identifier: Apache-2.0 // Package credentials provides the implementations for the credentials package credentials diff --git a/internal/providers/credentials/oauth2_token_credential.go b/internal/providers/credentials/oauth2_token_credential.go index 1080b94c3f..7032a1be30 100644 --- a/internal/providers/credentials/oauth2_token_credential.go +++ b/internal/providers/credentials/oauth2_token_credential.go @@ -1,16 +1,5 @@ -// Copyright 2024 Stacklok, 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. +// SPDX-FileCopyrightText: Copyright 2024 The Minder Authors +// SPDX-License-Identifier: Apache-2.0 // Package credentials provides the implementations for the credentials package credentials diff --git a/internal/providers/dockerhub/dockerhub.go b/internal/providers/dockerhub/dockerhub.go index 128e9e7e02..dcd49e34d7 100644 --- a/internal/providers/dockerhub/dockerhub.go +++ b/internal/providers/dockerhub/dockerhub.go @@ -1,16 +1,5 @@ -// Copyright 2024 Stacklok, 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. +// SPDX-FileCopyrightText: Copyright 2024 The Minder Authors +// SPDX-License-Identifier: Apache-2.0 // Package dockerhub provides a client for interacting with Docker Hub package dockerhub diff --git a/internal/providers/dockerhub/manager.go b/internal/providers/dockerhub/manager.go index ed2151d1d2..3ca621c423 100644 --- a/internal/providers/dockerhub/manager.go +++ b/internal/providers/dockerhub/manager.go @@ -1,16 +1,5 @@ -// Copyright 2024 Stacklok, 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. +// SPDX-FileCopyrightText: Copyright 2024 The Minder Authors +// SPDX-License-Identifier: Apache-2.0 package dockerhub diff --git a/internal/providers/dockerhub/webhook.go b/internal/providers/dockerhub/webhook.go index ec0578325d..ee774bcb6b 100644 --- a/internal/providers/dockerhub/webhook.go +++ b/internal/providers/dockerhub/webhook.go @@ -1,16 +1,5 @@ -// Copyright 2024 Stacklok, 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. +// SPDX-FileCopyrightText: Copyright 2024 The Minder Authors +// SPDX-License-Identifier: Apache-2.0 package dockerhub diff --git a/internal/providers/git/git.go b/internal/providers/git/git.go index 6ae0ee432e..7e8f7e8d89 100644 --- a/internal/providers/git/git.go +++ b/internal/providers/git/git.go @@ -1,16 +1,5 @@ -// Copyright 2023 Stacklok, 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. +// SPDX-FileCopyrightText: Copyright 2023 The Minder Authors +// SPDX-License-Identifier: Apache-2.0 // Package git provides a client for interacting with Git providers package git diff --git a/internal/providers/git/memboxfs/fs.go b/internal/providers/git/memboxfs/fs.go index 1380e82c59..dc48817f60 100644 --- a/internal/providers/git/memboxfs/fs.go +++ b/internal/providers/git/memboxfs/fs.go @@ -1,16 +1,5 @@ -// Copyright 2023 Stacklok, 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. +// SPDX-FileCopyrightText: Copyright 2023 The Minder Authors +// SPDX-License-Identifier: Apache-2.0 // Package memboxfs provides a billy.Fs-compatible filesystem implementation // which limits the maxiumum size of the in-memory filesystem. diff --git a/internal/providers/github/clients/app.go b/internal/providers/github/clients/app.go index 2d31ffa568..a47f961c3f 100644 --- a/internal/providers/github/clients/app.go +++ b/internal/providers/github/clients/app.go @@ -1,16 +1,5 @@ -// Copyright 2024 Stacklok, 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. +// SPDX-FileCopyrightText: Copyright 2024 The Minder Authors +// SPDX-License-Identifier: Apache-2.0 package clients diff --git a/internal/providers/github/clients/app_test.go b/internal/providers/github/clients/app_test.go index 5164d4a3e4..0f1c85aeca 100644 --- a/internal/providers/github/clients/app_test.go +++ b/internal/providers/github/clients/app_test.go @@ -1,16 +1,5 @@ -// Copyright 2023 Stacklok, 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. +// SPDX-FileCopyrightText: Copyright 2023 The Minder Authors +// SPDX-License-Identifier: Apache-2.0 package clients diff --git a/internal/providers/github/clients/factory.go b/internal/providers/github/clients/factory.go index c6a9fd34ad..b74ffb39f6 100644 --- a/internal/providers/github/clients/factory.go +++ b/internal/providers/github/clients/factory.go @@ -1,16 +1,5 @@ -// Copyright 2024 Stacklok, 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. +// SPDX-FileCopyrightText: Copyright 2024 The Minder Authors +// SPDX-License-Identifier: Apache-2.0 // Package clients contains github client logic package clients diff --git a/internal/providers/github/clients/oauth.go b/internal/providers/github/clients/oauth.go index 21e34ff554..0bfa330751 100644 --- a/internal/providers/github/clients/oauth.go +++ b/internal/providers/github/clients/oauth.go @@ -1,16 +1,5 @@ -// Copyright 2023 Stacklok, 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. +// SPDX-FileCopyrightText: Copyright 2023 The Minder Authors +// SPDX-License-Identifier: Apache-2.0 package clients diff --git a/internal/providers/github/clients/oauth_test.go b/internal/providers/github/clients/oauth_test.go index 093bfe54a8..8adf64f376 100644 --- a/internal/providers/github/clients/oauth_test.go +++ b/internal/providers/github/clients/oauth_test.go @@ -1,16 +1,5 @@ -// Copyright 2023 Stacklok, 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. +// SPDX-FileCopyrightText: Copyright 2023 The Minder Authors +// SPDX-License-Identifier: Apache-2.0 package clients diff --git a/internal/providers/github/common.go b/internal/providers/github/common.go index 6da8c32be6..1e883cd676 100644 --- a/internal/providers/github/common.go +++ b/internal/providers/github/common.go @@ -1,16 +1,5 @@ -// Copyright 2023 Stacklok, 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. +// SPDX-FileCopyrightText: Copyright 2023 The Minder Authors +// SPDX-License-Identifier: Apache-2.0 // Package github provides a client for interacting with the GitHub API package github diff --git a/internal/providers/github/common/common.go b/internal/providers/github/common/common.go index 9826cf0e65..96bc753eb5 100644 --- a/internal/providers/github/common/common.go +++ b/internal/providers/github/common/common.go @@ -1,16 +1,5 @@ -// Copyright 2024 Stacklok, 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. +// SPDX-FileCopyrightText: Copyright 2024 The Minder Authors +// SPDX-License-Identifier: Apache-2.0 // Package common provides common utilities for the GitHub provider package common diff --git a/internal/providers/github/common/common_test.go b/internal/providers/github/common/common_test.go index adef1fe3ad..6f392313cd 100644 --- a/internal/providers/github/common/common_test.go +++ b/internal/providers/github/common/common_test.go @@ -1,16 +1,5 @@ -// Copyright 2024 Stacklok, 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. +// SPDX-FileCopyrightText: Copyright 2024 The Minder Authors +// SPDX-License-Identifier: Apache-2.0 // Package common provides common utilities for the GitHub provider package common diff --git a/internal/providers/github/entities.go b/internal/providers/github/entities.go index 8641c4a97a..8be40fec26 100644 --- a/internal/providers/github/entities.go +++ b/internal/providers/github/entities.go @@ -1,17 +1,5 @@ -// -// Copyright 2024 Stacklok, 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. +// SPDX-FileCopyrightText: Copyright 2024 The Minder Authors +// SPDX-License-Identifier: Apache-2.0 package github diff --git a/internal/providers/github/ghcr/ghcr.go b/internal/providers/github/ghcr/ghcr.go index c0b021b566..ef92f5c611 100644 --- a/internal/providers/github/ghcr/ghcr.go +++ b/internal/providers/github/ghcr/ghcr.go @@ -1,16 +1,5 @@ -// Copyright 2024 Stacklok, 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. +// SPDX-FileCopyrightText: Copyright 2024 The Minder Authors +// SPDX-License-Identifier: Apache-2.0 // Package ghcr provides a client for interacting with the GitHub Container Registry package ghcr diff --git a/internal/providers/github/installations/installations.go b/internal/providers/github/installations/installations.go index fa84953129..65f9220b75 100644 --- a/internal/providers/github/installations/installations.go +++ b/internal/providers/github/installations/installations.go @@ -1,17 +1,6 @@ // -// Copyright 2024 Stacklok, 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. +// SPDX-FileCopyrightText: Copyright 2024 The Minder Authors +// SPDX-License-Identifier: Apache-2.0 // Package installations contains logic relating to GitHub provider installations package installations diff --git a/internal/providers/github/installations/installations_test.go b/internal/providers/github/installations/installations_test.go index d122d96d0d..51d41ffd12 100644 --- a/internal/providers/github/installations/installations_test.go +++ b/internal/providers/github/installations/installations_test.go @@ -1,17 +1,6 @@ // -// Copyright 2024 Stacklok, 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. +// SPDX-FileCopyrightText: Copyright 2024 The Minder Authors +// SPDX-License-Identifier: Apache-2.0 package installations diff --git a/internal/providers/github/manager/manager.go b/internal/providers/github/manager/manager.go index 5b4203875f..0bf332ac23 100644 --- a/internal/providers/github/manager/manager.go +++ b/internal/providers/github/manager/manager.go @@ -1,16 +1,5 @@ -// Copyright 2024 Stacklok, 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. +// SPDX-FileCopyrightText: Copyright 2024 The Minder Authors +// SPDX-License-Identifier: Apache-2.0 // Package manager contains the GitHubProviderClassManager package manager diff --git a/internal/providers/github/manager/webhook.go b/internal/providers/github/manager/webhook.go index 5322c592a9..86b953b6ab 100644 --- a/internal/providers/github/manager/webhook.go +++ b/internal/providers/github/manager/webhook.go @@ -1,16 +1,5 @@ -// Copyright 2024 Stacklok, 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. +// SPDX-FileCopyrightText: Copyright 2024 The Minder Authors +// SPDX-License-Identifier: Apache-2.0 // Package manager contains the GitHubProviderClassManager package manager diff --git a/internal/providers/github/mock/fixtures/github.go b/internal/providers/github/mock/fixtures/github.go index 11d3310851..74949983dd 100644 --- a/internal/providers/github/mock/fixtures/github.go +++ b/internal/providers/github/mock/fixtures/github.go @@ -1,16 +1,5 @@ -// Copyright 2024 Stacklok, Inc -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance cf.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. +// SPDX-FileCopyrightText: Copyright 2024 The Minder Authors +// SPDX-License-Identifier: Apache-2.0 // Package fixtures contains code for creating ProfileService fixtures and is used in // various parts of the code. For testing use only. diff --git a/internal/providers/github/properties.go b/internal/providers/github/properties.go index 5524d01647..69820cda39 100644 --- a/internal/providers/github/properties.go +++ b/internal/providers/github/properties.go @@ -1,17 +1,5 @@ -// -// Copyright 2024 Stacklok, 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. +// SPDX-FileCopyrightText: Copyright 2024 The Minder Authors +// SPDX-License-Identifier: Apache-2.0 package github diff --git a/internal/providers/github/properties/artifact.go b/internal/providers/github/properties/artifact.go index 696499b34b..c32678a08d 100644 --- a/internal/providers/github/properties/artifact.go +++ b/internal/providers/github/properties/artifact.go @@ -1,17 +1,5 @@ -// -// Copyright 2024 Stacklok, 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. +// SPDX-FileCopyrightText: Copyright 2024 The Minder Authors +// SPDX-License-Identifier: Apache-2.0 // Package properties provides utility functions for fetching and managing properties package properties diff --git a/internal/providers/github/properties/artifact_test.go b/internal/providers/github/properties/artifact_test.go index 506c909607..3229442fea 100644 --- a/internal/providers/github/properties/artifact_test.go +++ b/internal/providers/github/properties/artifact_test.go @@ -1,17 +1,5 @@ -// -// Copyright 2024 Stacklok, 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. +// SPDX-FileCopyrightText: Copyright 2024 The Minder Authors +// SPDX-License-Identifier: Apache-2.0 // Package properties provides utility functions for fetching and managing properties package properties diff --git a/internal/providers/github/properties/fetcher.go b/internal/providers/github/properties/fetcher.go index 6eff1e252c..169c2a84e4 100644 --- a/internal/providers/github/properties/fetcher.go +++ b/internal/providers/github/properties/fetcher.go @@ -1,17 +1,5 @@ -// -// Copyright 2024 Stacklok, 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. +// SPDX-FileCopyrightText: Copyright 2024 The Minder Authors +// SPDX-License-Identifier: Apache-2.0 // Package properties provides utility functions for fetching and managing properties package properties diff --git a/internal/providers/github/properties/pull_request.go b/internal/providers/github/properties/pull_request.go index 527a344d2b..b6fae1b2fc 100644 --- a/internal/providers/github/properties/pull_request.go +++ b/internal/providers/github/properties/pull_request.go @@ -1,17 +1,5 @@ -// -// Copyright 2024 Stacklok, 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. +// SPDX-FileCopyrightText: Copyright 2024 The Minder Authors +// SPDX-License-Identifier: Apache-2.0 // Package properties provides utility functions for fetching and managing properties package properties diff --git a/internal/providers/github/properties/repository.go b/internal/providers/github/properties/repository.go index 2a95fcc459..768a485056 100644 --- a/internal/providers/github/properties/repository.go +++ b/internal/providers/github/properties/repository.go @@ -1,17 +1,5 @@ -// -// Copyright 2024 Stacklok, 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. +// SPDX-FileCopyrightText: Copyright 2024 The Minder Authors +// SPDX-License-Identifier: Apache-2.0 package properties diff --git a/internal/providers/github/service/service.go b/internal/providers/github/service/service.go index 0e69ff4b05..d583d67af8 100644 --- a/internal/providers/github/service/service.go +++ b/internal/providers/github/service/service.go @@ -1,17 +1,6 @@ // -// Copyright 2024 Stacklok, 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. +// SPDX-FileCopyrightText: Copyright 2024 The Minder Authors +// SPDX-License-Identifier: Apache-2.0 // Package service contains the GitHubProviderService package service diff --git a/internal/providers/github/service/service_test.go b/internal/providers/github/service/service_test.go index 6003666739..fc73778045 100644 --- a/internal/providers/github/service/service_test.go +++ b/internal/providers/github/service/service_test.go @@ -1,17 +1,6 @@ // -// Copyright 2024 Stacklok, 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. +// SPDX-FileCopyrightText: Copyright 2024 The Minder Authors +// SPDX-License-Identifier: Apache-2.0 package service diff --git a/internal/providers/github/webhook/app.go b/internal/providers/github/webhook/app.go index 4b7d5eef83..45df6cf61b 100644 --- a/internal/providers/github/webhook/app.go +++ b/internal/providers/github/webhook/app.go @@ -1,16 +1,5 @@ -// Copyright 2024 Stacklok, 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. +// SPDX-FileCopyrightText: Copyright 2024 The Minder Authors +// SPDX-License-Identifier: Apache-2.0 // Package webhook implements github webhook handlers for the github provider package webhook diff --git a/internal/providers/github/webhook/errors.go b/internal/providers/github/webhook/errors.go index 71a15c46c3..61d1b014c0 100644 --- a/internal/providers/github/webhook/errors.go +++ b/internal/providers/github/webhook/errors.go @@ -1,16 +1,5 @@ -// Copyright 2024 Stacklok, 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. +// SPDX-FileCopyrightText: Copyright 2024 The Minder Authors +// SPDX-License-Identifier: Apache-2.0 package webhook diff --git a/internal/providers/github/webhook/fuzz_test.go b/internal/providers/github/webhook/fuzz_test.go index a0e64ca4a6..2333c7e76e 100644 --- a/internal/providers/github/webhook/fuzz_test.go +++ b/internal/providers/github/webhook/fuzz_test.go @@ -1,17 +1,5 @@ -// -// Copyright 2024 Stacklok, 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. +// SPDX-FileCopyrightText: Copyright 2024 The Minder Authors +// SPDX-License-Identifier: Apache-2.0 package webhook diff --git a/internal/providers/github/webhook/handlers_githubwebhooks_test.go b/internal/providers/github/webhook/handlers_githubwebhooks_test.go index a25ac2a870..9e98bc0db6 100644 --- a/internal/providers/github/webhook/handlers_githubwebhooks_test.go +++ b/internal/providers/github/webhook/handlers_githubwebhooks_test.go @@ -1,17 +1,5 @@ -// -// Copyright 2023 Stacklok, 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. +// SPDX-FileCopyrightText: Copyright 2023 The Minder Authors +// SPDX-License-Identifier: Apache-2.0 package webhook diff --git a/internal/providers/github/webhook/handlers_packages.go b/internal/providers/github/webhook/handlers_packages.go index 3937bd01cc..9316c97541 100644 --- a/internal/providers/github/webhook/handlers_packages.go +++ b/internal/providers/github/webhook/handlers_packages.go @@ -1,16 +1,5 @@ -// Copyright 2024 Stacklok, 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. +// SPDX-FileCopyrightText: Copyright 2024 The Minder Authors +// SPDX-License-Identifier: Apache-2.0 package webhook diff --git a/internal/providers/github/webhook/handlers_ping.go b/internal/providers/github/webhook/handlers_ping.go index 6630ce8a0d..8eb24d39a6 100644 --- a/internal/providers/github/webhook/handlers_ping.go +++ b/internal/providers/github/webhook/handlers_ping.go @@ -1,16 +1,5 @@ -// Copyright 2024 Stacklok, 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. +// SPDX-FileCopyrightText: Copyright 2024 The Minder Authors +// SPDX-License-Identifier: Apache-2.0 package webhook diff --git a/internal/providers/github/webhook/handlers_pull_requests.go b/internal/providers/github/webhook/handlers_pull_requests.go index 751efedb8f..769b71f4ea 100644 --- a/internal/providers/github/webhook/handlers_pull_requests.go +++ b/internal/providers/github/webhook/handlers_pull_requests.go @@ -1,16 +1,5 @@ -// Copyright 2024 Stacklok, 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. +// SPDX-FileCopyrightText: Copyright 2024 The Minder Authors +// SPDX-License-Identifier: Apache-2.0 package webhook diff --git a/internal/providers/github/webhook/handlers_repos.go b/internal/providers/github/webhook/handlers_repos.go index 6ab79e462a..835e59c385 100644 --- a/internal/providers/github/webhook/handlers_repos.go +++ b/internal/providers/github/webhook/handlers_repos.go @@ -1,16 +1,5 @@ -// Copyright 2024 Stacklok, 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. +// SPDX-FileCopyrightText: Copyright 2024 The Minder Authors +// SPDX-License-Identifier: Apache-2.0 package webhook diff --git a/internal/providers/github/webhook/hook.go b/internal/providers/github/webhook/hook.go index 237f4c0904..fefa43c676 100644 --- a/internal/providers/github/webhook/hook.go +++ b/internal/providers/github/webhook/hook.go @@ -1,16 +1,5 @@ -// Copyright 2024 Stacklok, 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. +// SPDX-FileCopyrightText: Copyright 2024 The Minder Authors +// SPDX-License-Identifier: Apache-2.0 package webhook diff --git a/internal/providers/github/webhook/noop.go b/internal/providers/github/webhook/noop.go index 29ef7f11bf..481931fb73 100644 --- a/internal/providers/github/webhook/noop.go +++ b/internal/providers/github/webhook/noop.go @@ -1,16 +1,5 @@ -// Copyright 2024 Stacklok, 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. +// SPDX-FileCopyrightText: Copyright 2024 The Minder Authors +// SPDX-License-Identifier: Apache-2.0 package webhook diff --git a/internal/providers/gitlab/gitlab.go b/internal/providers/gitlab/gitlab.go index 39def87881..07ec824813 100644 --- a/internal/providers/gitlab/gitlab.go +++ b/internal/providers/gitlab/gitlab.go @@ -1,17 +1,5 @@ -// -// Copyright 2024 Stacklok, 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. +// SPDX-FileCopyrightText: Copyright 2024 The Minder Authors +// SPDX-License-Identifier: Apache-2.0 // Package gitlab provides the GitLab OAuth provider implementation package gitlab diff --git a/internal/providers/gitlab/gitlab_git.go b/internal/providers/gitlab/gitlab_git.go index 89d85baad8..da98b79a0a 100644 --- a/internal/providers/gitlab/gitlab_git.go +++ b/internal/providers/gitlab/gitlab_git.go @@ -1,17 +1,5 @@ -// -// Copyright 2024 Stacklok, 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. +// SPDX-FileCopyrightText: Copyright 2024 The Minder Authors +// SPDX-License-Identifier: Apache-2.0 package gitlab diff --git a/internal/providers/gitlab/gitlab_rest.go b/internal/providers/gitlab/gitlab_rest.go index 3422fb6067..4c5dab53a4 100644 --- a/internal/providers/gitlab/gitlab_rest.go +++ b/internal/providers/gitlab/gitlab_rest.go @@ -1,17 +1,5 @@ -// -// Copyright 2024 Stacklok, 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. +// SPDX-FileCopyrightText: Copyright 2024 The Minder Authors +// SPDX-License-Identifier: Apache-2.0 package gitlab diff --git a/internal/providers/gitlab/gitlab_rest_test.go b/internal/providers/gitlab/gitlab_rest_test.go index 21c155459b..edd5a8d6d2 100644 --- a/internal/providers/gitlab/gitlab_rest_test.go +++ b/internal/providers/gitlab/gitlab_rest_test.go @@ -1,17 +1,5 @@ -// -// Copyright 2024 Stacklok, 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. +// SPDX-FileCopyrightText: Copyright 2024 The Minder Authors +// SPDX-License-Identifier: Apache-2.0 package gitlab diff --git a/internal/providers/gitlab/manager/auth.go b/internal/providers/gitlab/manager/auth.go index d3551bd62b..aeaa3ea4eb 100644 --- a/internal/providers/gitlab/manager/auth.go +++ b/internal/providers/gitlab/manager/auth.go @@ -1,16 +1,5 @@ -// Copyright 2024 Stacklok, 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. +// SPDX-FileCopyrightText: Copyright 2024 The Minder Authors +// SPDX-License-Identifier: Apache-2.0 package manager diff --git a/internal/providers/gitlab/manager/manager.go b/internal/providers/gitlab/manager/manager.go index 399bc73195..41a7a20a44 100644 --- a/internal/providers/gitlab/manager/manager.go +++ b/internal/providers/gitlab/manager/manager.go @@ -1,16 +1,5 @@ -// Copyright 2024 Stacklok, 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. +// SPDX-FileCopyrightText: Copyright 2024 The Minder Authors +// SPDX-License-Identifier: Apache-2.0 // Package manager contains the GitLabProviderClassManager package manager diff --git a/internal/providers/gitlab/manager/manager_test.go b/internal/providers/gitlab/manager/manager_test.go index b7081cf105..7eb690a946 100644 --- a/internal/providers/gitlab/manager/manager_test.go +++ b/internal/providers/gitlab/manager/manager_test.go @@ -1,16 +1,5 @@ -// Copyright 2024 Stacklok, 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. +// SPDX-FileCopyrightText: Copyright 2024 The Minder Authors +// SPDX-License-Identifier: Apache-2.0 // Package manager contains the GitLabProviderClassManager package manager diff --git a/internal/providers/gitlab/manager/webhook.go b/internal/providers/gitlab/manager/webhook.go index fdbcdf05a6..a56e6009fc 100644 --- a/internal/providers/gitlab/manager/webhook.go +++ b/internal/providers/gitlab/manager/webhook.go @@ -1,16 +1,5 @@ -// Copyright 2024 Stacklok, 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. +// SPDX-FileCopyrightText: Copyright 2024 The Minder Authors +// SPDX-License-Identifier: Apache-2.0 package manager diff --git a/internal/providers/gitlab/manager/webhook_handlers_merge_requests.go b/internal/providers/gitlab/manager/webhook_handlers_merge_requests.go index 969b9cafb0..42f9c83150 100644 --- a/internal/providers/gitlab/manager/webhook_handlers_merge_requests.go +++ b/internal/providers/gitlab/manager/webhook_handlers_merge_requests.go @@ -1,16 +1,5 @@ -// Copyright 2024 Stacklok, 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. +// SPDX-FileCopyrightText: Copyright 2024 The Minder Authors +// SPDX-License-Identifier: Apache-2.0 package manager diff --git a/internal/providers/gitlab/manager/webhook_handlers_releases.go b/internal/providers/gitlab/manager/webhook_handlers_releases.go index 227afe76f6..92f0430586 100644 --- a/internal/providers/gitlab/manager/webhook_handlers_releases.go +++ b/internal/providers/gitlab/manager/webhook_handlers_releases.go @@ -1,16 +1,5 @@ -// Copyright 2024 Stacklok, 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. +// SPDX-FileCopyrightText: Copyright 2024 The Minder Authors +// SPDX-License-Identifier: Apache-2.0 package manager diff --git a/internal/providers/gitlab/manager/webhook_handlers_repos.go b/internal/providers/gitlab/manager/webhook_handlers_repos.go index b136354a28..01c46180df 100644 --- a/internal/providers/gitlab/manager/webhook_handlers_repos.go +++ b/internal/providers/gitlab/manager/webhook_handlers_repos.go @@ -1,16 +1,5 @@ -// Copyright 2024 Stacklok, 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. +// SPDX-FileCopyrightText: Copyright 2024 The Minder Authors +// SPDX-License-Identifier: Apache-2.0 package manager diff --git a/internal/providers/gitlab/properties.go b/internal/providers/gitlab/properties.go index 5526618b3d..2b61b30ed7 100644 --- a/internal/providers/gitlab/properties.go +++ b/internal/providers/gitlab/properties.go @@ -1,17 +1,5 @@ -// -// Copyright 2024 Stacklok, 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. +// SPDX-FileCopyrightText: Copyright 2024 The Minder Authors +// SPDX-License-Identifier: Apache-2.0 package gitlab diff --git a/internal/providers/gitlab/properties_test.go b/internal/providers/gitlab/properties_test.go index afe4fcb680..3745c1b271 100644 --- a/internal/providers/gitlab/properties_test.go +++ b/internal/providers/gitlab/properties_test.go @@ -1,17 +1,5 @@ -// -// Copyright 2024 Stacklok, 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. +// SPDX-FileCopyrightText: Copyright 2024 The Minder Authors +// SPDX-License-Identifier: Apache-2.0 package gitlab diff --git a/internal/providers/gitlab/pull_request_properties.go b/internal/providers/gitlab/pull_request_properties.go index 25cdaa62d4..a54cf97e1d 100644 --- a/internal/providers/gitlab/pull_request_properties.go +++ b/internal/providers/gitlab/pull_request_properties.go @@ -1,17 +1,5 @@ -// -// Copyright 2024 Stacklok, 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. +// SPDX-FileCopyrightText: Copyright 2024 The Minder Authors +// SPDX-License-Identifier: Apache-2.0 package gitlab diff --git a/internal/providers/gitlab/registration.go b/internal/providers/gitlab/registration.go index 03fc697e23..9af6974a80 100644 --- a/internal/providers/gitlab/registration.go +++ b/internal/providers/gitlab/registration.go @@ -1,17 +1,5 @@ -// -// Copyright 2024 Stacklok, 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. +// SPDX-FileCopyrightText: Copyright 2024 The Minder Authors +// SPDX-License-Identifier: Apache-2.0 package gitlab diff --git a/internal/providers/gitlab/registration_test.go b/internal/providers/gitlab/registration_test.go index bdaea923bc..794584441a 100644 --- a/internal/providers/gitlab/registration_test.go +++ b/internal/providers/gitlab/registration_test.go @@ -1,17 +1,5 @@ -// -// Copyright 2024 Stacklok, 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. +// SPDX-FileCopyrightText: Copyright 2024 The Minder Authors +// SPDX-License-Identifier: Apache-2.0 package gitlab diff --git a/internal/providers/gitlab/release_properties.go b/internal/providers/gitlab/release_properties.go index bf411a3a83..5b94133011 100644 --- a/internal/providers/gitlab/release_properties.go +++ b/internal/providers/gitlab/release_properties.go @@ -1,17 +1,5 @@ -// -// Copyright 2024 Stacklok, 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. +// SPDX-FileCopyrightText: Copyright 2024 The Minder Authors +// SPDX-License-Identifier: Apache-2.0 package gitlab diff --git a/internal/providers/gitlab/repo_lister.go b/internal/providers/gitlab/repo_lister.go index 49e824fd2c..4255e6f428 100644 --- a/internal/providers/gitlab/repo_lister.go +++ b/internal/providers/gitlab/repo_lister.go @@ -1,17 +1,5 @@ -// -// Copyright 2024 Stacklok, 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. +// SPDX-FileCopyrightText: Copyright 2024 The Minder Authors +// SPDX-License-Identifier: Apache-2.0 package gitlab diff --git a/internal/providers/gitlab/repository_properties.go b/internal/providers/gitlab/repository_properties.go index c75b8dd675..ab6a907128 100644 --- a/internal/providers/gitlab/repository_properties.go +++ b/internal/providers/gitlab/repository_properties.go @@ -1,17 +1,5 @@ -// -// Copyright 2024 Stacklok, 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. +// SPDX-FileCopyrightText: Copyright 2024 The Minder Authors +// SPDX-License-Identifier: Apache-2.0 package gitlab diff --git a/internal/providers/gitlab/webhooksecret/whsecret.go b/internal/providers/gitlab/webhooksecret/whsecret.go index cfb89fc74a..c0ea2c1f06 100644 --- a/internal/providers/gitlab/webhooksecret/whsecret.go +++ b/internal/providers/gitlab/webhooksecret/whsecret.go @@ -1,17 +1,5 @@ -// -// Copyright 2024 Stacklok, 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. +// SPDX-FileCopyrightText: Copyright 2024 The Minder Authors +// SPDX-License-Identifier: Apache-2.0 // Package webhooksecret provides a way to generate and verify secrets for GitLab webhooks. package webhooksecret diff --git a/internal/providers/gitlab/webhooksecret/whsecret_test.go b/internal/providers/gitlab/webhooksecret/whsecret_test.go index 1900c849dc..1e23ec54bf 100644 --- a/internal/providers/gitlab/webhooksecret/whsecret_test.go +++ b/internal/providers/gitlab/webhooksecret/whsecret_test.go @@ -1,17 +1,5 @@ -// -// Copyright 2024 Stacklok, 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. +// SPDX-FileCopyrightText: Copyright 2024 The Minder Authors +// SPDX-License-Identifier: Apache-2.0 package webhooksecret diff --git a/internal/providers/http/http.go b/internal/providers/http/http.go index 283a35fdbf..b5372cf967 100644 --- a/internal/providers/http/http.go +++ b/internal/providers/http/http.go @@ -1,16 +1,5 @@ -// Copyright 2023 Stacklok, 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. +// SPDX-FileCopyrightText: Copyright 2023 The Minder Authors +// SPDX-License-Identifier: Apache-2.0 // Package http implements an HTTP client for interacting with an HTTP API. package http diff --git a/internal/providers/manager/auth_manager.go b/internal/providers/manager/auth_manager.go index e78128ddf1..f4fee7fcee 100644 --- a/internal/providers/manager/auth_manager.go +++ b/internal/providers/manager/auth_manager.go @@ -1,17 +1,5 @@ -// -// Copyright 2023 Stacklok, 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. +// SPDX-FileCopyrightText: Copyright 2023 The Minder Authors +// SPDX-License-Identifier: Apache-2.0 //go:generate go run go.uber.org/mock/mockgen -package mock_$GOPACKAGE -destination=./mock/$GOFILE -source=./$GOFILE diff --git a/internal/providers/manager/auth_manager_test.go b/internal/providers/manager/auth_manager_test.go index f2eacf2da8..f64774d459 100644 --- a/internal/providers/manager/auth_manager_test.go +++ b/internal/providers/manager/auth_manager_test.go @@ -1,16 +1,5 @@ -// Copyright 2024 Stacklok, 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. +// SPDX-FileCopyrightText: Copyright 2024 The Minder Authors +// SPDX-License-Identifier: Apache-2.0 package manager_test diff --git a/internal/providers/manager/manager.go b/internal/providers/manager/manager.go index 009b1a5996..a11642cbcd 100644 --- a/internal/providers/manager/manager.go +++ b/internal/providers/manager/manager.go @@ -1,16 +1,5 @@ -// Copyright 2024 Stacklok, 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. +// SPDX-FileCopyrightText: Copyright 2024 The Minder Authors +// SPDX-License-Identifier: Apache-2.0 // Package manager contains logic for creating Provider instances package manager diff --git a/internal/providers/manager/manager_test.go b/internal/providers/manager/manager_test.go index ee71dfb7a2..b8a18fbe79 100644 --- a/internal/providers/manager/manager_test.go +++ b/internal/providers/manager/manager_test.go @@ -1,16 +1,5 @@ -// Copyright 2024 Stacklok, 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. +// SPDX-FileCopyrightText: Copyright 2024 The Minder Authors +// SPDX-License-Identifier: Apache-2.0 package manager_test diff --git a/internal/providers/manager/mock/fixtures/manager.go b/internal/providers/manager/mock/fixtures/manager.go index b82c5dde9c..ba982dc899 100644 --- a/internal/providers/manager/mock/fixtures/manager.go +++ b/internal/providers/manager/mock/fixtures/manager.go @@ -1,16 +1,5 @@ -// Copyright 2024 Stacklok, Inc -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance cf.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. +// SPDX-FileCopyrightText: Copyright 2024 The Minder Authors +// SPDX-License-Identifier: Apache-2.0 // Package fixtures contains code for creating ProfileService fixtures and is used in // various parts of the code. For testing use only. @@ -20,6 +9,7 @@ package fixtures import ( "errors" + mockmanager "github.com/mindersec/minder/internal/providers/manager/mock" provinfv1 "github.com/mindersec/minder/pkg/providers/v1" "go.uber.org/mock/gomock" diff --git a/internal/providers/mock/fixtures/store.go b/internal/providers/mock/fixtures/store.go index b9d0ef2c40..b23ce3dd47 100644 --- a/internal/providers/mock/fixtures/store.go +++ b/internal/providers/mock/fixtures/store.go @@ -1,16 +1,5 @@ -// Copyright 2024 Stacklok, Inc -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance cf.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. +// SPDX-FileCopyrightText: Copyright 2024 The Minder Authors +// SPDX-License-Identifier: Apache-2.0 // Package fixtures contains code for creating ProviderStore fixtures and is used in // various parts of the code. For testing use only. @@ -20,6 +9,7 @@ package fixtures import ( "errors" + "github.com/mindersec/minder/internal/db" mockprov "github.com/mindersec/minder/internal/providers/mock" "go.uber.org/mock/gomock" diff --git a/internal/providers/noop/noop.go b/internal/providers/noop/noop.go index 7ca25e6462..895f52a7cd 100644 --- a/internal/providers/noop/noop.go +++ b/internal/providers/noop/noop.go @@ -1,16 +1,5 @@ -// Copyright 2024 Stacklok, 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. +// SPDX-FileCopyrightText: Copyright 2024 The Minder Authors +// SPDX-License-Identifier: Apache-2.0 // Package noop provides a no-op provider implementation. package noop diff --git a/internal/providers/oci/oci.go b/internal/providers/oci/oci.go index ad76a8a60c..d6224ba3a7 100644 --- a/internal/providers/oci/oci.go +++ b/internal/providers/oci/oci.go @@ -1,16 +1,5 @@ -// Copyright 2024 Stacklok, 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. +// SPDX-FileCopyrightText: Copyright 2024 The Minder Authors +// SPDX-License-Identifier: Apache-2.0 // Package oci provides a client for interacting with OCI registries package oci diff --git a/internal/providers/provider_definitions.go b/internal/providers/provider_definitions.go index d2c1df9cba..162104e4df 100644 --- a/internal/providers/provider_definitions.go +++ b/internal/providers/provider_definitions.go @@ -1,16 +1,5 @@ -// Copyright 2024 Stacklok, 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. +// SPDX-FileCopyrightText: Copyright 2024 The Minder Authors +// SPDX-License-Identifier: Apache-2.0 package providers diff --git a/internal/providers/providers.go b/internal/providers/providers.go index 0865c30156..071837609d 100644 --- a/internal/providers/providers.go +++ b/internal/providers/providers.go @@ -1,16 +1,5 @@ -// Copyright 2023 Stacklok, 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. +// SPDX-FileCopyrightText: Copyright 2023 The Minder Authors +// SPDX-License-Identifier: Apache-2.0 // Package providers contains general utilities for interacting with // providers. diff --git a/internal/providers/ratecache/cache.go b/internal/providers/ratecache/cache.go index 59a72bc7f4..4c31a68e28 100644 --- a/internal/providers/ratecache/cache.go +++ b/internal/providers/ratecache/cache.go @@ -1,16 +1,5 @@ -// Copyright 2024 Stacklok, 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. +// SPDX-FileCopyrightText: Copyright 2024 The Minder Authors +// SPDX-License-Identifier: Apache-2.0 // Package ratecache provides a cache for the REST clients package ratecache diff --git a/internal/providers/ratecache/cache_test.go b/internal/providers/ratecache/cache_test.go index 426d3f2754..abeacc3854 100644 --- a/internal/providers/ratecache/cache_test.go +++ b/internal/providers/ratecache/cache_test.go @@ -1,15 +1,4 @@ -// Copyright 2024 Stacklok, 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. +// SPDX-FileCopyrightText: Copyright 2024 The Minder Authors +// SPDX-License-Identifier: Apache-2.0 package ratecache diff --git a/internal/providers/selectors/selector_entity.go b/internal/providers/selectors/selector_entity.go index b297cf5722..9aecc2c218 100644 --- a/internal/providers/selectors/selector_entity.go +++ b/internal/providers/selectors/selector_entity.go @@ -1,17 +1,5 @@ -// -// Copyright 2024 Stacklok, 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. +// SPDX-FileCopyrightText: Copyright 2024 The Minder Authors +// SPDX-License-Identifier: Apache-2.0 // Package selectors provides the conversion of entities to SelectorEntities package selectors diff --git a/internal/providers/selectors/selector_entity_test.go b/internal/providers/selectors/selector_entity_test.go index eaa5377ace..3a7549d856 100644 --- a/internal/providers/selectors/selector_entity_test.go +++ b/internal/providers/selectors/selector_entity_test.go @@ -1,17 +1,5 @@ -// -// Copyright 2024 Stacklok, 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. +// SPDX-FileCopyrightText: Copyright 2024 The Minder Authors +// SPDX-License-Identifier: Apache-2.0 package selectors diff --git a/internal/providers/session/service.go b/internal/providers/session/service.go index 57f78c985e..d41046980e 100644 --- a/internal/providers/session/service.go +++ b/internal/providers/session/service.go @@ -1,16 +1,5 @@ -// Copyright 2024 Stacklok, 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. +// SPDX-FileCopyrightText: Copyright 2024 The Minder Authors +// SPDX-License-Identifier: Apache-2.0 // Package session contains the business logic for creating providers from session state. package session diff --git a/internal/providers/store.go b/internal/providers/store.go index 0ec7c845f5..9c54e2705e 100644 --- a/internal/providers/store.go +++ b/internal/providers/store.go @@ -1,16 +1,5 @@ -// Copyright 2024 Stacklok, 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. +// SPDX-FileCopyrightText: Copyright 2024 The Minder Authors +// SPDX-License-Identifier: Apache-2.0 package providers diff --git a/internal/providers/telemetry/interface.go b/internal/providers/telemetry/interface.go index 928cc81ee7..3799027010 100644 --- a/internal/providers/telemetry/interface.go +++ b/internal/providers/telemetry/interface.go @@ -1,17 +1,5 @@ -// -// Copyright 2023 Stacklok, 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. +// SPDX-FileCopyrightText: Copyright 2023 The Minder Authors +// SPDX-License-Identifier: Apache-2.0 // Package telemetry provides the telemetry interfaces and implementations for providers package telemetry diff --git a/internal/providers/telemetry/noop.go b/internal/providers/telemetry/noop.go index 02047fb9e6..74a2a82313 100644 --- a/internal/providers/telemetry/noop.go +++ b/internal/providers/telemetry/noop.go @@ -1,17 +1,5 @@ -// -// Copyright 2023 Stacklok, 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. +// SPDX-FileCopyrightText: Copyright 2023 The Minder Authors +// SPDX-License-Identifier: Apache-2.0 package telemetry diff --git a/internal/providers/telemetry/telemetry.go b/internal/providers/telemetry/telemetry.go index 93d8f01870..01a300cd5b 100644 --- a/internal/providers/telemetry/telemetry.go +++ b/internal/providers/telemetry/telemetry.go @@ -1,17 +1,5 @@ -// -// Copyright 2023 Stacklok, 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. +// SPDX-FileCopyrightText: Copyright 2023 The Minder Authors +// SPDX-License-Identifier: Apache-2.0 package telemetry diff --git a/internal/providers/testproviders/doc.go b/internal/providers/testproviders/doc.go index 996ebc3d2f..0265d059a3 100644 --- a/internal/providers/testproviders/doc.go +++ b/internal/providers/testproviders/doc.go @@ -1,16 +1,5 @@ -// Copyright 2024 Stacklok, 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. +// SPDX-FileCopyrightText: Copyright 2024 The Minder Authors +// SPDX-License-Identifier: Apache-2.0 // Package testproviders provides test implementations of the provider interfaces. package testproviders diff --git a/internal/providers/testproviders/git.go b/internal/providers/testproviders/git.go index 11dfa88de9..59df2d2432 100644 --- a/internal/providers/testproviders/git.go +++ b/internal/providers/testproviders/git.go @@ -1,16 +1,5 @@ -// Copyright 2024 Stacklok, 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. +// SPDX-FileCopyrightText: Copyright 2024 The Minder Authors +// SPDX-License-Identifier: Apache-2.0 package testproviders diff --git a/internal/providers/testproviders/rest.go b/internal/providers/testproviders/rest.go index 5d2f3ad4a5..5d13d9ba8c 100644 --- a/internal/providers/testproviders/rest.go +++ b/internal/providers/testproviders/rest.go @@ -1,16 +1,5 @@ -// Copyright 2024 Stacklok, 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. +// SPDX-FileCopyrightText: Copyright 2024 The Minder Authors +// SPDX-License-Identifier: Apache-2.0 package testproviders diff --git a/internal/reconcilers/entity_add.go b/internal/reconcilers/entity_add.go index b102fc7b42..26c76f97a3 100644 --- a/internal/reconcilers/entity_add.go +++ b/internal/reconcilers/entity_add.go @@ -1,16 +1,5 @@ -// Copyright 2024 Stacklok, 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. +// SPDX-FileCopyrightText: Copyright 2024 The Minder Authors +// SPDX-License-Identifier: Apache-2.0 package reconcilers diff --git a/internal/reconcilers/entity_add_test.go b/internal/reconcilers/entity_add_test.go index 3110a5a5ff..6e9ebcba06 100644 --- a/internal/reconcilers/entity_add_test.go +++ b/internal/reconcilers/entity_add_test.go @@ -1,16 +1,5 @@ -// Copyright 2024 Stacklok, 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. +// SPDX-FileCopyrightText: Copyright 2024 The Minder Authors +// SPDX-License-Identifier: Apache-2.0 package reconcilers diff --git a/internal/reconcilers/entity_delete.go b/internal/reconcilers/entity_delete.go index cd37cfef08..9827de6ace 100644 --- a/internal/reconcilers/entity_delete.go +++ b/internal/reconcilers/entity_delete.go @@ -1,16 +1,5 @@ -// Copyright 2023 Stacklok, 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. +// SPDX-FileCopyrightText: Copyright 2023 The Minder Authors +// SPDX-License-Identifier: Apache-2.0 package reconcilers diff --git a/internal/reconcilers/entity_delete_test.go b/internal/reconcilers/entity_delete_test.go index 53750c7d56..3faf6d99a4 100644 --- a/internal/reconcilers/entity_delete_test.go +++ b/internal/reconcilers/entity_delete_test.go @@ -1,16 +1,5 @@ -// Copyright 2024 Stacklok, 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. +// SPDX-FileCopyrightText: Copyright 2024 The Minder Authors +// SPDX-License-Identifier: Apache-2.0 package reconcilers diff --git a/internal/reconcilers/messages/messages.go b/internal/reconcilers/messages/messages.go index e15ab80c74..67016cbe78 100644 --- a/internal/reconcilers/messages/messages.go +++ b/internal/reconcilers/messages/messages.go @@ -1,16 +1,5 @@ -// Copyright 2024 Stacklok, 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. +// SPDX-FileCopyrightText: Copyright 2024 The Minder Authors +// SPDX-License-Identifier: Apache-2.0 // Package messages contains messages structs and builders for events // handled by reconcilers. diff --git a/internal/reconcilers/reconcilers.go b/internal/reconcilers/reconcilers.go index a952b91f3e..9bdfab616e 100644 --- a/internal/reconcilers/reconcilers.go +++ b/internal/reconcilers/reconcilers.go @@ -1,16 +1,5 @@ -// Copyright 2023 Stacklok, 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. +// SPDX-FileCopyrightText: Copyright 2023 The Minder Authors +// SPDX-License-Identifier: Apache-2.0 // Package reconcilers contains the reconcilers for the various types of // entities in minder. diff --git a/internal/reconcilers/repository.go b/internal/reconcilers/repository.go index 0a8f421e1f..708b3f1146 100644 --- a/internal/reconcilers/repository.go +++ b/internal/reconcilers/repository.go @@ -1,16 +1,5 @@ -// Copyright 2023 Stacklok, 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. +// SPDX-FileCopyrightText: Copyright 2023 The Minder Authors +// SPDX-License-Identifier: Apache-2.0 package reconcilers diff --git a/internal/reconcilers/repository_test.go b/internal/reconcilers/repository_test.go index fb0e1bfca2..26153e40c6 100644 --- a/internal/reconcilers/repository_test.go +++ b/internal/reconcilers/repository_test.go @@ -1,16 +1,5 @@ -// Copyright 2023 Stacklok, 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. +// SPDX-FileCopyrightText: Copyright 2023 The Minder Authors +// SPDX-License-Identifier: Apache-2.0 package reconcilers diff --git a/internal/reconcilers/run_profile.go b/internal/reconcilers/run_profile.go index 7fd86b6da5..896b8e594c 100644 --- a/internal/reconcilers/run_profile.go +++ b/internal/reconcilers/run_profile.go @@ -1,16 +1,5 @@ -// Copyright 2023 Stacklok, 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. +// SPDX-FileCopyrightText: Copyright 2023 The Minder Authors +// SPDX-License-Identifier: Apache-2.0 package reconcilers diff --git a/internal/reconcilers/run_profile_test.go b/internal/reconcilers/run_profile_test.go index fdbc51730c..a6a29c805a 100644 --- a/internal/reconcilers/run_profile_test.go +++ b/internal/reconcilers/run_profile_test.go @@ -1,16 +1,5 @@ -// Copyright 2024 Stacklok, 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. +// SPDX-FileCopyrightText: Copyright 2024 The Minder Authors +// SPDX-License-Identifier: Apache-2.0 package reconcilers diff --git a/internal/reminder/logger/logger_setup.go b/internal/reminder/logger/logger_setup.go index 254038577f..b0532ce332 100644 --- a/internal/reminder/logger/logger_setup.go +++ b/internal/reminder/logger/logger_setup.go @@ -1,16 +1,5 @@ -// Copyright 2024 Stacklok, 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. +// SPDX-FileCopyrightText: Copyright 2024 The Minder Authors +// SPDX-License-Identifier: Apache-2.0 // Package logger provides the configuration for the reminder logger package logger diff --git a/internal/reminder/messages/messages.go b/internal/reminder/messages/messages.go index bc717d4ed1..ba908026ee 100644 --- a/internal/reminder/messages/messages.go +++ b/internal/reminder/messages/messages.go @@ -1,16 +1,5 @@ -// Copyright 2024 Stacklok, 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. +// SPDX-FileCopyrightText: Copyright 2024 The Minder Authors +// SPDX-License-Identifier: Apache-2.0 // Package messages contains the messages used by the reminder service package messages diff --git a/internal/reminder/reminder.go b/internal/reminder/reminder.go index cf9f5aa8f3..0505fa275a 100644 --- a/internal/reminder/reminder.go +++ b/internal/reminder/reminder.go @@ -1,16 +1,5 @@ -// Copyright 2024 Stacklok, 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. +// SPDX-FileCopyrightText: Copyright 2024 The Minder Authors +// SPDX-License-Identifier: Apache-2.0 // Package reminder sends reminders to the minder server to process entities in background. package reminder diff --git a/internal/reminder/reminder_test.go b/internal/reminder/reminder_test.go index a6f871c8ea..0566b97438 100644 --- a/internal/reminder/reminder_test.go +++ b/internal/reminder/reminder_test.go @@ -1,16 +1,5 @@ -// Copyright 2024 Stacklok, 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. +// SPDX-FileCopyrightText: Copyright 2024 The Minder Authors +// SPDX-License-Identifier: Apache-2.0 package reminder diff --git a/internal/reminder/sql_publisher.go b/internal/reminder/sql_publisher.go index 11e0f2acd1..383bd08548 100644 --- a/internal/reminder/sql_publisher.go +++ b/internal/reminder/sql_publisher.go @@ -1,17 +1,5 @@ -// -// Copyright 2024 Stacklok, 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. +// SPDX-FileCopyrightText: Copyright 2024 The Minder Authors +// SPDX-License-Identifier: Apache-2.0 package reminder diff --git a/internal/reminderprocessor/reminder_processor.go b/internal/reminderprocessor/reminder_processor.go index 89b6a39b7b..c9e3b6fab1 100644 --- a/internal/reminderprocessor/reminder_processor.go +++ b/internal/reminderprocessor/reminder_processor.go @@ -1,17 +1,5 @@ -// -// Copyright 2024 Stacklok, 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. +// SPDX-FileCopyrightText: Copyright 2024 The Minder Authors +// SPDX-License-Identifier: Apache-2.0 // Package reminderprocessor processes the incoming reminders package reminderprocessor diff --git a/internal/repositories/db.go b/internal/repositories/db.go index 7c620d1c05..ead6b5bcd2 100644 --- a/internal/repositories/db.go +++ b/internal/repositories/db.go @@ -1,16 +1,5 @@ -// Copyright 2024 Stacklok, 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. +// SPDX-FileCopyrightText: Copyright 2024 The Minder Authors +// SPDX-License-Identifier: Apache-2.0 // Package repositories contains logic relating to the repository entity type package repositories diff --git a/internal/repositories/mock/fixtures/service.go b/internal/repositories/mock/fixtures/service.go index 3a81d872cb..ad34557208 100644 --- a/internal/repositories/mock/fixtures/service.go +++ b/internal/repositories/mock/fixtures/service.go @@ -1,16 +1,5 @@ -// Copyright 2024 Stacklok, Inc -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance cf.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. +// SPDX-FileCopyrightText: Copyright 2024 The Minder Authors +// SPDX-License-Identifier: Apache-2.0 // Package fixtures contains code for creating RepositoryService // fixtures and is used in various parts of the code. For testing use diff --git a/internal/repositories/service.go b/internal/repositories/service.go index f72c9237b9..72f47a4ccf 100644 --- a/internal/repositories/service.go +++ b/internal/repositories/service.go @@ -1,16 +1,5 @@ -// Copyright 2024 Stacklok, 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. +// SPDX-FileCopyrightText: Copyright 2024 The Minder Authors +// SPDX-License-Identifier: Apache-2.0 // Package repositories contains logic relating to the management of repos package repositories diff --git a/internal/repositories/service_test.go b/internal/repositories/service_test.go index 34fca5cd77..a152db53ba 100644 --- a/internal/repositories/service_test.go +++ b/internal/repositories/service_test.go @@ -1,16 +1,5 @@ -// Copyright 2024 Stacklok, Inc -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance cf.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. +// SPDX-FileCopyrightText: Copyright 2024 The Minder Authors +// SPDX-License-Identifier: Apache-2.0 package repositories_test diff --git a/internal/roles/service.go b/internal/roles/service.go index 0a5776ce0e..b6015b3370 100644 --- a/internal/roles/service.go +++ b/internal/roles/service.go @@ -1,17 +1,5 @@ -// -// Copyright 2024 Stacklok, 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. +// SPDX-FileCopyrightText: Copyright 2024 The Minder Authors +// SPDX-License-Identifier: Apache-2.0 // Package roles contains the logic for managing user roles within a Minder project package roles diff --git a/internal/roles/service_test.go b/internal/roles/service_test.go index 1841ebc38b..f789d7ed18 100644 --- a/internal/roles/service_test.go +++ b/internal/roles/service_test.go @@ -1,17 +1,5 @@ -// -// Copyright 2024 Stacklok, 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. +// SPDX-FileCopyrightText: Copyright 2024 The Minder Authors +// SPDX-License-Identifier: Apache-2.0 package roles diff --git a/internal/ruletypes/mock/fixtures/service.go b/internal/ruletypes/mock/fixtures/service.go index 9143e9a5f0..ac84042ea6 100644 --- a/internal/ruletypes/mock/fixtures/service.go +++ b/internal/ruletypes/mock/fixtures/service.go @@ -1,16 +1,5 @@ -// Copyright 2024 Stacklok, Inc -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance cf.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. +// SPDX-FileCopyrightText: Copyright 2024 The Minder Authors +// SPDX-License-Identifier: Apache-2.0 // Package fixtures contains code for creating ProfileService fixtures and is used in // various parts of the code. For testing use only. @@ -20,6 +9,7 @@ package fixtures import ( "errors" + mockrulesvc "github.com/mindersec/minder/internal/ruletypes/mock" "go.uber.org/mock/gomock" ) diff --git a/internal/ruletypes/service.go b/internal/ruletypes/service.go index 72d7189851..1103b90271 100644 --- a/internal/ruletypes/service.go +++ b/internal/ruletypes/service.go @@ -1,16 +1,5 @@ -// Copyright 2024 Stacklok, 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. +// SPDX-FileCopyrightText: Copyright 2024 The Minder Authors +// SPDX-License-Identifier: Apache-2.0 // Package ruletypes contains logic relating to the management of rule types in // minder diff --git a/internal/ruletypes/service_test.go b/internal/ruletypes/service_test.go index 5cb3cdbd41..e5f8297077 100644 --- a/internal/ruletypes/service_test.go +++ b/internal/ruletypes/service_test.go @@ -1,16 +1,5 @@ -// Copyright 2024 Stacklok, 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. +// SPDX-FileCopyrightText: Copyright 2024 The Minder Authors +// SPDX-License-Identifier: Apache-2.0 package ruletypes_test diff --git a/internal/ruletypes/util.go b/internal/ruletypes/util.go index a78b08b5aa..fab420930f 100644 --- a/internal/ruletypes/util.go +++ b/internal/ruletypes/util.go @@ -1,16 +1,5 @@ -// Copyright 2024 Stacklok, 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. +// SPDX-FileCopyrightText: Copyright 2024 The Minder Authors +// SPDX-License-Identifier: Apache-2.0 package ruletypes diff --git a/internal/service/service.go b/internal/service/service.go index 204ecbedf4..d33505a147 100644 --- a/internal/service/service.go +++ b/internal/service/service.go @@ -1,17 +1,5 @@ -// -// Copyright 2023 Stacklok, 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. +// SPDX-FileCopyrightText: Copyright 2023 The Minder Authors +// SPDX-License-Identifier: Apache-2.0 // Package service contains the business logic for the minder services. package service diff --git a/internal/util/cache/cache.go b/internal/util/cache/cache.go index 55f916051f..60fed77760 100644 --- a/internal/util/cache/cache.go +++ b/internal/util/cache/cache.go @@ -1,16 +1,5 @@ -// Copyright 2024 Stacklok, 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. +// SPDX-FileCopyrightText: Copyright 2024 The Minder Authors +// SPDX-License-Identifier: Apache-2.0 // Package cache contains cache utilities and implementations package cache diff --git a/internal/util/cache/expiration_cache_test.go b/internal/util/cache/expiration_cache_test.go index ba6f28e7a0..263b46b482 100644 --- a/internal/util/cache/expiration_cache_test.go +++ b/internal/util/cache/expiration_cache_test.go @@ -1,16 +1,5 @@ -// Copyright 2024 Stacklok, 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. +// SPDX-FileCopyrightText: Copyright 2024 The Minder Authors +// SPDX-License-Identifier: Apache-2.0 package cache diff --git a/internal/util/cache/expirationcache.go b/internal/util/cache/expirationcache.go index ada92fb2e7..67c3030bf8 100644 --- a/internal/util/cache/expirationcache.go +++ b/internal/util/cache/expirationcache.go @@ -1,16 +1,5 @@ -// Copyright 2024 Stacklok, 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. +// SPDX-FileCopyrightText: Copyright 2024 The Minder Authors +// SPDX-License-Identifier: Apache-2.0 package cache diff --git a/internal/util/cli/cli.go b/internal/util/cli/cli.go index 4f199226f0..3620be050e 100644 --- a/internal/util/cli/cli.go +++ b/internal/util/cli/cli.go @@ -1,17 +1,5 @@ -// -// Copyright 2023 Stacklok, 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. +// SPDX-FileCopyrightText: Copyright 2023 The Minder Authors +// SPDX-License-Identifier: Apache-2.0 // Package cli contains utility for the cli package cli @@ -242,3 +230,14 @@ func GetRelevantCLIConfigPath(v *viper.Viper) string { GetDefaultCLIConfigPath(), )) } + +// IsYAMLFileAndNotATest checks if a file is a YAML file and not a test file +func IsYAMLFileAndNotATest(path string) bool { + return (filepath.Ext(path) == ".yaml" || filepath.Ext(path) == ".yml") && + !IsTestFile(path) +} + +// IsTestFile checks if a file is a test file. Test files are YAML files ending with .test.yaml or .test.yml +func IsTestFile(path string) bool { + return strings.HasSuffix(path, ".test.yaml") || strings.HasSuffix(path, ".test.yml") +} diff --git a/internal/util/cli/fuzz_test.go b/internal/util/cli/fuzz_test.go index 4c80b402f0..d21407f36b 100644 --- a/internal/util/cli/fuzz_test.go +++ b/internal/util/cli/fuzz_test.go @@ -1,17 +1,5 @@ -// -// Copyright 2024 Stacklok, 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. +// SPDX-FileCopyrightText: Copyright 2024 The Minder Authors +// SPDX-License-Identifier: Apache-2.0 package cli diff --git a/internal/util/cli/html/access_denied.html b/internal/util/cli/html/access_denied.html index 45a827a578..830eff09a6 100644 --- a/internal/util/cli/html/access_denied.html +++ b/internal/util/cli/html/access_denied.html @@ -1,18 +1,7 @@ diff --git a/internal/util/cli/html/generic_failure.html b/internal/util/cli/html/generic_failure.html index b1f093c666..d0ddcab8bb 100644 --- a/internal/util/cli/html/generic_failure.html +++ b/internal/util/cli/html/generic_failure.html @@ -1,18 +1,7 @@ diff --git a/internal/util/cli/html/login_success.html b/internal/util/cli/html/login_success.html index 82bddc5ec9..10d0d3b6aa 100644 --- a/internal/util/cli/html/login_success.html +++ b/internal/util/cli/html/login_success.html @@ -1,18 +1,7 @@ diff --git a/internal/util/cli/markdown.go b/internal/util/cli/markdown.go index 2193f2e5ae..7c7eb83109 100644 --- a/internal/util/cli/markdown.go +++ b/internal/util/cli/markdown.go @@ -1,17 +1,5 @@ -// -// Copyright 2024 Stacklok, 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. +// SPDX-FileCopyrightText: Copyright 2024 The Minder Authors +// SPDX-License-Identifier: Apache-2.0 package cli diff --git a/internal/util/cli/markdown_test.go b/internal/util/cli/markdown_test.go index 0b8ed918d1..dd5f4877cc 100644 --- a/internal/util/cli/markdown_test.go +++ b/internal/util/cli/markdown_test.go @@ -1,17 +1,5 @@ -// -// Copyright 2024 Stacklok, 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. +// SPDX-FileCopyrightText: Copyright 2024 The Minder Authors +// SPDX-License-Identifier: Apache-2.0 package cli diff --git a/internal/util/cli/multi_select.go b/internal/util/cli/multi_select.go index 397c3e21a3..4375b6ccbd 100644 --- a/internal/util/cli/multi_select.go +++ b/internal/util/cli/multi_select.go @@ -1,17 +1,5 @@ -// -// Copyright 2023 Stacklok, 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. +// SPDX-FileCopyrightText: Copyright 2023 The Minder Authors +// SPDX-License-Identifier: Apache-2.0 package cli diff --git a/internal/util/cli/providerconfig.go b/internal/util/cli/providerconfig.go index 2586920ba1..d8741495c5 100644 --- a/internal/util/cli/providerconfig.go +++ b/internal/util/cli/providerconfig.go @@ -1,17 +1,5 @@ -// -// Copyright 2024 Stacklok, 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. +// SPDX-FileCopyrightText: Copyright 2024 The Minder Authors +// SPDX-License-Identifier: Apache-2.0 package cli diff --git a/internal/util/cli/rpc_client.go b/internal/util/cli/rpc_client.go index 9e89b0b17c..785828214e 100644 --- a/internal/util/cli/rpc_client.go +++ b/internal/util/cli/rpc_client.go @@ -1,17 +1,5 @@ -// -// Copyright 2023 Stacklok, 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. +// SPDX-FileCopyrightText: Copyright 2023 The Minder Authors +// SPDX-License-Identifier: Apache-2.0 // Package cli contains utility for the cli package cli diff --git a/internal/util/cli/styles.go b/internal/util/cli/styles.go index bb2a4191e3..4973c54b85 100644 --- a/internal/util/cli/styles.go +++ b/internal/util/cli/styles.go @@ -1,17 +1,5 @@ -// -// Copyright 2023 Stacklok, 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. +// SPDX-FileCopyrightText: Copyright 2023 The Minder Authors +// SPDX-License-Identifier: Apache-2.0 package cli diff --git a/internal/util/cli/table/layouts/layouts.go b/internal/util/cli/table/layouts/layouts.go index 27970b78bb..507c642a06 100644 --- a/internal/util/cli/table/layouts/layouts.go +++ b/internal/util/cli/table/layouts/layouts.go @@ -1,16 +1,5 @@ -// Copyright 2023 Stacklok, 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. +// SPDX-FileCopyrightText: Copyright 2023 The Minder Authors +// SPDX-License-Identifier: Apache-2.0 // Package layouts defines the available table layouts package layouts diff --git a/internal/util/cli/table/simple/simple.go b/internal/util/cli/table/simple/simple.go index 710e7bd0fe..08f03d9a0c 100644 --- a/internal/util/cli/table/simple/simple.go +++ b/internal/util/cli/table/simple/simple.go @@ -1,16 +1,5 @@ -// Copyright 2023 Stacklok, 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. +// SPDX-FileCopyrightText: Copyright 2023 The Minder Authors +// SPDX-License-Identifier: Apache-2.0 // Package simple contains a simple table package simple diff --git a/internal/util/cli/table/table.go b/internal/util/cli/table/table.go index d32b1e39d4..0b79cb46dc 100644 --- a/internal/util/cli/table/table.go +++ b/internal/util/cli/table/table.go @@ -1,16 +1,5 @@ -// Copyright 2023 Stacklok, 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. +// SPDX-FileCopyrightText: Copyright 2023 The Minder Authors +// SPDX-License-Identifier: Apache-2.0 // Package table contains utilities for rendering tables package table diff --git a/internal/util/cli/useragent/useragent.go b/internal/util/cli/useragent/useragent.go index e2ac292ced..0b7efdade7 100644 --- a/internal/util/cli/useragent/useragent.go +++ b/internal/util/cli/useragent/useragent.go @@ -1,17 +1,5 @@ -// -// Copyright 2023 Stacklok, 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. +// SPDX-FileCopyrightText: Copyright 2023 The Minder Authors +// SPDX-License-Identifier: Apache-2.0 // Package useragent contains utilities for setting up the CLI's user agent package useragent diff --git a/internal/util/cursor/cursor.go b/internal/util/cursor/cursor.go index aeaed6cbd7..004235cd58 100644 --- a/internal/util/cursor/cursor.go +++ b/internal/util/cursor/cursor.go @@ -1,16 +1,5 @@ -// Copyright 2024 Stacklok, 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. +// SPDX-FileCopyrightText: Copyright 2024 The Minder Authors +// SPDX-License-Identifier: Apache-2.0 // Package cursor provides a way to encode and decode cursors for paginated queries package cursor diff --git a/internal/util/cursor/cursor_test.go b/internal/util/cursor/cursor_test.go index 292a7988d1..01e46e2e69 100644 --- a/internal/util/cursor/cursor_test.go +++ b/internal/util/cursor/cursor_test.go @@ -1,16 +1,5 @@ -// Copyright 2024 Stacklok, 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. +// SPDX-FileCopyrightText: Copyright 2024 The Minder Authors +// SPDX-License-Identifier: Apache-2.0 package cursor diff --git a/internal/util/helpers.go b/internal/util/helpers.go index ee6db33667..8effee7659 100644 --- a/internal/util/helpers.go +++ b/internal/util/helpers.go @@ -1,17 +1,5 @@ -// -// Copyright 2023 Stacklok, 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. +// SPDX-FileCopyrightText: Copyright 2023 The Minder Authors +// SPDX-License-Identifier: Apache-2.0 // Package util provides helper functions for the minder CLI. package util diff --git a/internal/util/helpers_test.go b/internal/util/helpers_test.go index 8c62482f0a..b65127a2a3 100644 --- a/internal/util/helpers_test.go +++ b/internal/util/helpers_test.go @@ -1,17 +1,5 @@ -// -// Copyright 2023 Stacklok, 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. +// SPDX-FileCopyrightText: Copyright 2023 The Minder Authors +// SPDX-License-Identifier: Apache-2.0 package util_test diff --git a/internal/util/jq.go b/internal/util/jq.go index 0dfa41e8fa..1ca6f42264 100644 --- a/internal/util/jq.go +++ b/internal/util/jq.go @@ -1,17 +1,5 @@ -// -// Copyright 2023 Stacklok, 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. +// SPDX-FileCopyrightText: Copyright 2023 The Minder Authors +// SPDX-License-Identifier: Apache-2.0 // Package util provides helper functions for the minder CLI. package util diff --git a/internal/util/jq_test.go b/internal/util/jq_test.go index 5d76c195a0..c6fc516ddc 100644 --- a/internal/util/jq_test.go +++ b/internal/util/jq_test.go @@ -1,17 +1,5 @@ -// -// Copyright 2023 Stacklok, 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. +// SPDX-FileCopyrightText: Copyright 2023 The Minder Authors +// SPDX-License-Identifier: Apache-2.0 // Package util provides helper functions for the minder CLI. package util_test diff --git a/internal/util/jsonyaml/jsonyamlutils.go b/internal/util/jsonyaml/jsonyamlutils.go index 89530a8de5..a39c93c45a 100644 --- a/internal/util/jsonyaml/jsonyamlutils.go +++ b/internal/util/jsonyaml/jsonyamlutils.go @@ -1,17 +1,5 @@ -// -// Copyright 2023 Stacklok, 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. +// SPDX-FileCopyrightText: Copyright 2023 The Minder Authors +// SPDX-License-Identifier: Apache-2.0 // Package jsonyaml contains utility functions for converting to/from json and yaml package jsonyaml diff --git a/internal/util/jsonyaml/jsonyamlutils_test.go b/internal/util/jsonyaml/jsonyamlutils_test.go index 784a5752cc..50e50a5cad 100644 --- a/internal/util/jsonyaml/jsonyamlutils_test.go +++ b/internal/util/jsonyaml/jsonyamlutils_test.go @@ -1,17 +1,5 @@ -// -// Copyright 2023 Stacklok, 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. +// SPDX-FileCopyrightText: Copyright 2023 The Minder Authors +// SPDX-License-Identifier: Apache-2.0 package jsonyaml_test diff --git a/internal/util/ptr/ptr.go b/internal/util/ptr/ptr.go index 7a86050677..97513f1859 100644 --- a/internal/util/ptr/ptr.go +++ b/internal/util/ptr/ptr.go @@ -1,16 +1,5 @@ -// Copyright 2024 Stacklok, 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. +// SPDX-FileCopyrightText: Copyright 2024 The Minder Authors +// SPDX-License-Identifier: Apache-2.0 // Package ptr contains the Ptr function package ptr diff --git a/internal/util/rand/random.go b/internal/util/rand/random.go index 90acd3c7f7..2cfb5cb7cc 100644 --- a/internal/util/rand/random.go +++ b/internal/util/rand/random.go @@ -1,17 +1,5 @@ -// -// Copyright 2023 Stacklok, 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. +// SPDX-FileCopyrightText: Copyright 2023 The Minder Authors +// SPDX-License-Identifier: Apache-2.0 // Package rand contains utility functions largely for unit testing. // WARNING: Do not use the functions in this package that generate rand / seeds diff --git a/internal/util/rand/random_test.go b/internal/util/rand/random_test.go index b4250f2353..1653ac45a2 100644 --- a/internal/util/rand/random_test.go +++ b/internal/util/rand/random_test.go @@ -1,17 +1,5 @@ -// -// Copyright 2023 Stacklok, 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. +// SPDX-FileCopyrightText: Copyright 2023 The Minder Authors +// SPDX-License-Identifier: Apache-2.0 package rand_test diff --git a/internal/util/rest.go b/internal/util/rest.go index 3a0ad53975..bae5685b71 100644 --- a/internal/util/rest.go +++ b/internal/util/rest.go @@ -1,17 +1,5 @@ -// -// Copyright 2023 Stacklok, 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. +// SPDX-FileCopyrightText: Copyright 2023 The Minder Authors +// SPDX-License-Identifier: Apache-2.0 // Package util provides helper functions for minder package util diff --git a/internal/util/rest_test.go b/internal/util/rest_test.go index fd45ffc181..198a68c55a 100644 --- a/internal/util/rest_test.go +++ b/internal/util/rest_test.go @@ -1,17 +1,5 @@ -// -// Copyright 2023 Stacklok, 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. +// SPDX-FileCopyrightText: Copyright 2023 The Minder Authors +// SPDX-License-Identifier: Apache-2.0 // Package util provides helper functions for minder package util_test diff --git a/internal/util/safe_template.go b/internal/util/safe_template.go index 9f291ddfd4..59c9be5f35 100644 --- a/internal/util/safe_template.go +++ b/internal/util/safe_template.go @@ -1,17 +1,5 @@ -// -// Copyright 2024 Stacklok, 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. +// SPDX-FileCopyrightText: Copyright 2024 The Minder Authors +// SPDX-License-Identifier: Apache-2.0 package util diff --git a/internal/util/safe_template_test.go b/internal/util/safe_template_test.go index a025971d69..f3d7fe1592 100644 --- a/internal/util/safe_template_test.go +++ b/internal/util/safe_template_test.go @@ -1,17 +1,5 @@ -// -// Copyright 2023 Stacklok, 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. +// SPDX-FileCopyrightText: Copyright 2023 The Minder Authors +// SPDX-License-Identifier: Apache-2.0 // Package util provides helper functions for minder package util_test diff --git a/internal/util/schemaupdate/schemaupdate.go b/internal/util/schemaupdate/schemaupdate.go index bb184b2fb7..297142eda3 100644 --- a/internal/util/schemaupdate/schemaupdate.go +++ b/internal/util/schemaupdate/schemaupdate.go @@ -1,16 +1,5 @@ -// Copyright 2023 Stacklok, 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. +// SPDX-FileCopyrightText: Copyright 2023 The Minder Authors +// SPDX-License-Identifier: Apache-2.0 // Package schemaupdate contains utility functions to compare two schemas // for updates diff --git a/internal/util/schemaupdate/schemaupdate_test.go b/internal/util/schemaupdate/schemaupdate_test.go index a5ed91ec35..c5e4df76ab 100644 --- a/internal/util/schemaupdate/schemaupdate_test.go +++ b/internal/util/schemaupdate/schemaupdate_test.go @@ -1,16 +1,5 @@ -// Copyright 2023 Stacklok, 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. +// SPDX-FileCopyrightText: Copyright 2023 The Minder Authors +// SPDX-License-Identifier: Apache-2.0 package schemaupdate_test diff --git a/internal/util/statuses.go b/internal/util/statuses.go index ef63bc0b1b..856ebc788c 100644 --- a/internal/util/statuses.go +++ b/internal/util/statuses.go @@ -1,17 +1,5 @@ -// -// Copyright 2023 Stacklok, 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. +// SPDX-FileCopyrightText: Copyright 2023 The Minder Authors +// SPDX-License-Identifier: Apache-2.0 // Package util provides helper functions for the minder CLI. package util diff --git a/internal/util/statuses_test.go b/internal/util/statuses_test.go index ec3ad146b5..80ed03587e 100644 --- a/internal/util/statuses_test.go +++ b/internal/util/statuses_test.go @@ -1,17 +1,5 @@ -// -// Copyright 2023 Stacklok, 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. +// SPDX-FileCopyrightText: Copyright 2023 The Minder Authors +// SPDX-License-Identifier: Apache-2.0 package util_test diff --git a/internal/util/testqueue/passthroughqueue.go b/internal/util/testqueue/passthroughqueue.go index ebe8768950..3b84192fec 100644 --- a/internal/util/testqueue/passthroughqueue.go +++ b/internal/util/testqueue/passthroughqueue.go @@ -1,17 +1,5 @@ -// -// Copyright 2023 Stacklok, 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. +// SPDX-FileCopyrightText: Copyright 2023 The Minder Authors +// SPDX-License-Identifier: Apache-2.0 // Package testqueue contains queue utilities for testing package testqueue diff --git a/internal/verifier/sigstore/container/container.go b/internal/verifier/sigstore/container/container.go index e80ea6f3a8..d4c8fcf50b 100644 --- a/internal/verifier/sigstore/container/container.go +++ b/internal/verifier/sigstore/container/container.go @@ -1,16 +1,5 @@ -// Copyright 2023 Stacklok, 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. +// SPDX-FileCopyrightText: Copyright 2023 The Minder Authors +// SPDX-License-Identifier: Apache-2.0 // Package container provides the tools to verify a container artifact using sigstore package container diff --git a/internal/verifier/sigstore/container/container_test.go b/internal/verifier/sigstore/container/container_test.go index a14fedd91c..246f01cbd9 100644 --- a/internal/verifier/sigstore/container/container_test.go +++ b/internal/verifier/sigstore/container/container_test.go @@ -1,16 +1,5 @@ -// Copyright 2024 Stacklok, 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. +// SPDX-FileCopyrightText: Copyright 2024 The Minder Authors +// SPDX-License-Identifier: Apache-2.0 package container diff --git a/internal/verifier/sigstore/sigstore.go b/internal/verifier/sigstore/sigstore.go index 9a750052a1..4e441b1448 100644 --- a/internal/verifier/sigstore/sigstore.go +++ b/internal/verifier/sigstore/sigstore.go @@ -1,16 +1,5 @@ -// Copyright 2023 Stacklok, 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. +// SPDX-FileCopyrightText: Copyright 2023 The Minder Authors +// SPDX-License-Identifier: Apache-2.0 // Package sigstore provides a client for verifying artifacts using sigstore package sigstore diff --git a/internal/verifier/sigstore/sigstore_test.go b/internal/verifier/sigstore/sigstore_test.go index f474baf94b..f28d38dd4e 100644 --- a/internal/verifier/sigstore/sigstore_test.go +++ b/internal/verifier/sigstore/sigstore_test.go @@ -1,16 +1,5 @@ -// Copyright 2024 Stacklok, 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. +// SPDX-FileCopyrightText: Copyright 2024 The Minder Authors +// SPDX-License-Identifier: Apache-2.0 package sigstore diff --git a/internal/verifier/verifier.go b/internal/verifier/verifier.go index ed1adf7200..96f342ee6b 100644 --- a/internal/verifier/verifier.go +++ b/internal/verifier/verifier.go @@ -1,16 +1,5 @@ -// Copyright 2023 Stacklok, 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. +// SPDX-FileCopyrightText: Copyright 2023 The Minder Authors +// SPDX-License-Identifier: Apache-2.0 // Package verifier provides a client for verifying various types of artifacts against various provenance mechanisms package verifier diff --git a/internal/verifier/verifyif/verifyif.go b/internal/verifier/verifyif/verifyif.go index 012fd3beaa..0f3c324b9c 100644 --- a/internal/verifier/verifyif/verifyif.go +++ b/internal/verifier/verifyif/verifyif.go @@ -1,16 +1,5 @@ -// Copyright 2023 Stacklok, 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. +// SPDX-FileCopyrightText: Copyright 2023 The Minder Authors +// SPDX-License-Identifier: Apache-2.0 // Package verifyif provides the interface for artifact verifiers, including // the Result type diff --git a/pkg/api/protobuf/go/minder/v1/entities.go b/pkg/api/protobuf/go/minder/v1/entities.go index fb72fc71a6..d1b11c78e8 100644 --- a/pkg/api/protobuf/go/minder/v1/entities.go +++ b/pkg/api/protobuf/go/minder/v1/entities.go @@ -1,16 +1,5 @@ -// Copyright 2023 Stacklok, 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. +// SPDX-FileCopyrightText: Copyright 2023 The Minder Authors +// SPDX-License-Identifier: Apache-2.0 package v1 diff --git a/pkg/api/protobuf/go/minder/v1/minder.pb.go b/pkg/api/protobuf/go/minder/v1/minder.pb.go index c7444568ec..446d145863 100644 --- a/pkg/api/protobuf/go/minder/v1/minder.pb.go +++ b/pkg/api/protobuf/go/minder/v1/minder.pb.go @@ -1,17 +1,5 @@ -// -// Copyright 2023 Stacklok, 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. +// SPDX-FileCopyrightText: Copyright 2023 The Minder Authors +// SPDX-License-Identifier: Apache-2.0 // Code generated by protoc-gen-go. DO NOT EDIT. // versions: diff --git a/pkg/api/protobuf/go/minder/v1/minder_grpc.pb.go b/pkg/api/protobuf/go/minder/v1/minder_grpc.pb.go index 5cfc8ad20d..003ff4fc49 100644 --- a/pkg/api/protobuf/go/minder/v1/minder_grpc.pb.go +++ b/pkg/api/protobuf/go/minder/v1/minder_grpc.pb.go @@ -1,17 +1,5 @@ -// -// Copyright 2023 Stacklok, 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. +// SPDX-FileCopyrightText: Copyright 2023 The Minder Authors +// SPDX-License-Identifier: Apache-2.0 // Code generated by protoc-gen-go-grpc. DO NOT EDIT. // versions: diff --git a/pkg/api/protobuf/go/minder/v1/profile.go b/pkg/api/protobuf/go/minder/v1/profile.go index f42e615d54..9ebdaa723c 100644 --- a/pkg/api/protobuf/go/minder/v1/profile.go +++ b/pkg/api/protobuf/go/minder/v1/profile.go @@ -1,16 +1,5 @@ -// Copyright 2023 Stacklok, 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. +// SPDX-FileCopyrightText: Copyright 2023 The Minder Authors +// SPDX-License-Identifier: Apache-2.0 package v1 diff --git a/pkg/api/protobuf/go/minder/v1/providers.go b/pkg/api/protobuf/go/minder/v1/providers.go index 0cce622313..c4b8b1e97f 100644 --- a/pkg/api/protobuf/go/minder/v1/providers.go +++ b/pkg/api/protobuf/go/minder/v1/providers.go @@ -1,16 +1,5 @@ -// Copyright 2023 Stacklok, 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. +// SPDX-FileCopyrightText: Copyright 2023 The Minder Authors +// SPDX-License-Identifier: Apache-2.0 package v1 diff --git a/pkg/api/protobuf/go/minder/v1/rule_types.go b/pkg/api/protobuf/go/minder/v1/rule_types.go index d8c1e7dd6b..31a62fbbad 100644 --- a/pkg/api/protobuf/go/minder/v1/rule_types.go +++ b/pkg/api/protobuf/go/minder/v1/rule_types.go @@ -1,16 +1,5 @@ -// Copyright 2023 Stacklok, 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. +// SPDX-FileCopyrightText: Copyright 2023 The Minder Authors +// SPDX-License-Identifier: Apache-2.0 package v1 diff --git a/pkg/api/protobuf/go/minder/v1/rule_types_test.go b/pkg/api/protobuf/go/minder/v1/rule_types_test.go index 92f706fd40..5aed052d1d 100644 --- a/pkg/api/protobuf/go/minder/v1/rule_types_test.go +++ b/pkg/api/protobuf/go/minder/v1/rule_types_test.go @@ -1,16 +1,5 @@ -// Copyright 2023 Stacklok, 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. +// SPDX-FileCopyrightText: Copyright 2023 The Minder Authors +// SPDX-License-Identifier: Apache-2.0 package v1_test diff --git a/pkg/api/protobuf/go/minder/v1/stringutils.go b/pkg/api/protobuf/go/minder/v1/stringutils.go index 414fbabf8f..151fef0aa0 100644 --- a/pkg/api/protobuf/go/minder/v1/stringutils.go +++ b/pkg/api/protobuf/go/minder/v1/stringutils.go @@ -1,16 +1,5 @@ -// Copyright 2023 Stacklok, 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. +// SPDX-FileCopyrightText: Copyright 2023 The Minder Authors +// SPDX-License-Identifier: Apache-2.0 package v1 diff --git a/pkg/api/protobuf/go/minder/v1/validators.go b/pkg/api/protobuf/go/minder/v1/validators.go index c608257b8a..8afbae0d89 100644 --- a/pkg/api/protobuf/go/minder/v1/validators.go +++ b/pkg/api/protobuf/go/minder/v1/validators.go @@ -1,16 +1,5 @@ -// Copyright 2023 Stacklok, 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. +// SPDX-FileCopyrightText: Copyright 2023 The Minder Authors +// SPDX-License-Identifier: Apache-2.0 package v1 diff --git a/pkg/engine/v1/interfaces/interfaces.go b/pkg/engine/v1/interfaces/interfaces.go new file mode 100644 index 0000000000..f7f499ac6a --- /dev/null +++ b/pkg/engine/v1/interfaces/interfaces.go @@ -0,0 +1,63 @@ +// SPDX-FileCopyrightText: Copyright 2024 The Minder Authors +// SPDX-License-Identifier: Apache-2.0 + +// Package interfaces contains the interfaces for the Minder policy engine. +package interfaces + +import ( + "context" + + "github.com/go-git/go-billy/v5" + "github.com/go-git/go-git/v5/storage" + "google.golang.org/protobuf/reflect/protoreflect" + + "github.com/mindersec/minder/pkg/entities/v1/checkpoints" +) + +// Ingester is the interface for a rule type ingester +type Ingester interface { + // Ingest does the actual data ingestion for a rule type + Ingest(ctx context.Context, ent protoreflect.ProtoMessage, params map[string]any) (*Result, error) + // GetType returns the type of the ingester + GetType() string + // GetConfig returns the config for the ingester + GetConfig() protoreflect.ProtoMessage +} + +// Evaluator is the interface for a rule type evaluator +type Evaluator interface { + Eval(ctx context.Context, profile map[string]any, entity protoreflect.ProtoMessage, res *Result) error +} + +// Result is the result of an ingester +type Result struct { + // Object is the object that was ingested. Normally comes from an external + // system like an HTTP server. + Object any + // Fs is the filesystem that was created as a result of the ingestion. This + // is normally used by the evaluator to do rule evaluation. The filesystem + // may be a git repo, or a memory filesystem. + Fs billy.Filesystem + // Storer is the git storer that was created as a result of the ingestion. + // FIXME: It might be cleaner to either wrap both Fs and Storer in a struct + // or pass out the git.Repository structure instead of the storer. + Storer storage.Storer + + // Checkpoint is the checkpoint at which the ingestion was done. This is + // used to persist the state of the entity at ingestion time. + Checkpoint *checkpoints.CheckpointEnvelopeV1 +} + +// GetCheckpoint returns the checkpoint of the result +func (r *Result) GetCheckpoint() *checkpoints.CheckpointEnvelopeV1 { + if r == nil { + return nil + } + + return r.Checkpoint +} + +// ResultSink sets the result of an ingestion +type ResultSink interface { + SetIngestResult(*Result) +} diff --git a/internal/engine/rtengine/engine.go b/pkg/engine/v1/rtengine/engine.go similarity index 69% rename from internal/engine/rtengine/engine.go rename to pkg/engine/v1/rtengine/engine.go index bf2f7ea619..39ac6aa355 100644 --- a/internal/engine/rtengine/engine.go +++ b/pkg/engine/v1/rtengine/engine.go @@ -1,16 +1,5 @@ -// Copyright 2023 Stacklok, 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. +// SPDX-FileCopyrightText: Copyright 2023 The Minder Authors +// SPDX-License-Identifier: Apache-2.0 // Package rtengine contains the rule type engine package rtengine @@ -22,16 +11,16 @@ import ( "strings" "github.com/rs/zerolog" + "google.golang.org/protobuf/reflect/protoreflect" - "github.com/mindersec/minder/internal/engine/entities" enginerr "github.com/mindersec/minder/internal/engine/errors" "github.com/mindersec/minder/internal/engine/eval" "github.com/mindersec/minder/internal/engine/ingestcache" "github.com/mindersec/minder/internal/engine/ingester" - engif "github.com/mindersec/minder/internal/engine/interfaces" eoptions "github.com/mindersec/minder/internal/engine/options" "github.com/mindersec/minder/internal/profiles" minderv1 "github.com/mindersec/minder/pkg/api/protobuf/go/minder/v1" + "github.com/mindersec/minder/pkg/engine/v1/interfaces" provinfv1 "github.com/mindersec/minder/pkg/providers/v1" ) @@ -61,10 +50,10 @@ type RuleTypeEngine struct { Meta RuleMeta // ingester is the rule data ingest engine - ingester engif.Ingester + ingester interfaces.Ingester // ruleEvaluator is the rule evaluator - ruleEvaluator engif.Evaluator + ruleEvaluator interfaces.Evaluator ruleValidator *profiles.RuleValidator @@ -142,35 +131,34 @@ func (r *RuleTypeEngine) GetRuleType() *minderv1.RuleType { // Eval runs the rule type engine against the given entity func (r *RuleTypeEngine) Eval( ctx context.Context, - inf *entities.EntityInfoWrapper, - params engif.EvalParamsReadWriter, + entity protoreflect.ProtoMessage, + ruleDef map[string]any, + ruleParams map[string]any, + params interfaces.ResultSink, ) (finalErr error) { + logger := zerolog.Ctx(ctx) defer func() { if r := recover(); r != nil { - zerolog.Ctx(ctx).Error().Interface("recovered", r). + logger.Error().Interface("recovered", r). Bytes("stack", debug.Stack()). Msg("panic in rule type engine") finalErr = enginerr.ErrInternal } }() - logger := zerolog.Ctx(ctx).With(). - Str("entity_type", inf.Type.ToString()). - Str("execution_id", inf.ExecutionID.String()).Logger() - logger.Info().Msg("entity evaluation - ingest started") // Try looking at the ingesting cache first - result, ok := r.ingestCache.Get(r.ingester, inf.Entity, params.GetRule().Params) + result, ok := r.ingestCache.Get(r.ingester, entity, ruleParams) if !ok { var err error // Ingest the data needed for the rule evaluation - result, err = r.ingester.Ingest(ctx, inf.Entity, params.GetRule().Params) + result, err = r.ingester.Ingest(ctx, entity, ruleParams) if err != nil { // Ingesting failed, so we can't evaluate the rule. // Note that for some types of ingesting the evalErr can already be set from the ingester. return fmt.Errorf("error ingesting data: %w", err) } - r.ingestCache.Set(r.ingester, inf.Entity, params.GetRule().Params, result) + r.ingestCache.Set(r.ingester, entity, ruleParams, result) } else { logger.Info().Str("id", r.GetID()).Msg("entity evaluation - ingest using cache") } @@ -179,30 +167,14 @@ func (r *RuleTypeEngine) Eval( // Process evaluation logger.Info().Msg("entity evaluation - evaluation started") - err := r.ruleEvaluator.Eval(ctx, params.GetRule().Def, inf.Entity, result) + err := r.ruleEvaluator.Eval(ctx, ruleDef, entity, result) logger.Info().Msg("entity evaluation - evaluation completed") return err } -// GetRulesFromProfileOfType returns the rules from the profile of the given type -func GetRulesFromProfileOfType(p *minderv1.Profile, rt *minderv1.RuleType) ([]*minderv1.Profile_Rule, error) { - contextualRules, err := profiles.GetRulesForEntity(p, minderv1.EntityFromString(rt.Def.InEntity)) - if err != nil { - return nil, fmt.Errorf("error getting rules for entity: %w", err) - } - - rules := []*minderv1.Profile_Rule{} - err = profiles.TraverseRules(contextualRules, func(r *minderv1.Profile_Rule) error { - if r.Type == rt.Name { - rules = append(rules, r) - } - return nil - }) - - // This shouldn't happen - if err != nil { - return nil, fmt.Errorf("error traversing rules: %w", err) - } - - return rules, nil +// WithCustomIngester sets a custom ingester for the rule type engine. This is handy for testing +// but should not be used in production. +func (r *RuleTypeEngine) WithCustomIngester(ing interfaces.Ingester) *RuleTypeEngine { + r.ingester = ing + return r } diff --git a/pkg/engine/v1/rtengine/engine_test.go b/pkg/engine/v1/rtengine/engine_test.go new file mode 100644 index 0000000000..9aa97169fc --- /dev/null +++ b/pkg/engine/v1/rtengine/engine_test.go @@ -0,0 +1,109 @@ +// SPDX-FileCopyrightText: Copyright 2023 The Minder Authors +// SPDX-License-Identifier: Apache-2.0 + +package rtengine + +import ( + "context" + "os" + "testing" + + "github.com/rs/zerolog" + "github.com/stretchr/testify/assert" + "github.com/stretchr/testify/require" + "google.golang.org/protobuf/reflect/protoreflect" + "google.golang.org/protobuf/types/known/structpb" + + "github.com/mindersec/minder/internal/util/ptr" + minderv1 "github.com/mindersec/minder/pkg/api/protobuf/go/minder/v1" + tkv1 "github.com/mindersec/minder/pkg/testkit/v1" +) + +func TestGitProvider(t *testing.T) { + t.Parallel() + + type ruleInstance struct { + Def map[string]any + Params map[string]any + } + tests := []struct { + name string + ent protoreflect.ProtoMessage + ruleType *minderv1.RuleType + ri ruleInstance + wantErr bool + dirSetup func(t *testing.T, tdir string) + }{ + { + name: "simple", + ent: &minderv1.Repository{ + CloneUrl: "foo", + }, + ruleType: &minderv1.RuleType{ + Context: &minderv1.Context{ + Project: ptr.Ptr("test"), + }, + Def: &minderv1.RuleType_Definition{ + InEntity: minderv1.RepositoryEntity.String(), + RuleSchema: &structpb.Struct{}, + Ingest: &minderv1.RuleType_Definition_Ingest{ + Type: "git", + }, + Eval: &minderv1.RuleType_Definition_Eval{ + Type: "rego", + Rego: &minderv1.RuleType_Definition_Eval_Rego{ + Type: "deny-by-default", + Def: `package minder +default allow = false + +allow { + file.exists("README.md") +}`, + }, + }, + }, + }, + ri: ruleInstance{ + Def: map[string]any{}, + Params: nil, + }, + wantErr: false, + dirSetup: func(t *testing.T, tdir string) { + t.Helper() + + err := os.WriteFile(tdir+"/README.md", []byte("hello"), 0600) + require.NoError(t, err, "os.WriteFile() failed") + }, + }, + } + + for _, tt := range tests { + t.Run(tt.name, func(t *testing.T) { + t.Parallel() + + // set up zerolog's test logger + tlw := zerolog.NewTestWriter(t) + ctx := zerolog.New(tlw).With().Logger().WithContext(context.Background()) + + tdir := t.TempDir() + + if tt.dirSetup != nil { + tt.dirSetup(t, tdir) + } + + tk := tkv1.NewTestKit(tkv1.WithGitDir(tdir)) + rte, err := NewRuleTypeEngine(ctx, tt.ruleType, tk) + require.NoError(t, err, "NewRuleTypeEngine() failed") + + // Override ingester. This is needed for the test. + rte.WithCustomIngester(tk) + + err = rte.Eval(ctx, tt.ent, tt.ri.Def, tt.ri.Params, tkv1.NewVoidResultSink()) + if tt.wantErr { + assert.Error(t, err, "Eval() should have failed") + } else { + assert.NoError(t, err, "Eval() failed") + } + }) + } +} diff --git a/internal/entities/checkpoints/checkpoints.go b/pkg/entities/v1/checkpoints/checkpoints.go similarity index 85% rename from internal/entities/checkpoints/checkpoints.go rename to pkg/entities/v1/checkpoints/checkpoints.go index a881a39028..b9aaa6a386 100644 --- a/internal/entities/checkpoints/checkpoints.go +++ b/pkg/entities/v1/checkpoints/checkpoints.go @@ -1,16 +1,5 @@ -// Copyright 2024 Stacklok, 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. +// SPDX-FileCopyrightText: Copyright 2024 The Minder Authors +// SPDX-License-Identifier: Apache-2.0 // Package checkpoints contains logic relating to checkpoint management for entities package checkpoints diff --git a/internal/entities/checkpoints/checkpoints_test.go b/pkg/entities/v1/checkpoints/checkpoints_test.go similarity index 85% rename from internal/entities/checkpoints/checkpoints_test.go rename to pkg/entities/v1/checkpoints/checkpoints_test.go index 7a11eeb387..1930a495f0 100644 --- a/internal/entities/checkpoints/checkpoints_test.go +++ b/pkg/entities/v1/checkpoints/checkpoints_test.go @@ -1,16 +1,5 @@ -// Copyright 2024 Stacklok, 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. +// SPDX-FileCopyrightText: Copyright 2024 The Minder Authors +// SPDX-License-Identifier: Apache-2.0 // Package checkpoints contains logic relating to checkpoint management for entities package checkpoints diff --git a/pkg/mindpak/build/packer.go b/pkg/mindpak/build/packer.go index 4a7c7bce68..4155196b68 100644 --- a/pkg/mindpak/build/packer.go +++ b/pkg/mindpak/build/packer.go @@ -1,17 +1,5 @@ -// -// Copyright 2024 Stacklok, 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. +// SPDX-FileCopyrightText: Copyright 2024 The Minder Authors +// SPDX-License-Identifier: Apache-2.0 // Package build implements tools and function to build mindpaks. The main // builder is build.Packer that writes the bundles to archives. diff --git a/pkg/mindpak/build/packer_test.go b/pkg/mindpak/build/packer_test.go index f2916896da..ede67c7846 100644 --- a/pkg/mindpak/build/packer_test.go +++ b/pkg/mindpak/build/packer_test.go @@ -1,17 +1,5 @@ -// -// Copyright 2024 Stacklok, 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. +// SPDX-FileCopyrightText: Copyright 2024 The Minder Authors +// SPDX-License-Identifier: Apache-2.0 // Package build implements tools and function to build mindpaks. The main // builder is build.Packer that writes the bundles to archives. diff --git a/pkg/mindpak/bundle.go b/pkg/mindpak/bundle.go index 368808d2e7..2ea8046ff6 100644 --- a/pkg/mindpak/bundle.go +++ b/pkg/mindpak/bundle.go @@ -1,17 +1,5 @@ -// -// Copyright 2024 Stacklok, 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. +// SPDX-FileCopyrightText: Copyright 2024 The Minder Authors +// SPDX-License-Identifier: Apache-2.0 // Package mindpak abstracts to bundle profiles and rule types together in // an artifact that allows for easy distribution and upgrade. diff --git a/pkg/mindpak/bundle_test.go b/pkg/mindpak/bundle_test.go index d8ad7ceb52..2eddfa99ed 100644 --- a/pkg/mindpak/bundle_test.go +++ b/pkg/mindpak/bundle_test.go @@ -1,17 +1,5 @@ -// -// Copyright 2024 Stacklok, 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. +// SPDX-FileCopyrightText: Copyright 2024 The Minder Authors +// SPDX-License-Identifier: Apache-2.0 package mindpak @@ -46,13 +34,13 @@ func TestReadSource(t *testing.T) { Profiles: []*File{ { Name: "branch-protection.yaml", - Hashes: map[HashAlgorithm]string{SHA256: "51437d1e5049a16513b9cc9d6d93d6b25625f51e74e0861fba837cdf1d2b5f01"}, + Hashes: map[HashAlgorithm]string{SHA256: "21e74a8d380c2940b0b26798f7ba7a5236b5444b02ff0bf45ce28f0016a24f65"}, }, }, RuleTypes: []*File{ { Name: "secret_scanning.yaml", - Hashes: map[HashAlgorithm]string{SHA256: "fc3e782516d0de46e89610af0b0bab04783e0e6e875c6efa64c9dfb3ef127964"}, + Hashes: map[HashAlgorithm]string{SHA256: "3857bca2ccabdac3d136eb3df4549ddd87a00ddef9fdcf88d8f824e5e796d34c"}, }, }, }, diff --git a/pkg/mindpak/manifest.go b/pkg/mindpak/manifest.go index 56b6ea817e..b5c35401cf 100644 --- a/pkg/mindpak/manifest.go +++ b/pkg/mindpak/manifest.go @@ -1,17 +1,5 @@ -// -// Copyright 2024 Stacklok, 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. +// SPDX-FileCopyrightText: Copyright 2024 The Minder Authors +// SPDX-License-Identifier: Apache-2.0 package mindpak diff --git a/pkg/mindpak/manifest_test.go b/pkg/mindpak/manifest_test.go index f8cbc32933..e1953b1a4b 100644 --- a/pkg/mindpak/manifest_test.go +++ b/pkg/mindpak/manifest_test.go @@ -1,17 +1,5 @@ -// -// Copyright 2024 Stacklok, 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. +// SPDX-FileCopyrightText: Copyright 2024 The Minder Authors +// SPDX-License-Identifier: Apache-2.0 package mindpak diff --git a/pkg/mindpak/mindpack.go b/pkg/mindpak/mindpack.go index 8a915a96e2..82f5a55ef3 100644 --- a/pkg/mindpak/mindpack.go +++ b/pkg/mindpak/mindpack.go @@ -1,17 +1,5 @@ -// -// Copyright 2024 Stacklok, 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. +// SPDX-FileCopyrightText: Copyright 2024 The Minder Authors +// SPDX-License-Identifier: Apache-2.0 // Package mindpak abstracts to bundle profiles and rule types together in // an artifact that allows for easy distribution and upgrade. diff --git a/pkg/mindpak/reader/reader.go b/pkg/mindpak/reader/reader.go index 6f68a84021..541f35d015 100644 --- a/pkg/mindpak/reader/reader.go +++ b/pkg/mindpak/reader/reader.go @@ -1,16 +1,5 @@ -// Copyright 2024 Stacklok, 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. +// SPDX-FileCopyrightText: Copyright 2024 The Minder Authors +// SPDX-License-Identifier: Apache-2.0 // Package reader contains logic for accessing the contents of a bundle package reader diff --git a/pkg/mindpak/reader/reader_test.go b/pkg/mindpak/reader/reader_test.go index 46375cca12..4e12b4225b 100644 --- a/pkg/mindpak/reader/reader_test.go +++ b/pkg/mindpak/reader/reader_test.go @@ -1,16 +1,5 @@ -// Copyright 2024 Stacklok, 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. +// SPDX-FileCopyrightText: Copyright 2024 The Minder Authors +// SPDX-License-Identifier: Apache-2.0 package reader_test diff --git a/pkg/mindpak/sources/source.go b/pkg/mindpak/sources/source.go index 9bfbfd8c75..68bc308a92 100644 --- a/pkg/mindpak/sources/source.go +++ b/pkg/mindpak/sources/source.go @@ -1,16 +1,5 @@ -// Copyright 2024 Stacklok, 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. +// SPDX-FileCopyrightText: Copyright 2024 The Minder Authors +// SPDX-License-Identifier: Apache-2.0 // Package sources contains logic for loading a bundle from a source of bundles package sources diff --git a/pkg/mindpak/sources/source_test.go b/pkg/mindpak/sources/source_test.go index 9baba4541c..316356eafe 100644 --- a/pkg/mindpak/sources/source_test.go +++ b/pkg/mindpak/sources/source_test.go @@ -1,16 +1,5 @@ -// Copyright 2024 Stacklok, 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. +// SPDX-FileCopyrightText: Copyright 2024 The Minder Authors +// SPDX-License-Identifier: Apache-2.0 package sources_test diff --git a/pkg/mindpak/testdata/t1/profiles/branch-protection.yaml b/pkg/mindpak/testdata/t1/profiles/branch-protection.yaml index 1e387f9ec1..eb498cfa85 100644 --- a/pkg/mindpak/testdata/t1/profiles/branch-protection.yaml +++ b/pkg/mindpak/testdata/t1/profiles/branch-protection.yaml @@ -1,17 +1,5 @@ -# -# Copyright 2024 Stacklok, 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. +# SPDX-FileCopyrightText: Copyright 2024 The Minder Authors +# SPDX-License-Identifier: Apache-2.0 --- # A profile to verify branch protection settings diff --git a/pkg/mindpak/testdata/t1/rule_types/secret_scanning.yaml b/pkg/mindpak/testdata/t1/rule_types/secret_scanning.yaml index d0c674241e..02ccd99e9d 100644 --- a/pkg/mindpak/testdata/t1/rule_types/secret_scanning.yaml +++ b/pkg/mindpak/testdata/t1/rule_types/secret_scanning.yaml @@ -1,17 +1,5 @@ -# -# Copyright 2024 Stacklok, 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. +# SPDX-FileCopyrightText: Copyright 2024 The Minder Authors +# SPDX-License-Identifier: Apache-2.0 --- version: v1 diff --git a/pkg/mindpak/testdata/t2/profiles/branch-protection-github-profile.yaml b/pkg/mindpak/testdata/t2/profiles/branch-protection-github-profile.yaml index 1e387f9ec1..eb498cfa85 100644 --- a/pkg/mindpak/testdata/t2/profiles/branch-protection-github-profile.yaml +++ b/pkg/mindpak/testdata/t2/profiles/branch-protection-github-profile.yaml @@ -1,17 +1,5 @@ -# -# Copyright 2024 Stacklok, 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. +# SPDX-FileCopyrightText: Copyright 2024 The Minder Authors +# SPDX-License-Identifier: Apache-2.0 --- # A profile to verify branch protection settings diff --git a/pkg/mindpak/testdata/t2/rule_types/branch_protection_enabled.yaml b/pkg/mindpak/testdata/t2/rule_types/branch_protection_enabled.yaml index 1e88d55fb2..a52760e808 100644 --- a/pkg/mindpak/testdata/t2/rule_types/branch_protection_enabled.yaml +++ b/pkg/mindpak/testdata/t2/rule_types/branch_protection_enabled.yaml @@ -1,17 +1,5 @@ -# -# Copyright 2024 Stacklok, 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. +# SPDX-FileCopyrightText: Copyright 2024 The Minder Authors +# SPDX-License-Identifier: Apache-2.0 --- version: v1 diff --git a/pkg/mindpak/types.go b/pkg/mindpak/types.go index fe33d15e1d..50642231d7 100644 --- a/pkg/mindpak/types.go +++ b/pkg/mindpak/types.go @@ -1,16 +1,5 @@ -// Copyright 2024 Stacklok, 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. +// SPDX-FileCopyrightText: Copyright 2024 The Minder Authors +// SPDX-License-Identifier: Apache-2.0 package mindpak diff --git a/pkg/providers/v1/credentials.go b/pkg/providers/v1/credentials.go index 8c41ac024d..506d55c047 100644 --- a/pkg/providers/v1/credentials.go +++ b/pkg/providers/v1/credentials.go @@ -1,16 +1,5 @@ -// Copyright 2024 Stacklok, 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. +// SPDX-FileCopyrightText: Copyright 2024 The Minder Authors +// SPDX-License-Identifier: Apache-2.0 // Package v1 for providers provides the public interfaces for the providers // implemented by minder. The providers are the sources of the data diff --git a/pkg/providers/v1/errors.go b/pkg/providers/v1/errors.go index ceb6c0096d..f273fa4e43 100644 --- a/pkg/providers/v1/errors.go +++ b/pkg/providers/v1/errors.go @@ -1,16 +1,5 @@ -// Copyright 2023 Stacklok, 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. +// SPDX-FileCopyrightText: Copyright 2023 The Minder Authors +// SPDX-License-Identifier: Apache-2.0 package v1 diff --git a/pkg/providers/v1/providers.go b/pkg/providers/v1/providers.go index 8a180c2fa6..ef27ef01ef 100644 --- a/pkg/providers/v1/providers.go +++ b/pkg/providers/v1/providers.go @@ -1,16 +1,5 @@ -// Copyright 2023 Stacklok, 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. +// SPDX-FileCopyrightText: Copyright 2023 The Minder Authors +// SPDX-License-Identifier: Apache-2.0 // Package v1 for providers provides the public interfaces for the providers // implemented by minder. The providers are the sources of the data diff --git a/pkg/rule_methods/rule_methods.go b/pkg/rule_methods/rule_methods.go index 404a53a956..77773bbdd5 100644 --- a/pkg/rule_methods/rule_methods.go +++ b/pkg/rule_methods/rule_methods.go @@ -1,16 +1,5 @@ -// Copyright 2023 Stacklok, 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. +// SPDX-FileCopyrightText: Copyright 2023 The Minder Authors +// SPDX-License-Identifier: Apache-2.0 // Package rule_methods provides the methods that are used by the rules package rule_methods diff --git a/pkg/testkit/v1/testkit.go b/pkg/testkit/v1/testkit.go new file mode 100644 index 0000000000..60cc0ec000 --- /dev/null +++ b/pkg/testkit/v1/testkit.go @@ -0,0 +1,62 @@ +// SPDX-FileCopyrightText: Copyright 2024 The Minder Authors +// SPDX-License-Identifier: Apache-2.0 + +// Package v1 contains the v1 version of the testkit package. This is meant to +// aid developers in testing out minder rule types and other components. +package v1 + +import ( + "net/http/httptest" + + "github.com/mindersec/minder/internal/engine/ingester/git" +) + +// TestKit implements a set of interfaces for testing +// purposes. e.g. for testing rule types. +type TestKit struct { + ingestType string + // gitDir is the directory where the git repository is cloned + gitDir string + + // HTTP + httpRecorder *httptest.ResponseRecorder + httpStatus int + httpBody []byte + httpHeaders map[string]string +} + +// Option is a functional option type for TestKit +type Option func(*TestKit) + +// WithGitDir is a functional option to set the git directory +// Note that if the `git` ingest type is used, you need to overwrite the +// ingester in the rule type engine. +func WithGitDir(dir string) Option { + return func(tp *TestKit) { + tp.ingestType = git.GitRuleDataIngestType + tp.gitDir = dir + } +} + +// WithHTTP is a functional option to set the HTTP response +func WithHTTP(status int, body []byte, headers map[string]string) Option { + return func(tp *TestKit) { + tp.httpRecorder = httptest.NewRecorder() + tp.httpStatus = status + tp.httpBody = body + tp.httpHeaders = headers + } +} + +// NewTestKit creates a new TestKit +func NewTestKit(opts ...Option) *TestKit { + pt := &TestKit{ + gitDir: ".", + } + + for _, opt := range opts { + opt(pt) + } + + return pt +} diff --git a/pkg/testkit/v1/testkit_ingest.go b/pkg/testkit/v1/testkit_ingest.go new file mode 100644 index 0000000000..103cb9cf1f --- /dev/null +++ b/pkg/testkit/v1/testkit_ingest.go @@ -0,0 +1,57 @@ +// SPDX-FileCopyrightText: Copyright 2024 The Minder Authors +// SPDX-License-Identifier: Apache-2.0 + +package v1 + +import ( + "context" + "errors" + + "github.com/go-git/go-billy/v5/osfs" + "google.golang.org/protobuf/reflect/protoreflect" + + "github.com/mindersec/minder/internal/engine/ingester/git" + "github.com/mindersec/minder/pkg/engine/v1/interfaces" +) + +var ( + // ErrIngestUnimplemented is returned when the ingester is not implemented + ErrIngestUnimplemented = errors.New("ingester not implemented") +) + +// Ensure that TestKit implements the Ingester interface +var _ interfaces.Ingester = &TestKit{} + +// Ingest is a stub implementation of the ingester +func (tk *TestKit) Ingest( + ctx context.Context, ent protoreflect.ProtoMessage, params map[string]any, +) (*interfaces.Result, error) { + if tk.ingestType == git.GitRuleDataIngestType { + return tk.fakeGit(ctx, ent, params) + } + return nil, ErrIngestUnimplemented +} + +// ShouldOverrideIngest returns true if the ingester should override the ingest +func (tk *TestKit) ShouldOverrideIngest() bool { + return tk.ingestType == git.GitRuleDataIngestType +} + +// GetType returns the type of the ingester +func (_ *TestKit) GetType() string { + return "testkit" +} + +// GetConfig returns the config for the ingester +func (_ *TestKit) GetConfig() protoreflect.ProtoMessage { + return nil +} + +func (tk *TestKit) fakeGit( + _ context.Context, _ protoreflect.ProtoMessage, _ map[string]any, +) (*interfaces.Result, error) { + fs := osfs.New(tk.gitDir) + return &interfaces.Result{ + Fs: fs, + }, nil +} diff --git a/pkg/testkit/v1/testkit_provider.go b/pkg/testkit/v1/testkit_provider.go new file mode 100644 index 0000000000..05c12743ff --- /dev/null +++ b/pkg/testkit/v1/testkit_provider.go @@ -0,0 +1,80 @@ +// SPDX-FileCopyrightText: Copyright 2024 The Minder Authors +// SPDX-License-Identifier: Apache-2.0 + +package v1 + +import ( + "context" + "errors" + + "github.com/go-git/go-git/v5" + "google.golang.org/protobuf/reflect/protoreflect" + + "github.com/mindersec/minder/internal/entities/properties" + minderv1 "github.com/mindersec/minder/pkg/api/protobuf/go/minder/v1" + provv1 "github.com/mindersec/minder/pkg/providers/v1" +) + +var ( + // ErrNotIngeserOverridden is returned when a provider trait is not overridden. + ErrNotIngeserOverridden = errors.New("ingester not overridden") +) + +// Ensure that TestKit implements the Provider interface +var _ provv1.Provider = &TestKit{} + +// CanImplement implements the Provider interface. +// It returns true since we don't have any restrictions on the provider. +func (_ *TestKit) CanImplement(_ minderv1.ProviderType) bool { + return true +} + +// FetchAllProperties implements the Provider interface. +func (_ *TestKit) FetchAllProperties( + _ context.Context, _ *properties.Properties, _ minderv1.Entity, _ *properties.Properties, +) (*properties.Properties, error) { + return nil, nil +} + +// FetchProperty implements the Provider interface. +func (_ *TestKit) FetchProperty( + _ context.Context, _ *properties.Properties, _ minderv1.Entity, _ string) (*properties.Property, error) { + return nil, nil +} + +// GetEntityName implements the Provider interface. +func (_ *TestKit) GetEntityName(_ minderv1.Entity, _ *properties.Properties) (string, error) { + return "", nil +} + +// SupportsEntity implements the Provider interface. +func (_ *TestKit) SupportsEntity(_ minderv1.Entity) bool { + return true +} + +// RegisterEntity implements the Provider interface. +func (_ *TestKit) RegisterEntity(_ context.Context, _ minderv1.Entity, _ *properties.Properties) (*properties.Properties, error) { + return nil, nil +} + +// DeregisterEntity implements the Provider interface. +func (_ *TestKit) DeregisterEntity(_ context.Context, _ minderv1.Entity, _ *properties.Properties) error { + return nil +} + +// ReregisterEntity implements the Provider interface. +func (_ *TestKit) ReregisterEntity(_ context.Context, _ minderv1.Entity, _ *properties.Properties) error { + return nil +} + +// PropertiesToProtoMessage implements the Provider interface. +func (_ *TestKit) PropertiesToProtoMessage(_ minderv1.Entity, _ *properties.Properties) (protoreflect.ProtoMessage, error) { + return nil, nil +} + +// Clone Implements the Git trait. This is a stub implementation that allows us to instantiate a Git ingester. +// This will later be overridden by the actual implementation. +func (_ *TestKit) Clone(_ context.Context, _ string, _ string) (*git.Repository, error) { + // Note that this should not be called. If it is, it means that the ingester has not been overridden. + return nil, ErrNotIngeserOverridden +} diff --git a/pkg/testkit/v1/testkit_rest.go b/pkg/testkit/v1/testkit_rest.go new file mode 100644 index 0000000000..b85c7bc432 --- /dev/null +++ b/pkg/testkit/v1/testkit_rest.go @@ -0,0 +1,50 @@ +// SPDX-FileCopyrightText: Copyright 2024 The Minder Authors +// SPDX-License-Identifier: Apache-2.0 + +package v1 + +import ( + "bytes" + "context" + "io" + "net/http" + "net/http/httptest" + + "github.com/rs/zerolog" +) + +// GetBaseURL implements the REST interface. +func (_ *TestKit) GetBaseURL() string { + return "" +} + +// NewRequest implements the REST interface. +func (_ *TestKit) NewRequest(method, url string, body any) (*http.Request, error) { + var r io.Reader + if body != nil { + r = bytes.NewReader(body.([]byte)) + } + return httptest.NewRequest(method, url, r), nil +} + +// Do executes an HTTP request. +func (tk *TestKit) Do(ctx context.Context, req *http.Request) (*http.Response, error) { + zerolog.Ctx(ctx).Debug(). + Str("component", "testkit"). + Str("method", req.Method). + Str("url", req.URL.String()). + Msg("HTTP request") + + h := func(w http.ResponseWriter, _ *http.Request) { + for k, v := range tk.httpHeaders { + w.Header().Set(k, v) + } + + w.WriteHeader(tk.httpStatus) + _, _ = w.Write(tk.httpBody) + } + + h(tk.httpRecorder, req) + + return tk.httpRecorder.Result(), nil +} diff --git a/pkg/testkit/v1/voidresultsink.go b/pkg/testkit/v1/voidresultsink.go new file mode 100644 index 0000000000..f0588994c9 --- /dev/null +++ b/pkg/testkit/v1/voidresultsink.go @@ -0,0 +1,18 @@ +// SPDX-FileCopyrightText: Copyright 2024 The Minder Authors +// SPDX-License-Identifier: Apache-2.0 + +package v1 + +import "github.com/mindersec/minder/pkg/engine/v1/interfaces" + +// VoidResultSink is a result sink that does nothing +type VoidResultSink struct{} + +// NewVoidResultSink creates a new void result sink +func NewVoidResultSink() *VoidResultSink { + return &VoidResultSink{} +} + +// SetIngestResult implements the ResultSink interface +func (VoidResultSink) SetIngestResult(_ *interfaces.Result) { +} diff --git a/proto/buf.yaml b/proto/buf.yaml index 8c5dc03c8f..095a0725c0 100644 --- a/proto/buf.yaml +++ b/proto/buf.yaml @@ -1,17 +1,5 @@ -# -# Copyright 2023 Stacklok, 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. +# SPDX-FileCopyrightText: Copyright 2023 The Minder Authors +# SPDX-License-Identifier: Apache-2.0 version: v1 name: buf.build/mindersec/minder diff --git a/proto/minder/v1/minder.proto b/proto/minder/v1/minder.proto index 48d5dd0e27..1f6a8e2fd8 100644 --- a/proto/minder/v1/minder.proto +++ b/proto/minder/v1/minder.proto @@ -1,17 +1,6 @@ -// -// Copyright 2023 Stacklok, 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. +// SPDX-FileCopyrightText: Copyright 2023 The Minder Authors +// SPDX-License-Identifier: Apache-2.0 + syntax = "proto3"; package minder.v1; @@ -2756,4 +2745,4 @@ message UpstreamEntityRef { // and will be a subset of the properties of the entity that will // be stored in Minder. google.protobuf.Struct properties = 3; -} \ No newline at end of file +} diff --git a/sqlc.yaml b/sqlc.yaml index bbf74cde10..97dd3432da 100644 --- a/sqlc.yaml +++ b/sqlc.yaml @@ -1,17 +1,5 @@ -# -# Copyright 2023 Stacklok, 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. +# SPDX-FileCopyrightText: Copyright 2023 The Minder Authors +# SPDX-License-Identifier: Apache-2.0 version: "2" sql: diff --git a/tools/tools.go b/tools/tools.go index abd6a64fa4..123476def3 100644 --- a/tools/tools.go +++ b/tools/tools.go @@ -1,17 +1,5 @@ -// -// Copyright 2023 Stacklok, 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. +// SPDX-FileCopyrightText: Copyright 2023 The Minder Authors +// SPDX-License-Identifier: Apache-2.0 //go:build tools