Skip to content

CodeQL Advanced Security Scanning #87

CodeQL Advanced Security Scanning

CodeQL Advanced Security Scanning #87

# ghas-management-template-version: 1.1
name: "CodeQL Advanced Security Scanning"
on:
# Initial proposal is daily runs to avoid overloading runners, teams can uncomment below to enable on push and PR events
# push:
# branches: [ "main", "master" ]
# pull_request:
# branches: [ "main", "master" ]
schedule:
- cron: '5 3 * * *' # Randomized per repository, daily runs somewhere between 22:00 and 06:00 UTC
workflow_dispatch:
jobs:
analyze:
name: Analyze
runs-on: ubuntu-latest
permissions:
actions: read
contents: read
security-events: write
packages: read
strategy:
fail-fast: false
matrix:
include:
- language: actions
build-mode: none
- language: go
build-mode: manual
steps:
- name: Checkout repository
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
- name: Set up Go
if: matrix.language == 'go'
uses: actions/setup-go@4a3601121dd01d1626a1e23e37211e3254c1c06c # v6.4.0
with:
go-version: "1.26"
- name: Initialize CodeQL
uses: github/codeql-action/init@c10b8064de6f491fea524254123dbe5e09572f13 # v4.35.1
with:
languages: ${{ matrix.language }}
build-mode: ${{ matrix.build-mode }}
- name: Build app
if: matrix.language == 'go'
run: go build ./...
- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@c10b8064de6f491fea524254123dbe5e09572f13 # v4.35.1
with:
category: "/language:${{matrix.language}}"