From d098b6bcca409a3ae4498226e75cfc63d2a392c7 Mon Sep 17 00:00:00 2001 From: Umesh Kumhar Date: Mon, 17 Oct 2022 11:22:56 +0530 Subject: [PATCH 1/7] Update golang-ci.yml --- .github/workflows/golang-ci.yml | 19 ++++++++++++++++--- 1 file changed, 16 insertions(+), 3 deletions(-) diff --git a/.github/workflows/golang-ci.yml b/.github/workflows/golang-ci.yml index a74e3136..e3ced9c2 100644 --- a/.github/workflows/golang-ci.yml +++ b/.github/workflows/golang-ci.yml @@ -1,4 +1,4 @@ -name: Github Actions - Golang +name: Github Actions - Shifter on: pull_request: paths: @@ -12,7 +12,7 @@ defaults: working-directory: ./shifter jobs: - golang-ci-workflow: + shifter-ci-workflow: runs-on: ubuntu-latest steps: - uses: actions/setup-go@v3 @@ -33,7 +33,20 @@ jobs: with: sarif_file: results.sarif - name: Run Build - run: make build + run: make build + + - name: Run Trivy vulnerability scanner + uses: aquasecurity/trivy-action@master + with: + image-ref: 'gcr.io/shifter-lz-002/shifter:${{ github.sha }}' + format: 'sarif' + output: 'trivy-results.sarif' + + - name: Upload Trivy scan results to GitHub Security tab + uses: github/codeql-action/upload-sarif@v2 + if: always() + with: + sarif_file: 'trivy-results.sarif' # ## we can update once we have unit testcases inplace From 56002518ecd8cb75130cf51091ef2dc1819bfd79 Mon Sep 17 00:00:00 2001 From: Umesh Kumhar Date: Mon, 17 Oct 2022 11:24:50 +0530 Subject: [PATCH 2/7] Update shifter.go --- shifter/shifter.go | 1 + 1 file changed, 1 insertion(+) diff --git a/shifter/shifter.go b/shifter/shifter.go index 38fbbd1d..c442b58a 100644 --- a/shifter/shifter.go +++ b/shifter/shifter.go @@ -18,4 +18,5 @@ import "shifter/cmd" func main() { cmd.Execute() + } From daddf171e46486e4055c6dfacc5ba258d89fbc17 Mon Sep 17 00:00:00 2001 From: Umesh Kumhar Date: Mon, 17 Oct 2022 12:07:11 +0530 Subject: [PATCH 3/7] Update golang-ci.yml --- .github/workflows/golang-ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/golang-ci.yml b/.github/workflows/golang-ci.yml index e3ced9c2..a426aef9 100644 --- a/.github/workflows/golang-ci.yml +++ b/.github/workflows/golang-ci.yml @@ -38,7 +38,7 @@ jobs: - name: Run Trivy vulnerability scanner uses: aquasecurity/trivy-action@master with: - image-ref: 'gcr.io/shifter-lz-002/shifter:${{ github.sha }}' + image-ref: 'us-docker.pkg.dev/shifter-lz-002/dev-shifter/${{ github.head_ref || github.ref_name }}/shifter' format: 'sarif' output: 'trivy-results.sarif' From 099213173c02eddc44bc82921c1c9ad1506c7c12 Mon Sep 17 00:00:00 2001 From: Umesh Kumhar Date: Mon, 17 Oct 2022 21:02:28 +0530 Subject: [PATCH 4/7] Update helm.go --- shifter/generator/helm.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/shifter/generator/helm.go b/shifter/generator/helm.go index 191e519c..1d19b7fd 100644 --- a/shifter/generator/helm.go +++ b/shifter/generator/helm.go @@ -24,7 +24,7 @@ import ( "gopkg.in/yaml.v3" json "k8s.io/apimachinery/pkg/runtime/serializer/json" - //"strconv" + // "strconv" ) type Chart struct { From 743cc7a16d23b9d5d44aac92a509506f0eed3817 Mon Sep 17 00:00:00 2001 From: Umesh Kumhar Date: Mon, 17 Oct 2022 21:03:10 +0530 Subject: [PATCH 5/7] Update shifter.go --- shifter/shifter.go | 1 - 1 file changed, 1 deletion(-) diff --git a/shifter/shifter.go b/shifter/shifter.go index c442b58a..38fbbd1d 100644 --- a/shifter/shifter.go +++ b/shifter/shifter.go @@ -18,5 +18,4 @@ import "shifter/cmd" func main() { cmd.Execute() - } From 647a048078b6826ce693b0c48e14dd49642e37c1 Mon Sep 17 00:00:00 2001 From: Umesh Kumhar Date: Fri, 18 Nov 2022 13:08:19 +0530 Subject: [PATCH 6/7] Update golang-ci.yml --- .github/workflows/golang-ci.yml | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/.github/workflows/golang-ci.yml b/.github/workflows/golang-ci.yml index a426aef9..396e602d 100644 --- a/.github/workflows/golang-ci.yml +++ b/.github/workflows/golang-ci.yml @@ -34,7 +34,14 @@ jobs: sarif_file: results.sarif - name: Run Build run: make build - + - name: Wait for tests to succeed + uses: lewagon/wait-on-check-action@v1.2.0 + with: + ref: ${{ github.ref }} + check-regexp: .?-push.? + repo-token: ${{ secrets.GITHUB_TOKEN }} + wait-interval: 10 + allowed-conclusions: success - name: Run Trivy vulnerability scanner uses: aquasecurity/trivy-action@master with: From 645bdcdf69884e52bfc2a1ca5d21e39dd6753918 Mon Sep 17 00:00:00 2001 From: Umesh Kumhar Date: Fri, 18 Nov 2022 13:27:06 +0530 Subject: [PATCH 7/7] Update golang-ci.yml --- .github/workflows/golang-ci.yml | 8 -------- 1 file changed, 8 deletions(-) diff --git a/.github/workflows/golang-ci.yml b/.github/workflows/golang-ci.yml index 396e602d..2df43eb0 100644 --- a/.github/workflows/golang-ci.yml +++ b/.github/workflows/golang-ci.yml @@ -34,14 +34,6 @@ jobs: sarif_file: results.sarif - name: Run Build run: make build - - name: Wait for tests to succeed - uses: lewagon/wait-on-check-action@v1.2.0 - with: - ref: ${{ github.ref }} - check-regexp: .?-push.? - repo-token: ${{ secrets.GITHUB_TOKEN }} - wait-interval: 10 - allowed-conclusions: success - name: Run Trivy vulnerability scanner uses: aquasecurity/trivy-action@master with: