-
Notifications
You must be signed in to change notification settings - Fork 0
54 lines (47 loc) · 1.66 KB
/
Copy pathcodeql.yml
File metadata and controls
54 lines (47 loc) · 1.66 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
name: CodeQL
# PRD-216 US-006 (AC-3): CodeQL static analysis on every PR to main, every push
# to main, and a weekly schedule, using the security-and-quality query suite.
#
# OQ-4 rollout (enforced via GitHub branch protection by Gerard, NOT in this YAML):
# the FIRST runs establish a baseline / warn-only while existing findings are
# triaged; once the baseline is clean, branch protection requires the "CodeQL"
# check to pass so a PR that INTRODUCES a High/Critical alert is blocked from
# merging. No autofail config belongs in the workflow — this is a repo setting.
on:
push:
branches: [main]
pull_request:
branches: [main]
schedule:
# Weekly, Monday 04:23 UTC (off the top of the hour to avoid the scheduler stampede).
- cron: "23 4 * * 1"
concurrency:
group: codeql-${{ github.ref }}
cancel-in-progress: true
jobs:
analyze:
name: Analyze (${{ matrix.language }})
runs-on: ubuntu-latest
permissions:
security-events: write
actions: read
contents: read
strategy:
fail-fast: false
matrix:
# JS + TS share one CodeQL language; covers the nextjs_space/ app.
language: ["javascript-typescript"]
steps:
- name: Checkout
uses: actions/checkout@v6
- name: Initialize CodeQL
uses: github/codeql-action/init@v4
with:
languages: ${{ matrix.language }}
queries: security-and-quality
# build-mode: none — JS/TS is interpreted; no compile step to drive.
build-mode: none
- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v4
with:
category: "/language:${{ matrix.language }}"