-
Notifications
You must be signed in to change notification settings - Fork 0
97 lines (82 loc) · 2.42 KB
/
codeql.yml
File metadata and controls
97 lines (82 loc) · 2.42 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
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
name: CodeQL Analysis
concurrency:
group: ${{ github.ref }}
cancel-in-progress: true
on:
push:
branches: [main]
pull_request:
branches: [main]
schedule:
- cron: "0 2 * * 1" # Weekly on Monday at 2 AM UTC
jobs:
analyze:
name: Analyze
runs-on: ubuntu-latest
permissions:
actions: read
contents: read
security-events: write
strategy:
fail-fast: false
matrix:
language: ["csharp"]
steps:
- name: Checkout repository
uses: actions/checkout@v5
- name: Initialize CodeQL
uses: github/codeql-action/init@v4
with:
languages: ${{ matrix.language }}
queries: security-and-quality
- name: Setup .NET
uses: actions/setup-dotnet@v5
with:
dotnet-version: "10.0.x"
- name: Cache NuGet packages
uses: actions/cache@v4
with:
path: ~/.nuget/packages
key: ${{ runner.os }}-nuget-${{ hashFiles('**/*.csproj') }}
restore-keys: |
${{ runner.os }}-nuget-
- name: Restore dependencies
run: dotnet restore
- name: Build projects
run: |
dotnet build src/Lintellect.Api/Lintellect.Api.csproj --configuration Release --no-restore
dotnet build src/Lintellect.Cli/Lintellect.Cli.csproj --configuration Release --no-restore
dotnet build src/Lintellect.Shared/Lintellect.Shared.csproj --configuration Release --no-restore
- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v4
with:
category: "/language:${{matrix.language}}"
#dependency-review:
# name: Dependency Review
# runs-on: ubuntu-latest
# if: github.event_name == 'pull_request'
#
# steps:
# - name: Checkout repository
# uses: actions/checkout@v5
#
# - name: Dependency Review
# uses: actions/dependency-review-action@v4
# with:
# fail-on-severity: moderate
# allow-licenses: MIT, Apache-2.0, AGPL-3.0, BSD-2-Clause, BSD-3-Clause, ISC, Unlicense
secret-scan:
name: Secret Scan
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v5
with:
fetch-depth: 0
- name: Run TruffleHog
uses: trufflesecurity/trufflehog@v3.90.11
with:
path: ./
base: main
head: HEAD
extra_args: --debug --only-verified