diff --git a/.github/pull_request_template.md b/.github/pull_request_template.md index cd43ce597c..741f989110 100644 --- a/.github/pull_request_template.md +++ b/.github/pull_request_template.md @@ -1,3 +1,8 @@ + # Changes diff --git a/SECURITY.md b/SECURITY.md index ce94c63ab9..55603b668c 100644 --- a/SECURITY.md +++ b/SECURITY.md @@ -1,3 +1,8 @@ + # Shipwright Security and Disclosure Information Shipwright encourages all users and contributors to report potential security vulnerabilities to the project maintainers. diff --git a/cmd/manager/main.go b/cmd/manager/main.go index b1d965076b..5eef103a1e 100644 --- a/cmd/manager/main.go +++ b/cmd/manager/main.go @@ -125,7 +125,7 @@ func main() { buildMetrics.InitPrometheus(buildCfg) // Add optionally configured extra handlers to metrics endpoint - for path, handler := range buildMetrics.MetricsExtraHandlers() { + for path, handler := range buildMetrics.ExtraHandlers() { ctxlog.Info(ctx, "Adding metrics extra handler path", "path", path) if err := mgr.AddMetricsExtraHandler(path, handler); err != nil { ctxlog.Error(ctx, err, "") diff --git a/docs/proposals/dedicated-shipwright-operator.md b/docs/proposals/dedicated-shipwright-operator.md index ad79d64b89..f992cd73ad 100644 --- a/docs/proposals/dedicated-shipwright-operator.md +++ b/docs/proposals/dedicated-shipwright-operator.md @@ -139,7 +139,7 @@ Deleting the `ShipwrightBuild` instance should remove the associated deployment However, the Build API CRDs will remain on the cluster, as these will be managed by OLM. At present, OLM does not delete CRDs and CRD instances if the associated operator is removed. -This is by design to ensure user data is not accidently deleted - see [operator-framework/operator-lifecycle-manager#1326](https://github.com/operator-framework/operator-lifecycle-manager/issues/1326). +This is by design to ensure user data is not accidentally deleted - see [operator-framework/operator-lifecycle-manager#1326](https://github.com/operator-framework/operator-lifecycle-manager/issues/1326). #### Installed Custom Resource Definitions @@ -161,7 +161,7 @@ This would be useful if Project Shipwright produces additional components and cl **Risk**: Manifests uses to deploy Shipwright Builds in the `shipwright-io/operator` are not synchronized with content in `shipwright-io/build`. *Mitigation*: The operator's CI should include a test suite that runs the e2e tests in `shipwright-io/build`. -Project maintainers should also ensure that deployment changes to `shipwright-io/build` carry accross to the operator. +Project maintainers should also ensure that deployment changes to `shipwright-io/build` carry across to the operator. **Risk**: Operator will require permissions cluster admins will reject (ex - modify CRDs) diff --git a/pkg/metrics/metrics.go b/pkg/metrics/metrics.go index 677c5d4ca7..d593e5cdce 100644 --- a/pkg/metrics/metrics.go +++ b/pkg/metrics/metrics.go @@ -139,7 +139,8 @@ func InitPrometheus(config *config.Config) { ) } -func MetricsExtraHandlers() map[string]http.HandlerFunc { +// ExtraHandlers returns a map of additional endpoint handlers +func ExtraHandlers() map[string]http.HandlerFunc { return metricsExtraHandlers } diff --git a/pkg/reconciler/build/build.go b/pkg/reconciler/build/build.go index 42e762419c..58f942c82f 100644 --- a/pkg/reconciler/build/build.go +++ b/pkg/reconciler/build/build.go @@ -1,3 +1,7 @@ +// Copyright The Shipwright Contributors +// +// SPDX-License-Identifier: Apache-2.0 + package build import ( diff --git a/pkg/reconciler/build/controller.go b/pkg/reconciler/build/controller.go index 60030754b1..c08932cbb1 100644 --- a/pkg/reconciler/build/controller.go +++ b/pkg/reconciler/build/controller.go @@ -1,3 +1,7 @@ +// Copyright The Shipwright Contributors +// +// SPDX-License-Identifier: Apache-2.0 + package build import ( diff --git a/pkg/reconciler/buildrun/buildrun.go b/pkg/reconciler/buildrun/buildrun.go index 99142a6b8c..c313f46b32 100644 --- a/pkg/reconciler/buildrun/buildrun.go +++ b/pkg/reconciler/buildrun/buildrun.go @@ -1,3 +1,7 @@ +// Copyright The Shipwright Contributors +// +// SPDX-License-Identifier: Apache-2.0 + package buildrun import ( diff --git a/pkg/reconciler/buildrun/buildrun_suite_test.go b/pkg/reconciler/buildrun/buildrun_suite_test.go index c6bbc1171b..a2bfcbdc7c 100644 --- a/pkg/reconciler/buildrun/buildrun_suite_test.go +++ b/pkg/reconciler/buildrun/buildrun_suite_test.go @@ -1,3 +1,6 @@ +// Copyright The Shipwright Contributors +// +// SPDX-License-Identifier: Apache-2.0 package buildrun_test import ( diff --git a/pkg/reconciler/buildrun/controller.go b/pkg/reconciler/buildrun/controller.go index dbac69a303..9ecb3532ad 100644 --- a/pkg/reconciler/buildrun/controller.go +++ b/pkg/reconciler/buildrun/controller.go @@ -1,3 +1,7 @@ +// Copyright The Shipwright Contributors +// +// SPDX-License-Identifier: Apache-2.0 + package buildrun import ( diff --git a/pkg/validate/ownerreferences.go b/pkg/validate/ownerreferences.go index 23a007ede6..4d4317902d 100644 --- a/pkg/validate/ownerreferences.go +++ b/pkg/validate/ownerreferences.go @@ -1,3 +1,7 @@ +// Copyright The Shipwright Contributors +// +// SPDX-License-Identifier: Apache-2.0 + package validate import ( diff --git a/pkg/validate/runtime.go b/pkg/validate/runtime.go index 45abec58d6..182a606d7f 100644 --- a/pkg/validate/runtime.go +++ b/pkg/validate/runtime.go @@ -1,3 +1,7 @@ +// Copyright The Shipwright Contributors +// +// SPDX-License-Identifier: Apache-2.0 + package validate import ( diff --git a/pkg/validate/secrets.go b/pkg/validate/secrets.go index d611b52891..7360ee67cc 100644 --- a/pkg/validate/secrets.go +++ b/pkg/validate/secrets.go @@ -1,3 +1,7 @@ +// Copyright The Shipwright Contributors +// +// SPDX-License-Identifier: Apache-2.0 + package validate import ( diff --git a/pkg/validate/sourceurl.go b/pkg/validate/sourceurl.go index f062aad007..c651f83725 100644 --- a/pkg/validate/sourceurl.go +++ b/pkg/validate/sourceurl.go @@ -1,3 +1,7 @@ +// Copyright The Shipwright Contributors +// +// SPDX-License-Identifier: Apache-2.0 + package validate import ( diff --git a/pkg/validate/strategies.go b/pkg/validate/strategies.go index 0d2a6ef935..6d16e98c15 100644 --- a/pkg/validate/strategies.go +++ b/pkg/validate/strategies.go @@ -1,3 +1,7 @@ +// Copyright The Shipwright Contributors +// +// SPDX-License-Identifier: Apache-2.0 + package validate import ( diff --git a/pkg/validate/validate.go b/pkg/validate/validate.go index 5825c7cf9e..98979057c4 100644 --- a/pkg/validate/validate.go +++ b/pkg/validate/validate.go @@ -1,3 +1,7 @@ +// Copyright The Shipwright Contributors +// +// SPDX-License-Identifier: Apache-2.0 + package validate import (