From 9b0a81a325b56adcd3076c69b94caee7a1e1905b Mon Sep 17 00:00:00 2001 From: Austin Abro Date: Tue, 3 Sep 2024 15:23:59 +0000 Subject: [PATCH 1/9] check docs and schema Signed-off-by: Austin Abro --- .github/workflows/check-go-mod.yml | 24 ++++++++++++++++++++++++ Makefile | 4 ++++ hack/check-go-mod.sh | 11 +++++++++++ 3 files changed, 39 insertions(+) create mode 100644 .github/workflows/check-go-mod.yml create mode 100755 hack/check-go-mod.sh diff --git a/.github/workflows/check-go-mod.yml b/.github/workflows/check-go-mod.yml new file mode 100644 index 0000000000..d311080195 --- /dev/null +++ b/.github/workflows/check-go-mod.yml @@ -0,0 +1,24 @@ +name: Check for go mod changes +on: + pull_request: + merge_group: + +permissions: + contents: read + +jobs: + validate-go-mod: + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7 + + - name: Setup golang + uses: ./.github/actions/golang + + - name: Docs and schemas + run: "make test-go-mod" + + - name: Save logs + if: always() + uses: ./.github/actions/save-logs diff --git a/Makefile b/Makefile index bdce6970d3..498ed34eb8 100644 --- a/Makefile +++ b/Makefile @@ -221,6 +221,10 @@ test-docs-and-schema: test-cves: go run main.go tools sbom scan . -o json --exclude './site' --exclude './examples' | grype --fail-on low +test-go-mod: + go mod tidy + hack/check-go-mod.sh + cve-report: ## Create a CVE report for the current project (must `brew install grype` first) @test -d ./build || mkdir ./build go run main.go tools sbom scan . -o json --exclude './site' --exclude './examples' | grype -o template -t hack/grype.tmpl > build/zarf-known-cves.csv diff --git a/hack/check-go-mod.sh b/hack/check-go-mod.sh new file mode 100755 index 0000000000..f5dae69023 --- /dev/null +++ b/hack/check-go-mod.sh @@ -0,0 +1,11 @@ +#!/usr/bin/env bash + +set -euo pipefail + +if [ -z "$(git status -s go.mod go.sum)" ]; then + echo "Success!" + exit 0 +else + git diff go.mod go.sum + exit 1 +fi From d6bbe90e252b9fe1d2c02bbc9962b56dba8b45bb Mon Sep 17 00:00:00 2001 From: Austin Abro Date: Tue, 3 Sep 2024 15:35:25 +0000 Subject: [PATCH 2/9] test go mod Signed-off-by: Austin Abro --- .github/workflows/check-go-mod.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/check-go-mod.yml b/.github/workflows/check-go-mod.yml index d311080195..32b5fdaeca 100644 --- a/.github/workflows/check-go-mod.yml +++ b/.github/workflows/check-go-mod.yml @@ -16,7 +16,7 @@ jobs: - name: Setup golang uses: ./.github/actions/golang - - name: Docs and schemas + - name: Test go mod run: "make test-go-mod" - name: Save logs From f9c230c46fb7294bd51bf9c88f7d742dc72f52f4 Mon Sep 17 00:00:00 2001 From: Austin Abro Date: Thu, 5 Sep 2024 14:17:40 +0000 Subject: [PATCH 3/9] test go mod Signed-off-by: Austin Abro --- Makefile | 1 + 1 file changed, 1 insertion(+) diff --git a/Makefile b/Makefile index 498ed34eb8..00f5716e47 100644 --- a/Makefile +++ b/Makefile @@ -223,6 +223,7 @@ test-cves: test-go-mod: go mod tidy + echo "in test go mod" hack/check-go-mod.sh cve-report: ## Create a CVE report for the current project (must `brew install grype` first) From 93e16482f71cf5f47c5902d007565dc50dd81a54 Mon Sep 17 00:00:00 2001 From: Austin Abro Date: Thu, 5 Sep 2024 14:20:33 +0000 Subject: [PATCH 4/9] try again Signed-off-by: Austin Abro --- .github/workflows/check-go-mod.yml | 2 +- hack/check-go-mod.sh | 4 +++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/.github/workflows/check-go-mod.yml b/.github/workflows/check-go-mod.yml index 32b5fdaeca..8065fcaaeb 100644 --- a/.github/workflows/check-go-mod.yml +++ b/.github/workflows/check-go-mod.yml @@ -17,7 +17,7 @@ jobs: uses: ./.github/actions/golang - name: Test go mod - run: "make test-go-mod" + run: make test-go-mod - name: Save logs if: always() diff --git a/hack/check-go-mod.sh b/hack/check-go-mod.sh index f5dae69023..5fe9920eca 100755 --- a/hack/check-go-mod.sh +++ b/hack/check-go-mod.sh @@ -2,10 +2,12 @@ set -euo pipefail +git status + if [ -z "$(git status -s go.mod go.sum)" ]; then echo "Success!" exit 0 else - git diff go.mod go.sum + echo "failure, please run go mod tidy and commit" exit 1 fi From d90a77fb2cce91345d5eff99c57ec66d18e78033 Mon Sep 17 00:00:00 2001 From: Austin Abro Date: Thu, 5 Sep 2024 14:25:34 +0000 Subject: [PATCH 5/9] try out without make Signed-off-by: Austin Abro --- .github/workflows/check-go-mod.yml | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/.github/workflows/check-go-mod.yml b/.github/workflows/check-go-mod.yml index 8065fcaaeb..133be94baa 100644 --- a/.github/workflows/check-go-mod.yml +++ b/.github/workflows/check-go-mod.yml @@ -13,11 +13,13 @@ jobs: - name: Checkout uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7 - - name: Setup golang - uses: ./.github/actions/golang + # - name: Setup golang + # uses: ./.github/actions/golang - name: Test go mod - run: make test-go-mod + run: | + go mod tidy + git diff --exit-code go.mod go.sum - name: Save logs if: always() From 499331c716bf9113968bd5f424259c0a5fa7fd6d Mon Sep 17 00:00:00 2001 From: Austin Abro Date: Thu, 5 Sep 2024 14:31:53 +0000 Subject: [PATCH 6/9] go mod tidy Signed-off-by: Austin Abro --- go.mod | 9 ++++++--- go.sum | 8 ++++++++ 2 files changed, 14 insertions(+), 3 deletions(-) diff --git a/go.mod b/go.mod index f800815edc..f33465a7c2 100644 --- a/go.mod +++ b/go.mod @@ -17,7 +17,6 @@ require ( github.com/anchore/syft v0.100.0 github.com/avast/retry-go/v4 v4.6.0 github.com/defenseunicorns/pkg/helpers/v2 v2.0.1 - github.com/defenseunicorns/pkg/kubernetes v0.2.0 github.com/defenseunicorns/pkg/oci v1.0.1 github.com/derailed/k9s v0.31.7 github.com/distribution/distribution/v3 v3.0.0-alpha.1 @@ -39,6 +38,7 @@ require ( github.com/opencontainers/image-spec v1.1.0 github.com/pkg/errors v0.9.1 github.com/prometheus/client_golang v1.18.0 + github.com/prometheus/prometheus v0.47.2 github.com/pterm/pterm v0.12.79 github.com/sergi/go-diff v1.3.2-0.20230802210424-5b0b94c5c0d3 github.com/sigstore/cosign/v2 v2.2.3 @@ -77,9 +77,12 @@ require ( github.com/go-logr/logr v1.4.2 // indirect github.com/gofrs/uuid v4.2.0+incompatible // indirect github.com/gorilla/handlers v1.5.1 // indirect + github.com/grafana/regexp v0.0.0-20221122212121-6b5c0a4cb7fd // indirect github.com/grpc-ecosystem/grpc-gateway/v2 v2.20.0 // indirect github.com/hashicorp/golang-lru/arc/v2 v2.0.5 // indirect github.com/hashicorp/golang-lru/v2 v2.0.5 // indirect + github.com/jpillora/backoff v1.0.0 // indirect + github.com/mwitkow/go-conntrack v0.0.0-20190716064945-2f068394615f // indirect github.com/redis/go-redis/extra/rediscmd/v9 v9.0.5 // indirect github.com/redis/go-redis/extra/redisotel/v9 v9.0.5 // indirect github.com/redis/go-redis/v9 v9.3.0 // indirect @@ -429,7 +432,7 @@ require ( github.com/pkg/profile v1.7.0 // indirect github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2 // indirect github.com/prometheus/client_model v0.5.0 // indirect - github.com/prometheus/common v0.45.0 // indirect + github.com/prometheus/common v0.45.0 github.com/prometheus/procfs v0.12.0 // indirect github.com/protocolbuffers/txtpbfmt v0.0.0-20231025115547-084445ff1adf // indirect github.com/rakyll/hey v0.1.4 // indirect @@ -527,7 +530,7 @@ require ( gopkg.in/ini.v1 v1.67.0 // indirect gopkg.in/op/go-logging.v1 v1.0.0-20160211212156-b2cb9fa56473 // indirect gopkg.in/warnings.v0 v0.1.2 // indirect - gopkg.in/yaml.v2 v2.4.0 // indirect + gopkg.in/yaml.v2 v2.4.0 gopkg.in/yaml.v3 v3.0.1 // indirect gorm.io/gorm v1.25.5 // indirect k8s.io/apiextensions-apiserver v0.30.0 // indirect diff --git a/go.sum b/go.sum index 62422f1e06..9e7797f0ec 100644 --- a/go.sum +++ b/go.sum @@ -1022,6 +1022,8 @@ github.com/gorilla/websocket v1.5.0 h1:PPwGk2jz7EePpoHN/+ClbZu8SPxiqlu12wZP/3sWm github.com/gorilla/websocket v1.5.0/go.mod h1:YR8l580nyteQvAITg2hZ9XVh4b55+EU/adAjf1fMHhE= github.com/gosuri/uitable v0.0.4 h1:IG2xLKRvErL3uhY6e1BylFzG+aJiwQviDDTfOKeKTpY= github.com/gosuri/uitable v0.0.4/go.mod h1:tKR86bXuXPZazfOTG1FIzvjIdXzd0mo4Vtn16vt0PJo= +github.com/grafana/regexp v0.0.0-20221122212121-6b5c0a4cb7fd h1:PpuIBO5P3e9hpqBD0O/HjhShYuM6XE0i/lbE6J94kww= +github.com/grafana/regexp v0.0.0-20221122212121-6b5c0a4cb7fd/go.mod h1:M5qHK+eWfAv8VR/265dIuEpL3fNfeC21tXXp9itM24A= github.com/gregjones/httpcache v0.0.0-20180305231024-9cad4c3443a7 h1:pdN6V1QBWetyv/0+wjACpqVH+eVULgEjkurDLq3goeM= github.com/gregjones/httpcache v0.0.0-20180305231024-9cad4c3443a7/go.mod h1:FecbI9+v66THATjSRHfNgh1IVFe/9kFxbXtjV0ctIMA= github.com/grpc-ecosystem/grpc-gateway v1.16.0/go.mod h1:BDjrQk3hbvj6Nolgz8mAMFbcEtjT1g+wF4CSlocrBnw= @@ -1142,6 +1144,8 @@ github.com/jonboulle/clockwork v0.4.0 h1:p4Cf1aMWXnXAUh8lVfewRBx1zaTSYKrKMF2g3ST github.com/jonboulle/clockwork v0.4.0/go.mod h1:xgRqUGwRcjKCO1vbZUEtSLrqKoPSsUpK7fnezOII0kc= github.com/josharian/intern v1.0.0 h1:vlS4z54oSdjm0bgjRigI+G1HpF+tI+9rE5LLzOg8HmY= github.com/josharian/intern v1.0.0/go.mod h1:5DoeVV0s6jJacbCEi61lwdGj/aVlrQvzHFFd8Hwg//Y= +github.com/jpillora/backoff v1.0.0 h1:uvFg412JmmHBHw7iwprIxkPMI+sGQ4kzOWsMeHnm2EA= +github.com/jpillora/backoff v1.0.0/go.mod h1:J/6gKK9jxlEcS3zixgDgUAsiuZ7yrSoa/FX5e0EB2j4= github.com/json-iterator/go v1.1.6/go.mod h1:+SdeFBvtyEkXs7REEP0seUULqWtbJapLOCVDaaPEHmU= github.com/json-iterator/go v1.1.7/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4= github.com/json-iterator/go v1.1.9/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4= @@ -1352,6 +1356,8 @@ github.com/muesli/termenv v0.15.2/go.mod h1:Epx+iuz8sNs7mNKhxzH4fWXGNpZwUaJKRS1n github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822 h1:C3w9PqII01/Oq1c1nUAm88MOHcQC9l5mIlSMApZMrHA= github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822/go.mod h1:+n7T8mK8HuQTcFwEeznm/DIxMOiR9yIdICNftLE1DvQ= github.com/mwitkow/go-conntrack v0.0.0-20161129095857-cc309e4a2223/go.mod h1:qRWi+5nqEBWmkhHvq77mSJWrCKwh8bxhgT7d/eI7P4U= +github.com/mwitkow/go-conntrack v0.0.0-20190716064945-2f068394615f h1:KUppIJq7/+SVif2QVs3tOP0zanoHgBEVAwHxUSIzRqU= +github.com/mwitkow/go-conntrack v0.0.0-20190716064945-2f068394615f/go.mod h1:qRWi+5nqEBWmkhHvq77mSJWrCKwh8bxhgT7d/eI7P4U= github.com/mxk/go-flowrate v0.0.0-20140419014527-cca7078d478f h1:y5//uYreIhSUg3J1GEMiLbxo1LJaP8RfCpH6pymGZus= github.com/mxk/go-flowrate v0.0.0-20140419014527-cca7078d478f/go.mod h1:ZdcZmHo+o7JKHSa8/e818NopupXU1YMK5fe1lsApnBw= github.com/niemeyer/pretty v0.0.0-20200227124842-a10e7caefd8e/go.mod h1:zD1mROLANZcx1PVRCS0qkT7pwLkGfwJo4zjcN/Tysno= @@ -1469,6 +1475,8 @@ github.com/prometheus/procfs v0.0.8/go.mod h1:7Qr8sr6344vo1JqZ6HhLceV9o3AJ1Ff+Gx github.com/prometheus/procfs v0.6.0/go.mod h1:cz+aTbrPOrUb4q7XlbU9ygM+/jj0fzG6c1xBZuNvfVA= github.com/prometheus/procfs v0.12.0 h1:jluTpSng7V9hY0O2R9DzzJHYb2xULk9VTR1V1R/k6Bo= github.com/prometheus/procfs v0.12.0/go.mod h1:pcuDEFsWDnvcgNzo4EEweacyhjeA9Zk3cnaOZAZEfOo= +github.com/prometheus/prometheus v0.47.2 h1:jWcnuQHz1o1Wu3MZ6nMJDuTI0kU5yJp9pkxh8XEkNvI= +github.com/prometheus/prometheus v0.47.2/go.mod h1:J/bmOSjgH7lFxz2gZhrWEZs2i64vMS+HIuZfmYNhJ/M= github.com/protocolbuffers/txtpbfmt v0.0.0-20231025115547-084445ff1adf h1:014O62zIzQwvoD7Ekj3ePDF5bv9Xxy0w6AZk0qYbjUk= github.com/protocolbuffers/txtpbfmt v0.0.0-20231025115547-084445ff1adf/go.mod h1:jgxiZysxFPM+iWKwQwPR+y+Jvo54ARd4EisXxKYpB5c= github.com/pterm/pterm v0.12.27/go.mod h1:PhQ89w4i95rhgE+xedAoqous6K9X+r6aSOI2eFF7DZI= From 438e1fe8063c045df1cf526793d4632a2ac00429 Mon Sep 17 00:00:00 2001 From: Austin Abro Date: Thu, 5 Sep 2024 14:33:13 +0000 Subject: [PATCH 7/9] tryout workflow Signed-off-by: Austin Abro --- go.mod | 1 - 1 file changed, 1 deletion(-) diff --git a/go.mod b/go.mod index f6b0a2470e..8ab685ba89 100644 --- a/go.mod +++ b/go.mod @@ -11,7 +11,6 @@ replace github.com/docker/docker => github.com/docker/docker v25.0.6+incompatibl require ( github.com/AlecAivazis/survey/v2 v2.3.7 github.com/Masterminds/semver/v3 v3.2.1 - github.com/agnivade/levenshtein v1.1.1 github.com/anchore/clio v0.0.0-20240705045624-ac88e09ad9d0 github.com/anchore/stereoscope v0.0.1 github.com/anchore/syft v0.100.0 From 3d2be6a279cfe668c8d1719dbbbe3c5a7207b1f5 Mon Sep 17 00:00:00 2001 From: Austin Abro Date: Thu, 5 Sep 2024 14:35:05 +0000 Subject: [PATCH 8/9] main go mod Signed-off-by: Austin Abro --- go.mod | 9 +++------ go.sum | 8 -------- 2 files changed, 3 insertions(+), 14 deletions(-) diff --git a/go.mod b/go.mod index 8ab685ba89..89db4ffeeb 100644 --- a/go.mod +++ b/go.mod @@ -11,6 +11,7 @@ replace github.com/docker/docker => github.com/docker/docker v25.0.6+incompatibl require ( github.com/AlecAivazis/survey/v2 v2.3.7 github.com/Masterminds/semver/v3 v3.2.1 + github.com/agnivade/levenshtein v1.1.1 github.com/anchore/clio v0.0.0-20240705045624-ac88e09ad9d0 github.com/anchore/stereoscope v0.0.1 github.com/anchore/syft v0.100.0 @@ -38,7 +39,6 @@ require ( github.com/opencontainers/image-spec v1.1.0 github.com/pkg/errors v0.9.1 github.com/prometheus/client_golang v1.18.0 - github.com/prometheus/prometheus v0.47.2 github.com/pterm/pterm v0.12.79 github.com/sergi/go-diff v1.3.2-0.20230802210424-5b0b94c5c0d3 github.com/sigstore/cosign/v2 v2.2.3 @@ -77,12 +77,9 @@ require ( github.com/go-logr/logr v1.4.2 // indirect github.com/gofrs/uuid v4.2.0+incompatible // indirect github.com/gorilla/handlers v1.5.1 // indirect - github.com/grafana/regexp v0.0.0-20221122212121-6b5c0a4cb7fd // indirect github.com/grpc-ecosystem/grpc-gateway/v2 v2.20.0 // indirect github.com/hashicorp/golang-lru/arc/v2 v2.0.5 // indirect github.com/hashicorp/golang-lru/v2 v2.0.5 // indirect - github.com/jpillora/backoff v1.0.0 // indirect - github.com/mwitkow/go-conntrack v0.0.0-20190716064945-2f068394615f // indirect github.com/onsi/gomega v1.32.0 // indirect github.com/redis/go-redis/extra/rediscmd/v9 v9.0.5 // indirect github.com/redis/go-redis/extra/redisotel/v9 v9.0.5 // indirect @@ -433,7 +430,7 @@ require ( github.com/pkg/profile v1.7.0 // indirect github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2 // indirect github.com/prometheus/client_model v0.5.0 // indirect - github.com/prometheus/common v0.45.0 + github.com/prometheus/common v0.45.0 // indirect github.com/prometheus/procfs v0.12.0 // indirect github.com/protocolbuffers/txtpbfmt v0.0.0-20231025115547-084445ff1adf // indirect github.com/rakyll/hey v0.1.4 // indirect @@ -531,7 +528,7 @@ require ( gopkg.in/ini.v1 v1.67.0 // indirect gopkg.in/op/go-logging.v1 v1.0.0-20160211212156-b2cb9fa56473 // indirect gopkg.in/warnings.v0 v0.1.2 // indirect - gopkg.in/yaml.v2 v2.4.0 + gopkg.in/yaml.v2 v2.4.0 // indirect gopkg.in/yaml.v3 v3.0.1 // indirect gorm.io/gorm v1.25.5 // indirect k8s.io/apiextensions-apiserver v0.30.0 // indirect diff --git a/go.sum b/go.sum index 9e7797f0ec..62422f1e06 100644 --- a/go.sum +++ b/go.sum @@ -1022,8 +1022,6 @@ github.com/gorilla/websocket v1.5.0 h1:PPwGk2jz7EePpoHN/+ClbZu8SPxiqlu12wZP/3sWm github.com/gorilla/websocket v1.5.0/go.mod h1:YR8l580nyteQvAITg2hZ9XVh4b55+EU/adAjf1fMHhE= github.com/gosuri/uitable v0.0.4 h1:IG2xLKRvErL3uhY6e1BylFzG+aJiwQviDDTfOKeKTpY= github.com/gosuri/uitable v0.0.4/go.mod h1:tKR86bXuXPZazfOTG1FIzvjIdXzd0mo4Vtn16vt0PJo= -github.com/grafana/regexp v0.0.0-20221122212121-6b5c0a4cb7fd h1:PpuIBO5P3e9hpqBD0O/HjhShYuM6XE0i/lbE6J94kww= -github.com/grafana/regexp v0.0.0-20221122212121-6b5c0a4cb7fd/go.mod h1:M5qHK+eWfAv8VR/265dIuEpL3fNfeC21tXXp9itM24A= github.com/gregjones/httpcache v0.0.0-20180305231024-9cad4c3443a7 h1:pdN6V1QBWetyv/0+wjACpqVH+eVULgEjkurDLq3goeM= github.com/gregjones/httpcache v0.0.0-20180305231024-9cad4c3443a7/go.mod h1:FecbI9+v66THATjSRHfNgh1IVFe/9kFxbXtjV0ctIMA= github.com/grpc-ecosystem/grpc-gateway v1.16.0/go.mod h1:BDjrQk3hbvj6Nolgz8mAMFbcEtjT1g+wF4CSlocrBnw= @@ -1144,8 +1142,6 @@ github.com/jonboulle/clockwork v0.4.0 h1:p4Cf1aMWXnXAUh8lVfewRBx1zaTSYKrKMF2g3ST github.com/jonboulle/clockwork v0.4.0/go.mod h1:xgRqUGwRcjKCO1vbZUEtSLrqKoPSsUpK7fnezOII0kc= github.com/josharian/intern v1.0.0 h1:vlS4z54oSdjm0bgjRigI+G1HpF+tI+9rE5LLzOg8HmY= github.com/josharian/intern v1.0.0/go.mod h1:5DoeVV0s6jJacbCEi61lwdGj/aVlrQvzHFFd8Hwg//Y= -github.com/jpillora/backoff v1.0.0 h1:uvFg412JmmHBHw7iwprIxkPMI+sGQ4kzOWsMeHnm2EA= -github.com/jpillora/backoff v1.0.0/go.mod h1:J/6gKK9jxlEcS3zixgDgUAsiuZ7yrSoa/FX5e0EB2j4= github.com/json-iterator/go v1.1.6/go.mod h1:+SdeFBvtyEkXs7REEP0seUULqWtbJapLOCVDaaPEHmU= github.com/json-iterator/go v1.1.7/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4= github.com/json-iterator/go v1.1.9/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4= @@ -1356,8 +1352,6 @@ github.com/muesli/termenv v0.15.2/go.mod h1:Epx+iuz8sNs7mNKhxzH4fWXGNpZwUaJKRS1n github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822 h1:C3w9PqII01/Oq1c1nUAm88MOHcQC9l5mIlSMApZMrHA= github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822/go.mod h1:+n7T8mK8HuQTcFwEeznm/DIxMOiR9yIdICNftLE1DvQ= github.com/mwitkow/go-conntrack v0.0.0-20161129095857-cc309e4a2223/go.mod h1:qRWi+5nqEBWmkhHvq77mSJWrCKwh8bxhgT7d/eI7P4U= -github.com/mwitkow/go-conntrack v0.0.0-20190716064945-2f068394615f h1:KUppIJq7/+SVif2QVs3tOP0zanoHgBEVAwHxUSIzRqU= -github.com/mwitkow/go-conntrack v0.0.0-20190716064945-2f068394615f/go.mod h1:qRWi+5nqEBWmkhHvq77mSJWrCKwh8bxhgT7d/eI7P4U= github.com/mxk/go-flowrate v0.0.0-20140419014527-cca7078d478f h1:y5//uYreIhSUg3J1GEMiLbxo1LJaP8RfCpH6pymGZus= github.com/mxk/go-flowrate v0.0.0-20140419014527-cca7078d478f/go.mod h1:ZdcZmHo+o7JKHSa8/e818NopupXU1YMK5fe1lsApnBw= github.com/niemeyer/pretty v0.0.0-20200227124842-a10e7caefd8e/go.mod h1:zD1mROLANZcx1PVRCS0qkT7pwLkGfwJo4zjcN/Tysno= @@ -1475,8 +1469,6 @@ github.com/prometheus/procfs v0.0.8/go.mod h1:7Qr8sr6344vo1JqZ6HhLceV9o3AJ1Ff+Gx github.com/prometheus/procfs v0.6.0/go.mod h1:cz+aTbrPOrUb4q7XlbU9ygM+/jj0fzG6c1xBZuNvfVA= github.com/prometheus/procfs v0.12.0 h1:jluTpSng7V9hY0O2R9DzzJHYb2xULk9VTR1V1R/k6Bo= github.com/prometheus/procfs v0.12.0/go.mod h1:pcuDEFsWDnvcgNzo4EEweacyhjeA9Zk3cnaOZAZEfOo= -github.com/prometheus/prometheus v0.47.2 h1:jWcnuQHz1o1Wu3MZ6nMJDuTI0kU5yJp9pkxh8XEkNvI= -github.com/prometheus/prometheus v0.47.2/go.mod h1:J/bmOSjgH7lFxz2gZhrWEZs2i64vMS+HIuZfmYNhJ/M= github.com/protocolbuffers/txtpbfmt v0.0.0-20231025115547-084445ff1adf h1:014O62zIzQwvoD7Ekj3ePDF5bv9Xxy0w6AZk0qYbjUk= github.com/protocolbuffers/txtpbfmt v0.0.0-20231025115547-084445ff1adf/go.mod h1:jgxiZysxFPM+iWKwQwPR+y+Jvo54ARd4EisXxKYpB5c= github.com/pterm/pterm v0.12.27/go.mod h1:PhQ89w4i95rhgE+xedAoqous6K9X+r6aSOI2eFF7DZI= From baac7a2742ae80ff02897e31099bf13f6e0c7d3e Mon Sep 17 00:00:00 2001 From: Austin Abro Date: Thu, 5 Sep 2024 14:42:04 +0000 Subject: [PATCH 9/9] test go mod Signed-off-by: Austin Abro --- .github/workflows/check-go-mod.yml | 8 ++------ Makefile | 5 ----- hack/check-go-mod.sh | 13 ------------- 3 files changed, 2 insertions(+), 24 deletions(-) delete mode 100755 hack/check-go-mod.sh diff --git a/.github/workflows/check-go-mod.yml b/.github/workflows/check-go-mod.yml index 133be94baa..b7f4c12b97 100644 --- a/.github/workflows/check-go-mod.yml +++ b/.github/workflows/check-go-mod.yml @@ -13,14 +13,10 @@ jobs: - name: Checkout uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7 - # - name: Setup golang - # uses: ./.github/actions/golang + - name: Setup golang + uses: ./.github/actions/golang - name: Test go mod run: | go mod tidy git diff --exit-code go.mod go.sum - - - name: Save logs - if: always() - uses: ./.github/actions/save-logs diff --git a/Makefile b/Makefile index 00f5716e47..bdce6970d3 100644 --- a/Makefile +++ b/Makefile @@ -221,11 +221,6 @@ test-docs-and-schema: test-cves: go run main.go tools sbom scan . -o json --exclude './site' --exclude './examples' | grype --fail-on low -test-go-mod: - go mod tidy - echo "in test go mod" - hack/check-go-mod.sh - cve-report: ## Create a CVE report for the current project (must `brew install grype` first) @test -d ./build || mkdir ./build go run main.go tools sbom scan . -o json --exclude './site' --exclude './examples' | grype -o template -t hack/grype.tmpl > build/zarf-known-cves.csv diff --git a/hack/check-go-mod.sh b/hack/check-go-mod.sh deleted file mode 100755 index 5fe9920eca..0000000000 --- a/hack/check-go-mod.sh +++ /dev/null @@ -1,13 +0,0 @@ -#!/usr/bin/env bash - -set -euo pipefail - -git status - -if [ -z "$(git status -s go.mod go.sum)" ]; then - echo "Success!" - exit 0 -else - echo "failure, please run go mod tidy and commit" - exit 1 -fi