Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update github actions for gosec #255

Closed
wants to merge 14 commits into from
8 changes: 7 additions & 1 deletion .github/workflows/actions.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,15 +18,21 @@ jobs:
go_security_scan:
name: Run gosec
runs-on: ubuntu-latest
env:
GO111MODULE: on
steps:
- name: Checkout the code
uses: actions/checkout@v2
- name: Run gosec to check for security vulnerabilities
uses: dell/common-github-actions/gosec-runner@main
with:
directories: "./..."
excludes: "G108,G402"
exclude-dir: "csireverseproxy"
proxy_go_security_scan:
name: Run gosec on reverseproxy
runs-on: ubuntu-latest
steps:
- run: make proxygosec
malware_security_scan:
name: Malware Scanner
runs-on: ubuntu-latest
Expand Down
9 changes: 9 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,15 @@ else
endif
@echo "Logs are stored at gosec.log, Outputfile at gosecresults.csv"

proxygosec:
ifeq (, $(shell which gosec))
go install github.com/securego/gosec/v2/cmd/gosec@latest
$(shell cd csireverseproxy ; $(GOBIN)/gosec -quiet -log gosec.log -out=gosecresults.csv -fmt=csv ./...)
else
$(shell cd csireverseproxy ; gosec -quiet -log gosec.log -out=gosecresults.csv -fmt=csv ./...)
endif
@echo "Logs are stored at gosec.log, Outputfile at gosecresults.csv"

golint:
ifeq (, $(shell which golint))
@{ \
Expand Down
2 changes: 2 additions & 0 deletions csireverseproxy/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -39,3 +39,5 @@ docker-push: docker-build
unit-test:
go test -v -coverprofile c.out -coverpkg $(coverpackages) ./...

gosec:
gosec ./...
Loading