-
Notifications
You must be signed in to change notification settings - Fork 0
53 lines (48 loc) · 1.72 KB
/
Copy pathcodeql.yml
File metadata and controls
53 lines (48 loc) · 1.72 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
name: CodeQL
# Advanced CodeQL setup (replaces GitHub "default setup"). The non-Swift languages are
# interpreted / build-free, so they scan cheaply on every PR + push + weekly. Swift — which
# requires autobuilding the macOS app and is the slow/expensive job — is split out into
# codeql-swift.yml, scoped to macos/** changes + a weekly schedule, so a pure-Python/QA PR no
# longer pays the Swift-autobuild tax on every run.
#
# REQUIRED ONE-TIME TOGGLE (repo owner): GitHub default CodeQL setup must be DISABLED for these
# committed workflows to run — Settings -> Code security and analysis -> Code scanning ->
# "CodeQL analysis" -> switch from "Default" to "Advanced". Until that toggle is flipped,
# github/codeql-action/init fails by design (default + advanced cannot both run).
on:
push:
branches: [main]
pull_request:
branches: [main]
schedule:
- cron: '27 3 * * 1' # weekly, Monday 03:27 UTC
jobs:
analyze:
name: Analyze (${{ matrix.language }})
runs-on: ubuntu-latest
permissions:
security-events: write
actions: read
contents: read
strategy:
fail-fast: false
matrix:
include:
- language: python
build-mode: none
- language: javascript-typescript
build-mode: none
- language: actions
build-mode: none
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Initialize CodeQL
uses: github/codeql-action/init@v3
with:
languages: ${{ matrix.language }}
build-mode: ${{ matrix.build-mode }}
- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v3
with:
category: "/language:${{ matrix.language }}"