-
Notifications
You must be signed in to change notification settings - Fork 2
45 lines (42 loc) · 1.34 KB
/
codeql-fedora.yml
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
name: CodeQL Analysis for Anvilock in Fedora
on:
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]
jobs:
codeql:
runs-on: ubuntu-latest
permissions:
actions: read
contents: read
security-events: write
strategy:
fail-fast: false
matrix:
language: [ "c" ]
steps:
- name: Checkout repository
uses: actions/checkout@v3
- name: Initialize CodeQL
uses: github/codeql-action/init@v2
with:
languages: ${{ matrix.language }}
- name: CodeQL Analysis in Fedora (Docker)
run: |
docker run --rm -v ${{ github.workspace }}:/workspace -w /workspace fedora:latest bash -c "
dnf update -y &&
dnf install -y gcc make cmake wget tar &&
wget https://github.com/github/codeql-cli-binaries/releases/download/v2.15.5/codeql-linux64.tar.gz &&
tar -xzvf codeql-linux64.tar.gz &&
export PATH=\$PATH:/workspace/codeql &&
cd .github/workflows/ &&
chmod +x build-fedora.sh &&
./build-fedora.sh &&
cd /workspace &&
codeql database create cpp-db --language=cpp &&
codeql database analyze cpp-db --format=sarif-latest --output=cpp-analysis.sarif"
- name: Upload SARIF file
uses: github/codeql-action/upload-sarif@v2
with:
sarif_file: cpp-analysis.sarif