chore(CI): Add govulncheck Github action (#12783)

This commit is contained in:
Sven Rebhan 2023-03-02 22:12:01 +01:00 committed by GitHub
parent acd1500d2b
commit 56dfcedc4d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 27 additions and 0 deletions

22
.github/workflows/govulncheck.yml vendored Normal file
View File

@ -0,0 +1,22 @@
name: govulncheck
on:
push:
branches:
- master
pull_request:
branches:
- master
schedule:
# Trigger every day at 16:00 UTC
- cron: '0 16 * * *'
jobs:
analyze:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Scan for Vulnerabilities in Code
uses: Templum/govulncheck-action@v0.0.9
with:
go-version: '1.20'
vulncheck-version: latest
package: ./...

View File

@ -162,6 +162,11 @@ func main() {
Regex: `(go-version).*`,
Replace: fmt.Sprintf("$1: '%s'", noPatchVersion),
},
{
FileName: ".github/workflows/govulncheck.yml",
Regex: `(go-version).*`,
Replace: fmt.Sprintf("$1: '%s'", noPatchVersion),
},
{
FileName: "go.mod",
Regex: `(go)\s(\d.\d*)`,