Skip to content

Commit fb93aa0

Browse files
committed
Add CodeQL scanning
1 parent 2cb065c commit fb93aa0

File tree

1 file changed

+50
-0
lines changed

1 file changed

+50
-0
lines changed

.github/workflows/codeql.yml

Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
name: "CodeQL"
2+
3+
on:
4+
push:
5+
branches: [ "develop", "master" ]
6+
pull_request:
7+
branches: [ "develop", "master" ]
8+
schedule:
9+
- cron: '00 15 * * 1'
10+
11+
jobs:
12+
analyze:
13+
name: Analyze
14+
runs-on: 'ubuntu-latest'
15+
timeout-minutes: 360
16+
permissions:
17+
actions: read
18+
contents: read
19+
security-events: write
20+
21+
strategy:
22+
fail-fast: false
23+
matrix:
24+
language: [ 'csharp' ]
25+
26+
steps:
27+
- name: Checkout repository
28+
uses: actions/checkout@v4
29+
30+
# Initializes the CodeQL tools for scanning.
31+
- name: Initialize CodeQL
32+
uses: github/codeql-action/init@v3
33+
with:
34+
languages: ${{ matrix.language }}
35+
# If you wish to specify custom queries, you can do so here or in a config file.
36+
# By default, queries listed here will override any specified in a config file.
37+
# Prefix the list here with "+" to use these queries and those in the config file.
38+
39+
# For more details on CodeQL's query packs, refer to: https://docs.github.com/en/code-security/code-scanning/automatically-scanning-your-code-for-vulnerabilities-and-errors/configuring-code-scanning#using-queries-in-ql-packs
40+
# queries: security-extended,security-and-quality
41+
42+
- name: Build
43+
run: |
44+
dotnet restore FluentAssertions.sln --configfile nuget.config
45+
dotnet build FluentAssertions.sln --configuration CI --no-restore
46+
47+
- name: Perform CodeQL Analysis
48+
uses: github/codeql-action/analyze@v3
49+
with:
50+
category: "/language:${{matrix.language}}"

0 commit comments

Comments
 (0)