forked from zottce/samp-rs
-
Notifications
You must be signed in to change notification settings - Fork 0
55 lines (49 loc) · 1.85 KB
/
Copy pathcodeql.yml
File metadata and controls
55 lines (49 loc) · 1.85 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
# CodeQL advanced setup.
#
# Replaces the repository's CodeQL *default* setup, which only analyses a pull
# request when it touches files relevant to the configured languages. A PR that
# changes only docs or dependency manifests produced no analysis at all, while
# `master` still carried one per language — so the `code_scanning` branch rule
# could not diff the two sides and reported "configurations not found".
#
# Running here, with no path filter, guarantees both configurations exist on
# every pull request. The categories below must keep matching the ones recorded
# on `master` (`/language:actions`, `/language:rust`) for that diff to work.
name: CodeQL
on:
push:
branches: [ "master" ]
pull_request:
branches: [ "master" ]
schedule:
# Weekly, to catch newly published queries against unchanged code.
- cron: '27 4 * * 1'
workflow_dispatch:
permissions:
contents: read
jobs:
analyze:
name: Analyze (${{ matrix.language }})
runs-on: ubuntu-latest
permissions:
contents: read
security-events: write # upload the SARIF results
actions: read
strategy:
fail-fast: false
matrix:
# Keep in sync with the languages the previous default setup covered.
language: [ actions, rust ]
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
- name: Initialize CodeQL
uses: github/codeql-action/init@cdf488f595d80d6e07e03d4674febd5ab45fa938 # v4.37.9
with:
languages: ${{ matrix.language }}
# Neither language needs a compiled build for CodeQL to extract it.
build-mode: none
queries: security-extended
- name: Perform CodeQL analysis
uses: github/codeql-action/analyze@cdf488f595d80d6e07e03d4674febd5ab45fa938 # v4.37.9
with:
category: "/language:${{ matrix.language }}"