-
Notifications
You must be signed in to change notification settings - Fork 0
71 lines (63 loc) · 2.44 KB
/
Copy pathcodeql.yml
File metadata and controls
71 lines (63 loc) · 2.44 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
67
68
69
70
71
# GitHub CodeQL static analysis for JavaScript / TypeScript.
#
# Runs on:
# - pull_request : blocking gate on PRs against main
# - push to main : post-merge sweep so baseline is always fresh
# - schedule : weekly, catches newly published query updates
# against code that hasn't been touched in a while
#
# Findings surface as code-scanning alerts under Security → Code
# scanning and (for PRs) as inline review comments. Non-blocking
# informational queries stay out of the PR exit code; security queries
# that trigger at `security-extended` cause the job to fail.
name: CodeQL
on:
pull_request:
branches: [main]
push:
branches: [main]
schedule:
# Weekly sweep: Monday 06:00 UTC. Off-peak for most maintainers so
# a failed run does not collide with active PR traffic.
- cron: "0 6 * * 1"
permissions:
contents: read
concurrency:
group: codeql-${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
analyze:
name: CodeQL analyze (${{ matrix.language }})
runs-on: ubuntu-latest
timeout-minutes: 30
permissions:
# Required to upload SARIF into the code-scanning dashboard.
security-events: write
# Needed by the init action to read config.
actions: read
contents: read
strategy:
fail-fast: false
matrix:
# Single language today (JS/TS covers both client and server
# TypeScript as one analysis unit). Add rows here if we ever
# introduce Python/Go/etc. sources to scan.
language: [javascript-typescript]
steps:
- name: Check out repo
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6
- name: Initialize CodeQL
uses: github/codeql-action/init@9e0d7b8d25671d64c341c19c0152d693099fb5ba # v4
with:
languages: ${{ matrix.language }}
# `security-extended` widens the default `security` query
# suite to include higher-noise queries that have caught real
# bugs in similar stacks. If noise becomes an issue we can
# fall back to `security-and-quality` or the default suite.
queries: security-extended
- name: Autobuild
uses: github/codeql-action/autobuild@9e0d7b8d25671d64c341c19c0152d693099fb5ba # v4
- name: Analyze
uses: github/codeql-action/analyze@9e0d7b8d25671d64c341c19c0152d693099fb5ba # v4
with:
category: "/language:${{ matrix.language }}"