-
Notifications
You must be signed in to change notification settings - Fork 0
56 lines (50 loc) · 2.04 KB
/
codeql.yml
File metadata and controls
56 lines (50 loc) · 2.04 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
name: CodeQL
on:
push:
branches: [main]
pull_request:
branches: [main]
schedule:
# Weekly Sunday 07:00 UTC — catches new CodeQL queries against
# unchanged code. Same idea as the security.yml dep-audit cron.
- cron: '0 7 * * 0'
# Default-deny at workflow scope so the runner token can't accidentally
# write anywhere. The analyze job below opts back into the narrow set
# it needs.
permissions:
contents: read
jobs:
analyze:
name: Analyze (${{ matrix.language }})
runs-on: ubuntu-latest
permissions:
security-events: write # required to upload SARIF to code-scanning
packages: read # CodeQL may pull internal queries
actions: read # for workflow-level metadata
contents: read
strategy:
fail-fast: false
matrix:
# `javascript-typescript` is CodeQL's combined analyzer for both
# languages — one extraction pass covers .js + .ts.
language: [javascript-typescript]
steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
# CodeQL needs the workflow file referenced from here to be
# SHA-pinned (Scorecard's Pinned-Dependencies check) — these are
# the same pins build.yml and security.yml use elsewhere.
- name: Initialize CodeQL
uses: github/codeql-action/init@03e4368ac7daa2bd82b3e85262f3bf87ee112f57 # v3
with:
languages: ${{ matrix.language }}
# `security-extended` adds queries beyond the default suite
# (e.g. js/missing-rate-limiting, js/clear-text-logging) —
# the ones we've already been triaging. Keeping the same
# query set so dismissed-alert history matches.
queries: security-extended
- name: Autobuild
uses: github/codeql-action/autobuild@03e4368ac7daa2bd82b3e85262f3bf87ee112f57 # v3
- name: Perform CodeQL analysis
uses: github/codeql-action/analyze@03e4368ac7daa2bd82b3e85262f3bf87ee112f57 # v3
with:
category: '/language:${{ matrix.language }}'