-
Notifications
You must be signed in to change notification settings - Fork 0
81 lines (72 loc) · 2.28 KB
/
codeql.yml
File metadata and controls
81 lines (72 loc) · 2.28 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
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
# CodeQL advanced setup. Replaces default-setup once disabled in repo settings.
# Advanced unlocks paths-ignore (skip generated code) and Go module caching
# across runs — projected ~1-2 min faster vs default-setup.
#
# Go analysis runs on push-to-main and weekly schedule only — not on PRs.
# Per-PR vulnerability coverage is handled by govulncheck (ci.yml). This avoids
# a ~5 min wall-clock hit from autobuild on every code PR.
# Actions and Python analyzers still run on PRs (both are fast, < 1 min).
name: CodeQL
on:
pull_request:
branches: [main]
paths-ignore:
- "api/centralconfig/v1/**"
- "internal/storage/dbstore/*.gen.go"
- "**/*.md"
push:
branches: [main]
schedule:
- cron: "23 7 * * 1"
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.sha }}
cancel-in-progress: true
permissions:
contents: read
jobs:
analyze:
name: Analyze (${{ matrix.language }})
runs-on: ubuntu-latest
timeout-minutes: 15
# Go autobuild takes ~5 min; skip it on PRs — govulncheck covers per-PR vuln
# scanning. Actions and Python are fast (< 1 min) and still run on PRs.
if: matrix.language != 'go' || github.event_name != 'pull_request'
permissions:
security-events: write
packages: read
actions: read
contents: read
strategy:
fail-fast: false
matrix:
include:
- language: actions
build-mode: none
- language: go
build-mode: autobuild
- language: python
build-mode: none
steps:
- name: Checkout
uses: actions/checkout@v6
with:
persist-credentials: false
- name: Set up Go
if: matrix.language == 'go'
uses: actions/setup-go@v6
with:
go-version-file: go.mod
cache: true
- name: Initialize CodeQL
uses: github/codeql-action/init@v4
with:
languages: ${{ matrix.language }}
build-mode: ${{ matrix.build-mode }}
config: |
paths-ignore:
- api/centralconfig/v1/**
- internal/storage/dbstore/*.gen.go
- name: Analyze
uses: github/codeql-action/analyze@v4
with:
category: "/language:${{ matrix.language }}"