Skip to content

Bump github/codeql-action from 4.32.2 to 4.32.3 #277

Bump github/codeql-action from 4.32.2 to 4.32.3

Bump github/codeql-action from 4.32.2 to 4.32.3 #277

Workflow file for this run

# SPDX-FileCopyrightText: 2025 The DMorph contributors.
# SPDX-License-Identifier: MPL-2.0
name: Security
on:
push:
branches:
- master
pull_request:
branches:
- master
# Declare default permissions as read-only.
permissions: read-all
jobs:
TrivyCode:
runs-on: ubuntu-latest
permissions:
security-events: write
steps:
- name: Harden Runner
uses: step-security/harden-runner@5ef0c079ce82195b2a36a210272d6b661572d83e # v2.14.2
with:
egress-policy: audit
- name: Checkout code
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
- name: Run Trivy vulnerability scanner in repo mode
uses: aquasecurity/trivy-action@b6643a29fecd7f34b3597bc6acb0a98b03d33ff8 # 0.33.1
with:
scan-type: 'fs'
ignore-unfixed: true
format: 'sarif'
output: 'trivy-results.sarif'
severity: 'CRITICAL'
- name: Upload Trivy scan results to GitHub Security tab
uses: github/codeql-action/upload-sarif@9e907b5e64f6b83e7804b09294d44122997950d6 # v4.32.3
with:
sarif_file: 'trivy-results.sarif'
GolangciLint:
runs-on: ubuntu-latest
permissions:
security-events: write
steps:
- name: Harden Runner
uses: step-security/harden-runner@5ef0c079ce82195b2a36a210272d6b661572d83e # v2.14.2
with:
egress-policy: audit
- name: Checkout
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
with:
fetch-depth: 1
- name: Run golangci-lint
uses: golangci/golangci-lint-action@1e7e51e771db61008b38414a730f564565cf7c20 # v9.2.0
with:
version: latest
args: --output.sarif.path=golangci-lint-results.sarif
- name: Upload golangci-lint results to GitHub Security tab
uses: github/codeql-action/upload-sarif@9e907b5e64f6b83e7804b09294d44122997950d6 # v4.32.3
with:
sarif_file: golangci-lint-results.sarif
VulnerabilityCheck:
strategy:
matrix:
go-version:
- "stable"
runs-on: ubuntu-latest
permissions:
security-events: write
steps:
- name: Harden Runner
uses: step-security/harden-runner@5ef0c079ce82195b2a36a210272d6b661572d83e # v2.14.2
with:
egress-policy: audit
- name: Checkout
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
with:
fetch-depth: 1
- name: VulnerabilityCheck
uses: golang/govulncheck-action@b625fbe08f3bccbe446d94fbf87fcc875a4f50ee # v1.0.4
with:
repo-checkout: false
go-version-input: ${{matrix.go-version}}
output-format: sarif
output-file: govulncheck-results.sarif
- name: PrintSarif
id: PrintSarif
run: |
cat govulncheck-results.sarif
if grep results govulncheck-results.sarif
then
echo "hasResults=true" >> $GITHUB_OUTPUT
else
echo "hasResults=false" >> $GITHUB_OUTPUT
fi
- name: Upload govulncheck results to GitHub Security tab
if: ${{ steps.PrintSarif.outputs.hasResults == 'true' }}
uses: github/codeql-action/upload-sarif@9e907b5e64f6b83e7804b09294d44122997950d6 # v4.32.3
with:
sarif_file: govulncheck-results.sarif