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

Create govulncheck.yml #393

Merged
merged 5 commits into from
Mar 5, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
51 changes: 51 additions & 0 deletions .github/workflows/govulncheck.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
# GitHub Actions workflow for govulncheck.
# This file is licensed under MIT License.
# https://github.com/fxamacker/cbor

name: govulncheck

# Revoke default permissions and grant what's needed in each job.
permissions: {}

on:
workflow_dispatch:
schedule:
# Run at least once daily because vulnerability database might be updated.
- cron: '30 15 * * *'
pull_request:
paths:
- '**'
- '!**.md'
push:
paths:
- '**'
- '!**.md'
branches:
- 'main'
- 'master'
- 'release*'
- 'feature/stream-mode'
tags:
- 'v*'

jobs:
Check:
runs-on: ubuntu-latest
permissions:
# Grant permission to read content.
contents: read
steps:
- name: Checkout source
uses: actions/checkout@v3
with:
fetch-depth: 1
- name: Set up Go
uses: actions/setup-go@v3
with:
go-version: 1.20.x
check-latest: true
- name: Install latest from golang.org
run: go install golang.org/x/vuln/cmd/govulncheck@latest
- name: Run govulncheck
# Use -v flag to print a full call stack for each vulnerability found.
run: govulncheck -v ./...