Skip to content
Merged
Show file tree
Hide file tree
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
8 changes: 8 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,14 @@ jobs:
with:
version: v2.4.0

vulnerability-scan:
name: Vulnerability Scan
uses: ./.github/workflows/vulncheck.yml
permissions:
security-events: write
with:
target-branch: ${{ github.event.pull_request.base.ref || github.ref_name }}

unit-test:
name: Unit Tests
runs-on: ubuntu-22.04
Expand Down
18 changes: 18 additions & 0 deletions .github/workflows/nightly-scans.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
name: nightly-scans.yml
on:
schedule:
- cron: '0 2 * * *' # Runs daily at 2:00 AM UTC
workflow_dispatch:

jobs:
scan-main:
name: Vulnerability Scan - Main
uses: ./.github/workflows/vulncheck.yml
with:
target-branch: 'main'

scan-v2:
name: Vulnerability Scan - dev-v2
uses: ./.github/workflows/vulncheck.yml
with:
target-branch: 'dev-v2'
42 changes: 42 additions & 0 deletions .github/workflows/vulncheck.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
name: vulncheck.yaml
on:
workflow_call:
inputs:
target-branch:
description: 'Target branch to run govulncheck against'
type: string
required: false
default: 'main'
workflow_dispatch:
inputs:
target-branch:
description: 'Target branch to run govulncheck against'
required: false
default: 'main'

jobs:
vulncheck:
name: Vulnerability Check
runs-on: ubuntu-22.04
permissions:
security-events: write # for reporting vulnerabilities via code-scanning API
steps:
- name: Checkout Repository
uses: actions/checkout@93cb6efe18208431cddfb8368fd83d5badbf9bfd # v5.0.1
with:
fetch-depth: 0
ref: ${{ inputs.targetBranch || 'main' }}

- name: Check Go version
id: get-go-version
run: |
echo "Reading from go.mod"
GO_VERSION=$(grep -E "^toolchain " go.mod | awk -F' ' '{print $2}' | tr -d 'go')
echo "Found $GO_VERSION"
echo "go-version="$GO_VERSION"" >> $GITHUB_OUTPUT

- name: Run govulncheck
id: govulncheck
uses: golang/govulncheck-action@b625fbe08f3bccbe446d94fbf87fcc875a4f50ee # v1.0.4
with:
go-version-input: ${{ steps.get-go-version.outputs.go-version }}
Loading