Skip to content

Commit

Permalink
chore: Add GoVulnCheck
Browse files Browse the repository at this point in the history
  • Loading branch information
higorjasonduarte committed May 22, 2024
1 parent 1423af2 commit bbef795
Show file tree
Hide file tree
Showing 2 changed files with 27 additions and 0 deletions.
18 changes: 18 additions & 0 deletions .github/workflows/package-audit.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
name: Package Auditing

on:
pull_request:
types: [opened, synchronize]

jobs:
PackageAuditing:
name: Package Auditor (GoVulnCheck)
runs-on: ubuntu-latest
container:
image: golang:1.22.3
steps:
- name: Checkout Repository
uses: actions/checkout@v3

- name: GoVulnCheck
run: make govulncheck
9 changes: 9 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ endif
GOPATH ?= $(shell $(GO) env GOPATH)
GOBIN ?= $(GOPATH)/bin
GOSEC ?= $(GOBIN)/gosec
GOVULNCHECK ?= $(GOBIN)/govulncheck
GOLINT ?= $(GOBIN)/golint
GOFMT ?= $(GOBIN)/gofmt
RELOAD ?= $(GOBIN)/CompileDaemon
Expand Down Expand Up @@ -86,6 +87,14 @@ get-gosec-deps:
@ cd $(GOPATH); \
$(GO) install github.com/securego/gosec/v2/cmd/gosec@latest

.PHONY: govulncheck
govulncheck: get-govulncheck-deps ## running GoVulnCheck
@ $(GOVULNCHECK) ./...

.PHONY: get-govulncheck-deps
get-govulncheck-deps:
@ $(GO) install golang.org/x/vuln/cmd/govulncheck@latest

.PHONY : build
build: ## build application
@ $(GO) version
Expand Down

0 comments on commit bbef795

Please sign in to comment.