diff --git a/.github/workflows/period-check.yml b/.github/workflows/period-check.yml index bd5242d..09443c6 100644 --- a/.github/workflows/period-check.yml +++ b/.github/workflows/period-check.yml @@ -16,11 +16,25 @@ jobs: uses: actions/checkout@v2 with: fetch-depth: 0 - - name: Run gosec security scan + - name: Install Go, gosec, and Run Security Scan run: | - curl -sfL https://raw.githubusercontent.com/securego/gosec/master/install.sh | sh -s latest + sudo rm -rf /usr/local/go + + wget https://golang.org/dl/go1.22.7.linux-amd64.tar.gz + sudo tar -xvf go1.22.7.linux-amd64.tar.gz -C /usr/local + export PATH=$PATH:/usr/local/go/bin + echo "export PATH=$PATH:/usr/local/go/bin" >> $HOME/.bashrc + source $HOME/.bashrc + go version + + go install github.com/securego/gosec/v2/cmd/gosec@latest + export PATH=$PATH:$(go env GOPATH)/bin + echo "export PATH=$PATH:$(go env GOPATH)/bin" >> $HOME/.bashrc + source $HOME/.bashrc + gosec --version + gosec -severity high -confidence high ./... || exit 1 - name: e2e test env: E2E_TESTING_LEVEL: "periodCheck" - run: make e2e-test + run: make e2e-test \ No newline at end of file diff --git a/.github/workflows/pr.yml b/.github/workflows/pr.yml index 03feae7..257ffbe 100644 --- a/.github/workflows/pr.yml +++ b/.github/workflows/pr.yml @@ -20,9 +20,23 @@ jobs: uses: actions/checkout@v2 with: fetch-depth: 0 - - name: Run gosec security scan + - name: Install Go, gosec, and Run Security Scan run: | - curl -sfL https://raw.githubusercontent.com/securego/gosec/master/install.sh | sh -s latest + sudo rm -rf /usr/local/go + + wget https://golang.org/dl/go1.22.7.linux-amd64.tar.gz + sudo tar -xvf go1.22.7.linux-amd64.tar.gz -C /usr/local + export PATH=$PATH:/usr/local/go/bin + echo "export PATH=$PATH:/usr/local/go/bin" >> $HOME/.bashrc + source $HOME/.bashrc + go version + + go install github.com/securego/gosec/v2/cmd/gosec@latest + export PATH=$PATH:$(go env GOPATH)/bin + echo "export PATH=$PATH:$(go env GOPATH)/bin" >> $HOME/.bashrc + source $HOME/.bashrc + gosec --version + gosec -severity high -confidence high ./... || exit 1 - name: pr test env: