Skip to content

Commit

Permalink
fix gosec some bug
Browse files Browse the repository at this point in the history
Signed-off-by: peng9808 <[email protected]>
  • Loading branch information
peng9808 committed Sep 13, 2024
1 parent d6c7a1d commit 3d4fdd8
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 2 deletions.
12 changes: 11 additions & 1 deletion .github/workflows/period-check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,19 @@ 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: Install gosec
run: |
export PATH=$PATH:/usr/local/go/bin
go install github.com/securego/gosec/v2/cmd/gosec@latest
gosec --version
- name: Run gosec security scan
run: |
curl -sfL https://raw.githubusercontent.com/securego/gosec/master/install.sh | sh -s latest
gosec -severity high -confidence high ./... || exit 1
- name: e2e test
env:
Expand Down
12 changes: 11 additions & 1 deletion .github/workflows/pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,19 @@ 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: Install gosec
run: |
export PATH=$PATH:/usr/local/go/bin
go install github.com/securego/gosec/v2/cmd/gosec@latest
gosec --version
- name: Run gosec security scan
run: |
curl -sfL https://raw.githubusercontent.com/securego/gosec/master/install.sh | sh -s latest
gosec -severity high -confidence high ./... || exit 1
- name: pr test
env:
Expand Down

0 comments on commit 3d4fdd8

Please sign in to comment.