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
name: CodeQL
# The frontend under desktop/ui/js has never been statically analysed: the
# `frontend-invariants` job in ci.yml greps for a handful of specific APIs, which
# is a tripwire, not an analysis. CodeQL covers the rest, and covers the Rust
# side as well.
on:
push:
branches:
pull_request:
branches:
schedule:
# A new query pack can find something in code that has not changed, so run
# weekly rather than only on a diff.
- cron: "23 4 * * 1"
# One run per branch at a time. Pushing a fix a minute after a typo used to
# leave the first run grinding through a three-platform matrix for a commit
# nobody will ever merge.
#
# Cancellation is limited to pull requests. A push to main or develop is the
# integration record for that commit and runs to completion even if another
# push follows it, so a green tick always refers to a commit that was actually
# built rather than to whichever one happened to land last.
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: ${{ github.event_name == 'pull_request' }}
permissions:
contents: read
jobs:
analyze:
name: Analyze ${{ matrix.language }}
runs-on: ubuntu-latest
permissions:
contents: read
security-events: write
strategy:
fail-fast: false
matrix:
include:
- language: rust
build-mode: none
- language: javascript-typescript
build-mode: none
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
# CodeQL's Rust extractor reads source; a toolchain is installed so it can
# resolve the workspace, but nothing is compiled and the Tauri system
# libraries are therefore not needed.
- if: matrix.language == 'rust'
uses: dtolnay/rust-toolchain@6bed0761d98439e5a578e2877258200ad565ba87 # stable
- uses: github/codeql-action/init@5ba2889ada762081db2c4f32a729827dce632c7b # v3
with:
languages: ${{ matrix.language }}
build-mode: ${{ matrix.build-mode }}
queries: security-and-quality
- uses: github/codeql-action/analyze@5ba2889ada762081db2c4f32a729827dce632c7b # v3
with:
category: /language:${{ matrix.language }}