-
Notifications
You must be signed in to change notification settings - Fork 23
48 lines (41 loc) · 1.05 KB
/
codeQL.yml
File metadata and controls
48 lines (41 loc) · 1.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
name: CodeQL 扫描
on:
push:
pull_request:
schedule:
- cron: "0 3 * * 1"
jobs:
analyze:
name: CodeQL 分析
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
include:
- language: csharp
build-mode: manual
- language: actions
build-mode: none
permissions:
actions: read
contents: read
security-events: write
steps:
- name: 检出仓库
uses: actions/checkout@v4
- name: 安装 .NET SDK
if: ${{ matrix.language == 'csharp' }}
uses: actions/setup-dotnet@v4
with:
dotnet-version: 10.0.x
dotnet-quality: preview
- name: 初始化 CodeQL
uses: github/codeql-action/init@v4
with:
languages: ${{ matrix.language }}
build-mode: ${{ matrix.build-mode }}
- name: 构建
if: ${{ matrix.language == 'csharp' }}
run: dotnet build SecRandom.sln -c Release
- name: 执行 CodeQL 分析
uses: github/codeql-action/analyze@v4