Skip to content

VulnCheck

VulnCheck #1217

Workflow file for this run

name: VulnCheck
on:
pull_request:
branches:
- master
push:
branches:
- master
schedule:
- cron: '0 6 * * *' # every day at 6am
jobs:
govulncheck:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 1
- uses: actions/setup-go@v5
with:
go-version-file: ./go.mod
- name: Setup dependencies
run: |
go mod tidy
go mod vendor
- name: Scan for Vulnerabilities in Code
uses: Templum/govulncheck-action@v1.0.0
with:
go-version: 1.22.3
skip-upload: true
fail-on-vuln: true
- name: Send email if VulnCheck fails
if: failure()
run: |
curl --request POST \
--url https://api.sendgrid.com/v3/mail/send \
--header "Authorization: Bearer ${{ secrets.SENDGRID_API_KEY }}" \
--header 'Content-Type: application/json' \
--data '
{
"personalizations":[
{
"to":[
{
"email":"${{ secrets.SENDGRID_EMAIL_TO }}"
}
]
}
],
"from":{
"email":"${{ secrets.SENDGRID_EMAIL_FROM }}"
},
"subject":"VulnCheck failing",
"content":[
{
"type":"text/plain",
"value": "VulnCheck failing. See ${{ github.event.repository.html_url }}/actions/runs/${{ github.run_id }} for details."
}
]
}
'