-
Notifications
You must be signed in to change notification settings - Fork 0
66 lines (56 loc) · 2.52 KB
/
codeql.yml
File metadata and controls
66 lines (56 loc) · 2.52 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
name: CodeQL Advanced
on:
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]
schedule:
# Runs every Monday at 08:00 UTC
- cron: '0 8 * * 1'
jobs:
analyze:
name: Analyze (${{ matrix.language }})
runs-on: ubuntu-latest
permissions:
contents: read
security-events: write
actions: read
strategy:
fail-fast: false
matrix:
language: [ javascript-typescript ]
# CodeQL supports: c-cpp, csharp, go, java-kotlin,
# javascript-typescript, python, ruby, swift
steps:
# ── 1. Checkout ────────────────────────────────────────────
- name: Checkout repository
uses: actions/checkout@v6
# ── 2. Node.js ─────────────────────────────────────────────
- name: Set up Node.js
uses: actions/setup-node@v6
with:
node-version: '20'
cache: 'yarn'
# ── 3. Install dependencies ────────────────────────────────
# Required so CodeQL can trace the build and resolve imports.
- name: Install dependencies
run: yarn install --frozen-lockfile
# ── 4. Initialize CodeQL ───────────────────────────────────
# Downloads the CodeQL toolchain and sets up the database.
- name: Initialize CodeQL
uses: github/codeql-action/init@v4
with:
languages: ${{ matrix.language }}
# Advanced queries include security-extended for deeper XSS,
# injection, path-traversal and prototype-pollution checks.
queries: security-extended, security-and-quality
# ── 5. Autobuild ───────────────────────────────────────────
# For JS/TS, autobuild just confirms the source is parseable.
# For compiled languages it would actually compile the project.
- name: Autobuild
uses: github/codeql-action/autobuild@v4
# ── 6. Perform analysis ────────────────────────────────────
- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v4
with:
category: '/language:${{ matrix.language }}'