Repository navigation
78 lines (67 loc) · 2.05 KB
/
Copy pathcodeql.yml
File metadata and controls
78 lines (67 loc) · 2.05 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
77
78
name: CodeQL
on:
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]
schedule:
- cron: '43 3 * * 0'
permissions:
contents: read
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
# Superseded pull request runs are cancelled; runs on main finish so a
# release or documentation push that already started is never interrupted.
cancel-in-progress: ${{ github.ref != 'refs/heads/main' }}
env:
GIT_CONFIG_COUNT: '1'
GIT_CONFIG_KEY_0: init.defaultBranch
GIT_CONFIG_VALUE_0: main
jobs:
analyze:
name: Analyze (${{ matrix.language }})
runs-on: ubuntu-24.04
timeout-minutes: 30
permissions:
actions: read
contents: read
security-events: write
strategy:
fail-fast: false
matrix:
language: [ 'actions', 'c-cpp', 'csharp' ]
steps:
- name: Checkout repository
uses: actions/checkout@v7
with:
persist-credentials: false
- name: Initialize CodeQL
uses: github/codeql-action/init@v4
with:
languages: ${{ matrix.language }}
build-mode: none
queries: security-extended,security-and-quality
# The C# buildless restore warns "No NuGet feeds are reachable" whenever
# one of its feed sets is empty, although nuget.org, the only feed here,
# is reachable (github/codeql#22766). With the check off it restores from
# nuget.org directly. The variable is read only by the C# extractor.
- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v4
env:
CODEQL_EXTRACTOR_CSHARP_BUILDLESS_NUGET_FEEDS_CHECK: 'false'
with:
category: "/language:${{ matrix.language }}"
dependency-review:
name: Dependency review
if: ${{ github.event_name == 'pull_request' }}
runs-on: ubuntu-24.04
timeout-minutes: 10
steps:
- name: Checkout repository
uses: actions/checkout@v7
with:
persist-credentials: false
- name: Review dependency changes
uses: actions/dependency-review-action@v5
with:
fail-on-severity: high