-
Notifications
You must be signed in to change notification settings - Fork 0
76 lines (71 loc) · 2.95 KB
/
Copy pathcodeql.yml
File metadata and controls
76 lines (71 loc) · 2.95 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
68
69
70
71
72
73
74
75
76
name: codeql analysis
# The CodeQL lane of the security surface (the Saddle family scheme,
# adapted to the DevThink identity): github/codeql-action scans the
# languages that really exist in this repository - the workflow files
# themselves (actions) and the TypeScript engine + web workbench surface
# (javascript-typescript) - with build-mode none (no compiled language
# needs a manual build). No native C/C++ or Rust source is tracked: the
# desktop shell of the DevThink product is the compiled single binary
# (desktop.yml cross-compiles it from the TypeScript sources), and no
# .c/.cpp/.rs file exists in the merged tree, so the matrix stays the
# static two-language list the repository really carries instead of a
# runtime language probe. The other scanners (dependency review, the
# workbench audit, osv, trufflehog, trivy, sbom) live in security.yml;
# this file owns only the CodeQL analysis and its SARIF upload.
on:
push:
branches: [main]
pull_request:
branches: [main]
schedule:
# weekly, wednesday 04:25 UTC - off-peak from the security.yml lane
- cron: "25 4 * * 3"
workflow_dispatch:
permissions:
contents: read
concurrency:
# superseded analysis runs of the same event and ref are cancelled to
# save runner minutes (the Saddle CodeQL lane scheme).
group: codeql-${{ github.event_name }}-${{ github.ref }}
cancel-in-progress: true
jobs:
analyze:
name: analyze (${{ matrix.language }})
runs-on: ${{ (matrix.language == 'swift' && 'macos-latest') || 'ubuntu-latest' }}
# the merged repository carries a far larger TypeScript surface than the
# family baseline (the whole engine + workbench + test corpus answers as
# one extraction): the javascript-typescript leg measured past thirty
# minutes on a loaded runner queue thirteen times over, so the ceiling
# rides at sixty — the actions leg answers in minutes either way.
timeout-minutes: 60
# least-privilege: the job's own write (the e2ugh job-permission doctrine)
permissions:
# required for all workflows
security-events: write
# required to fetch internal or private CodeQL packs
packages: read
# only required for workflows in private repositories
actions: read
contents: read
strategy:
fail-fast: false
matrix:
include:
# the .github/workflows surface itself
- language: actions
build-mode: none
# the TypeScript engine domains + the web workbench surface
- language: javascript-typescript
build-mode: none
steps:
- name: Checkout DevThink source
uses: actions/checkout@v7.0.1
- name: Initialize CodeQL
uses: github/codeql-action/init@v4
with:
languages: ${{ matrix.language }}
build-mode: ${{ matrix.build-mode }}
- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v4
with:
category: "/language:${{ matrix.language }}"