Repository navigation
53 lines (46 loc) · 1.73 KB
/
Copy pathcodeql.yml
File metadata and controls
53 lines (46 loc) · 1.73 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
name: CodeQL analysis
on:
push:
tags: ['*', '!zkvm-guests-*', '!bootnode-*']
schedule:
- cron: '0 0 * * 0'
workflow_dispatch:
jobs:
analyze:
name: Analyze
runs-on: ubuntu-latest
permissions:
actions: read
contents: read
security-events: write
strategy:
fail-fast: false
matrix:
language: ['csharp', 'actions']
steps:
# Private repositories (nethermind-sec) get the smaller hosted runner, whose root disk this build fills.
- name: Free up disk space
if: github.event.repository.private
# It starts with ~15 GB free and a full build needs ~33 GB; these hold over 25 GB the job never uses.
# /opt/hostedtoolcache/CodeQL stays: codeql-action/init uses that bundle and would download it again.
run: |
sudo rm -rf /usr/local/lib/android /usr/local/.ghcup /opt/ghc /usr/share/swift /usr/local/share/powershell /usr/lib/jvm /opt/az /usr/local/share/chromium /opt/google
docker image prune -af > /dev/null
df -h /
- name: Check out repository
uses: actions/checkout@v6
- name: Initialize CodeQL
uses: github/codeql-action/init@v4
with:
languages: ${{ matrix.language }}
queries: ${{ matrix.language == 'actions' && 'security-and-quality' || 'security-extended' }}
packs: githubsecuritylab/codeql-csharp-queries
- name: Set up .NET
uses: ./.github/actions/setup-dotnet
- name: Build Nethermind
working-directory: src/Nethermind
run: dotnet build Nethermind.slnx -c release
- name: Perform CodeQL analysis
uses: github/codeql-action/analyze@v4
with:
category: '/language:${{ matrix.language }}'