Skip to content

Vulnerability Scan

Vulnerability Scan #82

Workflow file for this run

name: Vulnerability Scan
on:
schedule:
- cron: '0 5 * * *'
workflow_dispatch:
permissions:
security-events: write
jobs:
scan:
name: Run govulncheck
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Set up Go
uses: actions/setup-go@v5
with:
go-version: '1.23.6'
check-latest: true
- name: Install govulncheck
run: go install golang.org/x/vuln/cmd/govulncheck@latest
- name: Run govulncheck
run: govulncheck ./...
- name: Notify on failure
if: failure()
uses: actions/github-script@v7
with:
script: |
const issue = await github.rest.issues.create({
owner: context.repo.owner,
repo: context.repo.repo,
title: '🚨 Vulnerability found in dependencies',
body: 'The daily vulnerability scan has detected potential security issues. Please check the [workflow run](' + context.serverUrl + '/' + context.repo.owner + '/' + context.repo.repo + '/actions/runs/' + context.runId + ') for details.'
});