Repository navigation
48 lines (44 loc) · 1.77 KB
/
Copy pathcodeql.yml
File metadata and controls
48 lines (44 loc) · 1.77 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
name: CodeQL
on:
push:
branches: [master]
pull_request:
branches: [master]
schedule:
- cron: '32 7 * * 1'
permissions:
contents: read
# A PR's runs share one group per branch, so a new push cancels the superseded
# run. Push and schedule runs each get their own group (the run id): GitHub keeps
# only one pending run per group, so a shared group would let a newer push
# replace a queued default-branch run.
concurrency:
group: ${{ github.workflow }}-${{ github.event_name == 'pull_request' && github.ref || github.run_id }}
cancel-in-progress: ${{ github.event_name == 'pull_request' }}
jobs:
analyze:
name: analyze (${{ matrix.language }})
# CodeQL runs on GitHub's runners: it sizes itself to the machine, and the exec runners of every repo share one host, so concurrent analyses would exhaust its memory.
runs-on: ubuntu-latest
timeout-minutes: 20
permissions:
actions: read
contents: read
security-events: write # upload the CodeQL SARIF
strategy:
fail-fast: false
matrix:
# `actions` scans the workflows themselves: expression injection, untrusted
# checkouts under pull_request_target, over-broad token permissions.
language: [javascript-typescript, actions]
steps:
- uses: askalf/ci/actions/checkout-with-retry@84d68a04c25cbc7c50598b05476293c4ae00a898 # main 2026-11-02, askalf/ci#159
with:
persist-credentials: false
- uses: github/codeql-action/init@9b3254085494b55a0f7c4c2b3d2d52cc712ce370 # v4.39.1
with:
languages: ${{ matrix.language }}
queries: security-and-quality
- uses: github/codeql-action/analyze@9b3254085494b55a0f7c4c2b3d2d52cc712ce370 # v4.39.1
with:
category: "/language:${{ matrix.language }}"