-
Notifications
You must be signed in to change notification settings - Fork 0
65 lines (53 loc) · 1.71 KB
/
Copy pathcodeql.yml
File metadata and controls
65 lines (53 loc) · 1.71 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
name: CodeQL
on:
push:
branches:
- main
pull_request:
branches:
- main
workflow_dispatch:
# A weekly sweep catches rules added to the CodeQL packs after a commit was
# last analysed, which a push-triggered scan alone never re-examines.
schedule:
- cron: "41 6 * * 2"
permissions:
contents: read
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:
# Uploading results is the only elevated permission this needs.
security-events: write
contents: read
actions: read
strategy:
fail-fast: false
matrix:
include:
- language: csharp
- language: javascript-typescript
steps:
- name: Checkout repository
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1
with:
persist-credentials: false
# build-mode: none analyses source directly rather than observing a
# compilation. It avoids reproducing the .NET and npm builds a second
# time, and removes a class of CI failure where the scan breaks because
# the build did rather than because the code is wrong.
- name: Initialise CodeQL
uses: github/codeql-action/init@18420e3271f74589575af831a523c833acda327f
with:
languages: ${{ matrix.language }}
build-mode: none
queries: security-and-quality
- name: Analyse
uses: github/codeql-action/analyze@18420e3271f74589575af831a523c833acda327f
with:
category: "/language:${{ matrix.language }}"