-
Notifications
You must be signed in to change notification settings - Fork 0
58 lines (49 loc) · 1.69 KB
/
codeql.yml
File metadata and controls
58 lines (49 loc) · 1.69 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
# =============================================================================
# CodeQL: семантический анализ C# (security + quality). Отдельно от CI — свой статус в Checks.
# Требует для загрузки SARIF: permissions security-events: write.
# =============================================================================
name: CodeQL
on:
push:
branches: [main, master]
pull_request:
branches: [main, master]
schedule:
- cron: "25 4 * * 1"
workflow_dispatch:
concurrency:
group: codeql-${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
analyze:
name: Analyze C#
runs-on: ubuntu-24.04
timeout-minutes: 120
permissions:
actions: read
contents: read
security-events: write
steps:
- uses: actions/checkout@v4
- uses: github/codeql-action/init@v3
with:
languages: csharp
queries: security-and-quality
- uses: actions/setup-dotnet@v4
with:
global-json-file: global.json
- name: Build solution (CodeQL)
env:
DOTNET_NOLOGO: true
run: |
dotnet restore OrderTracking.sln
dotnet build OrderTracking.sln -c Release --no-restore /p:SkipNSwag=true
- uses: github/codeql-action/analyze@v3
- name: Job summary
if: always()
run: |
{
echo "### CodeQL"
echo "- C#: queries **security-and-quality**; сборка: \`dotnet build OrderTracking.sln -c Release /p:SkipNSwag=true\`"
echo "- Результаты: **Security → Code scanning** в репозитории"
} >> "$GITHUB_STEP_SUMMARY"