-
Notifications
You must be signed in to change notification settings - Fork 0
67 lines (57 loc) · 2.04 KB
/
codeql.yml
File metadata and controls
67 lines (57 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
57
58
59
60
61
62
63
64
65
66
67
name: CodeQL
# Static analysis for security and quality issues. Runs on PRs (so we
# catch new findings before merge), on push to main (to keep the default
# branch's analysis fresh), and weekly (so newly published CodeQL
# queries get applied to existing code).
on:
push:
branches: [main]
pull_request:
branches: [main]
schedule:
# Weekly, Mondays 04:17 UTC. Off-peak; non-zero minute reduces
# contention with other scheduled jobs.
- cron: "17 4 * * 1"
concurrency:
group: codeql-${{ github.ref }}
cancel-in-progress: ${{ github.event_name == 'pull_request' }}
permissions:
contents: read
jobs:
analyze:
name: Analyze (${{ matrix.language }})
runs-on: ubuntu-latest
timeout-minutes: 30
permissions:
# Required to upload SARIF results to the Security tab.
security-events: write
# Required by some queries that read action metadata.
actions: read
contents: read
strategy:
fail-fast: false
matrix:
language: [javascript-typescript]
steps:
- uses: actions/checkout@v4
- name: Initialize CodeQL
uses: github/codeql-action/init@v3
with:
languages: ${{ matrix.language }}
# security-extended = the default suite plus extra security
# queries. security-and-quality also includes maintainability
# queries; security-extended is a good balance for a runtime
# library.
queries: security-extended
# Path filters and per-rule suppressions live in a separate
# config file so the rationale is version-controlled alongside
# the exclusions.
config-file: ./.github/codeql/codeql-config.yml
- name: Autobuild
# JS/TS does not require a build step for analysis; autobuild is
# a no-op but kept for symmetry with other languages.
uses: github/codeql-action/autobuild@v3
- name: Perform CodeQL analysis
uses: github/codeql-action/analyze@v3
with:
category: "/language:${{ matrix.language }}"