From 45e36c74abecbe19bc414c219c00ed5baf636609 Mon Sep 17 00:00:00 2001 From: peng9808 Date: Fri, 13 Sep 2024 15:39:50 +0800 Subject: [PATCH] fix gosec some bug Signed-off-by: peng9808 --- .github/workflows/period-check.yml | 7 +++++++ .github/workflows/pr.yml | 7 +++++++ 2 files changed, 14 insertions(+) diff --git a/.github/workflows/period-check.yml b/.github/workflows/period-check.yml index bd5242d..78faf50 100644 --- a/.github/workflows/period-check.yml +++ b/.github/workflows/period-check.yml @@ -16,9 +16,16 @@ jobs: uses: actions/checkout@v2 with: fetch-depth: 0 + - name: Install Go + run: | + wget https://golang.org/dl/go1.21.11.linux-amd64.tar.gz + sudo tar -xvf go1.21.11.linux-amd64.tar.gz -C /usr/local + export PATH=$PATH:/usr/local/go/bin + go version - name: Run gosec security scan run: | curl -sfL https://raw.githubusercontent.com/securego/gosec/master/install.sh | sh -s latest + export PATH=$PATH:$(pwd)/bin gosec -severity high -confidence high ./... || exit 1 - name: e2e test env: diff --git a/.github/workflows/pr.yml b/.github/workflows/pr.yml index 03feae7..6e34b3e 100644 --- a/.github/workflows/pr.yml +++ b/.github/workflows/pr.yml @@ -20,9 +20,16 @@ jobs: uses: actions/checkout@v2 with: fetch-depth: 0 + - name: Install Go + run: | + wget https://golang.org/dl/go1.21.11.linux-amd64.tar.gz + sudo tar -xvf go1.21.11.linux-amd64.tar.gz -C /usr/local + export PATH=$PATH:/usr/local/go/bin + go version - name: Run gosec security scan run: | curl -sfL https://raw.githubusercontent.com/securego/gosec/master/install.sh | sh -s latest + export PATH=$PATH:$(pwd)/bin gosec -severity high -confidence high ./... || exit 1 - name: pr test env: