-
Notifications
You must be signed in to change notification settings - Fork 53
57 lines (50 loc) · 2.2 KB
/
Copy pathcodeql.yml
File metadata and controls
57 lines (50 loc) · 2.2 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
name: CodeQL
on:
pull_request:
branches: [main]
push:
branches: [main]
# CodeQL query packs ship new rules continuously, so re-scan the default
# branch weekly even when nothing lands — a scheduled run is what surfaces
# newly-written queries against already-merged code.
schedule:
- cron: "27 5 * * 1" # Mondays 05:27 UTC
# A force-push to a PR obsoletes the in-flight scan — cancel it. Pushes to main
# all run (no cancel) so every merged commit keeps its own set of alerts, and
# scheduled runs are never cancelled by each other.
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: ${{ github.event_name == 'pull_request' }}
permissions:
contents: read
# All third-party actions are pinned to a full commit SHA, not a tag.
jobs:
# Scoped to JS/TS on purpose. The javascript-typescript extractor covers
# .js/.jsx/.ts/.tsx in one pass and needs no build, so this is the whole
# apps/ + packages/ TypeScript surface (~3.3k files) and nothing else.
# The repo's other languages are deliberately out of scope for now:
# - go (packages/sandbox/daemon-go) — compiled, needs a build step
# - python (packages/sandbox/image/skills) — 8 script files
# - rust (apps/native) — src-tauri won't compile on Linux, so it would
# need a macOS runner plus a full cargo build (see native.yml)
analyze:
name: Analyze (javascript-typescript)
runs-on: ubuntu-latest
timeout-minutes: 120
permissions:
contents: read
security-events: write # upload the SARIF results to code scanning
packages: read # CodeQL query packs are pulled from GHCR
steps:
- name: Checkout repository
uses: actions/checkout@11d5960a326750d5838078e36cf38b85af677262 # v4
- name: Initialize CodeQL
uses: github/codeql-action/init@faaa5d804fc648d0fdb28822a8e36cf7d0a6132c # v4
with:
languages: javascript-typescript
build-mode: none
config-file: ./.github/codeql/codeql-config.yml
- name: Perform CodeQL analysis
uses: github/codeql-action/analyze@faaa5d804fc648d0fdb28822a8e36cf7d0a6132c # v4
with:
category: /language:javascript-typescript