Repository navigation
62 lines (53 loc) · 1.79 KB
/
Copy pathcodeql.yml
File metadata and controls
62 lines (53 loc) · 1.79 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
# CodeQL Security Analysis
# Performs deep semantic code analysis to find security vulnerabilities
# https://docs.github.com/en/code-security/code-scanning/automatically-scanning-your-code-for-vulnerabilities-and-errors
name: "CodeQL"
on:
push:
branches: [main]
pull_request:
branches: [main, 'dev/**']
schedule:
# Run weekly on Sunday at midnight UTC
- cron: "0 0 * * 0"
jobs:
analyze:
name: Analyze
runs-on: ubuntu-latest
timeout-minutes: 360
permissions:
actions: read
contents: read
security-events: write
strategy:
fail-fast: false
matrix:
# GitHub's Default setup scanned all four of these until this
# advanced workflow replaced it on 2026-01-21 with Go only; the
# other three categories then went stale and the Security >
# Tools page reported "Default setup" as failing ever since.
# Keep the same /language:<name> categories so the tool status
# stays continuous.
language: [go, javascript-typescript, python, actions]
steps:
- name: Checkout repository
uses: actions/checkout@v7
- name: Initialize CodeQL
uses: github/codeql-action/init@v4
with:
languages: ${{ matrix.language }}
# Use custom configuration for query tuning and path exclusions
config-file: .github/codeql/codeql-config.yml
- name: Setup Go
if: matrix.language == 'go'
uses: actions/setup-go@v7
with:
go-version-file: go.mod
cache: true
- name: Autobuild
if: matrix.language == 'go'
uses: github/codeql-action/autobuild@v4
- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v4
with:
category: "/language:${{matrix.language}}"