-
Notifications
You must be signed in to change notification settings - Fork 0
62 lines (56 loc) · 2.65 KB
/
Copy pathcodeql.yml
File metadata and controls
62 lines (56 loc) · 2.65 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
name: CodeQL
on:
pull_request:
branches: [main]
merge_group: # Merge-queue runs, so a required CodeQL check doesn't
# block queued merges (mirrors ci.yml).
push:
branches: [main] # PRs are covered by pull_request; scoping push to main
# avoids double-running every PR commit (mirrors ci.yml).
schedule:
- cron: "29 14 * * 2" # weekly off-PR sweep so new queries shipped by GitHub
# still scan the default branch between code changes
# Least privilege at the workflow level; the analyze job opts into the extra
# scopes CodeQL needs. Actions are pinned to commit SHAs (a moved tag can't
# silently change what runs); Dependabot keeps them current.
permissions:
contents: read
# Cancel superseded runs when new commits land on a PR/branch, but never cancel
# a main run (don't drop the scan that updates the default-branch baseline).
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: ${{ github.ref != 'refs/heads/main' }}
jobs:
analyze:
name: analyze (${{ matrix.language }})
runs-on: ubuntu-latest
timeout-minutes: 30
permissions:
security-events: write # upload SARIF results to code scanning
actions: read # workflow metadata for run context on private repos
contents: read
strategy:
fail-fast: false
matrix:
# python: the CLI itself; actions: the workflows in .github/workflows;
# javascript-typescript: the committed `assembly init` template JS.
# All three are interpreted languages, so build-mode none suffices and
# each analysis finishes in about a minute. The Swift helper needs a
# ~25-minute traced build on a macOS runner, so it lives in
# codeql-swift.yml, path-filtered to Swift changes and kept out of the
# merge queue (the queue ref is deleted as soon as the PR merges, which
# makes any scan slower than the queue fail its SARIF upload).
language: [python, actions, javascript-typescript]
steps:
- uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3
with:
persist-credentials: false # no job pushes; don't leave the token in .git/config
- name: Initialize CodeQL
uses: github/codeql-action/init@8aad20d150bbac5944a9f9d289da16a4b0d87c1e # v4.36.2
with:
languages: ${{ matrix.language }}
build-mode: none
- name: Analyze
uses: github/codeql-action/analyze@8aad20d150bbac5944a9f9d289da16a4b0d87c1e # v4.36.2
with:
category: /language:${{ matrix.language }}