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 5ed2737
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 5 deletions.
16 changes: 13 additions & 3 deletions .github/workflows/period-check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,21 @@ 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 -C /usr/local -xzf go1.22.7.linux-amd64.tar.gz
export PATH=/usr/local/go/bin:$PATH
go version
go install github.com/securego/gosec/v2/cmd/gosec@latest
export PATH=$(go env GOPATH)/bin:$PATH
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
14 changes: 12 additions & 2 deletions .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: 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 -C /usr/local -xzf go1.22.7.linux-amd64.tar.gz
export PATH=/usr/local/go/bin:$PATH
go version
go install github.com/securego/gosec/v2/cmd/gosec@latest
export PATH=$(go env GOPATH)/bin:$PATH
gosec --version
gosec -severity high -confidence high ./... || exit 1
- name: pr test
env:
Expand Down

0 comments on commit 5ed2737

Please sign in to comment.