Skip to content

Commit 54fb9c2

Browse files
authored
chore: change tool to scan vuls. (#24)
1 parent 385d8fd commit 54fb9c2

File tree

6 files changed

+14
-31
lines changed

6 files changed

+14
-31
lines changed

.github/CODEOWNERS

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
* @mythrnr

.github/dependabot.yaml

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,14 +7,10 @@ version: 2
77
updates:
88
- package-ecosystem: "github-actions"
99
directory: "/"
10-
reviewers:
11-
- "mythrnr"
1210
schedule:
1311
interval: "weekly"
1412

1513
- package-ecosystem: "gomod"
1614
directory: "/"
17-
reviewers:
18-
- "mythrnr"
1915
schedule:
2016
interval: "weekly"

.github/workflows/check-code.yaml

Lines changed: 1 addition & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -24,20 +24,7 @@ jobs:
2424
version: "latest"
2525

2626
scan-vulnerabilities:
27-
name: "Scan Vulnerabilities"
28-
runs-on: "ubuntu-latest"
29-
timeout-minutes: 5
30-
steps:
31-
- uses: "actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8" # v5.0.0
32-
33-
- uses: "actions/setup-go@44694675825211faa026b3c33043df3e48a5fa00" # v6.0.0
34-
with:
35-
go-version: "1.25"
36-
37-
- name: "Write go.list file"
38-
run: "go list -buildvcs=false -deps -json ./... > go.list"
39-
40-
- uses: "sonatype-nexus-community/nancy-github-action@main"
27+
uses: "./.github/workflows/scan-vulnerabilities.yaml"
4128

4229
spell-check:
4330
name: "Check spell"

.github/workflows/scan-vulnerabilities.yaml

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ name: "Scan Vulnerabilities"
33
on:
44
schedule:
55
- cron: "0 0 * * *"
6+
workflow_call:
67
workflow_dispatch:
78

89
permissions:
@@ -20,7 +21,5 @@ jobs:
2021
with:
2122
go-version: "1.25"
2223

23-
- name: "Write go.list file"
24-
run: "go list -buildvcs=false -deps -json ./... > go.list"
25-
26-
- uses: "sonatype-nexus-community/nancy-github-action@main"
24+
- name: "Run vulnerability check"
25+
run: "make vulnerability-check"

.vscode/cspell.json

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,6 @@
1515
"language": "en",
1616
"minWordLength": 4,
1717
"words": [
18-
"buildvcs",
1918
"cyclop",
2019
"depguard",
2120
"dupl",
@@ -30,6 +29,7 @@
3029
"golangci",
3130
"gomod",
3231
"gopath",
32+
"govulncheck",
3333
"guyarb",
3434
"httprouter",
3535
"julienschmidt",
@@ -39,8 +39,6 @@
3939
"nestif",
4040
"nolint",
4141
"println",
42-
"sonatype",
43-
"sonatypecommunity",
4442
"stretchr",
4543
"testableexamples",
4644
"testpackage",

Makefile

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,9 @@ endif
55
pkg ?= ./...
66
pwd = $(shell pwd)
77

8+
.PHONY: ci-suite
9+
ci-suite: spell-check fmt lint vulnerability-check test
10+
811
.PHONY: clean
912
clean:
1013
rm -rf .cache/*
@@ -23,12 +26,6 @@ lint:
2326
-w /app \
2427
golangci/golangci-lint:latest golangci-lint run $(pkg)
2528

26-
.PHONY: nancy
27-
nancy:
28-
docker pull sonatypecommunity/nancy:latest > /dev/null \
29-
&& go list -buildvcs=false -deps -json ./... \
30-
| docker run --rm -i sonatypecommunity/nancy:latest sleuth
31-
3229
.PHONY: release
3330
release:
3431
if [ "$(version)" = "" ]; then \
@@ -56,3 +53,8 @@ test-json:
5653
.PHONY: tidy
5754
tidy:
5855
go mod tidy
56+
57+
.PHONY: vulnerability-check
58+
vulnerability-check:
59+
go install golang.org/x/vuln/cmd/govulncheck@latest
60+
govulncheck -show=version ./...

0 commit comments

Comments
 (0)