Repository navigation
57 lines (51 loc) · 1.78 KB
/
Copy pathcodeql.yml
File metadata and controls
57 lines (51 loc) · 1.78 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
name: CodeQL
on:
push:
branches: [main]
# NOTE: if CodeQL is a required check, a diff matching every pattern here
# skips the workflow and the required check can stay pending, blocking
# merge. Keep the markdown ignore ROOT-ONLY ("*.md", not "**/*.md") so
# nested-doc-only PRs don't strand the check. The weekly schedule below
# still guarantees a full scan regardless.
paths-ignore:
- "docs/**"
- "*.md"
pull_request:
branches: [main]
paths-ignore:
- "docs/**"
- "*.md"
schedule:
- cron: "0 3 * * 1" # weekly, Monday 03:00 UTC — full scan even without code changes
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:
# JS/TS app code + the CI workflows themselves (actions — script
# injection, unpinned actions, permission misconfig).
language: [javascript-typescript, actions]
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v4
with:
persist-credentials: false
- name: Initialize CodeQL
uses: github/codeql-action/init@9b3254085494b55a0f7c4c2b3d2d52cc712ce370 # v4
with:
languages: ${{ matrix.language }}
# JS/TS needs no compilation; skip autobuild entirely.
build-mode: none
config-file: ./.github/codeql/codeql-config.yml
- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@9b3254085494b55a0f7c4c2b3d2d52cc712ce370 # v4