Repository navigation
63 lines (56 loc) · 2.32 KB
/
Copy pathcodeql.yml
File metadata and controls
63 lines (56 loc) · 2.32 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
name: CodeQL
# Shell and Dockerfiles have no CodeQL analyzer, so the analyzable surface in
# this repo is the GitHub Actions workflows themselves — CodeQL's `actions`
# support (GA since 2025-04) flags script injection, missing/over-broad
# permissions, unpinned actions and untrusted-input sinks in the workflows.
# Advanced setup: GitHub's "default" code-scanning setup must be OFF in repo
# settings (Settings → Code security → Code scanning → Advanced) or Analyze errors.
# Triggers are scoped to the ONLY paths this analysis reads (the `actions`
# language surface below + its config): a PR touching only shell scripts or the
# Dockerfile cannot produce different CodeQL results, and previously still ran a
# full ~1.5-3 min analysis. Safe because "CI Complete" (in ci.yml), not CodeQL,
# is the required branch-protection check — a skipped run can't deadlock merges.
# The weekly schedule (Monday 03:00 UTC) was removed when the project became
# unmaintained (2026-10-20); use workflow_dispatch for an on-demand full scan.
on:
push:
branches: [main]
paths:
- ".github/workflows/**"
- ".github/codeql/**"
pull_request:
branches: [main]
paths:
- ".github/workflows/**"
- ".github/codeql/**"
workflow_dispatch:
# Cancel a superseded run when new commits land on the same ref, so rapid pushes
# don't queue overlapping CodeQL analyses (mirrors ci.yml).
concurrency:
group: codeql-${{ github.ref }}
cancel-in-progress: true
# Deny all permissions by default; each job opts in to only what it needs.
permissions: {}
jobs:
analyze:
name: Analyze (${{ matrix.language }})
runs-on: ubuntu-24.04
timeout-minutes: 30
permissions:
contents: read
security-events: write
strategy:
fail-fast: false
matrix:
language: [actions]
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1
- name: Initialize CodeQL
uses: github/codeql-action/init@24c54180a607b1449ed407dd24f251e4e9147c8d
with:
languages: ${{ matrix.language }}
# Actions workflows are declarative YAML — nothing to build.
build-mode: none
config-file: ./.github/codeql/codeql-config.yml
- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@24c54180a607b1449ed407dd24f251e4e9147c8d