Repository navigation
67 lines (63 loc) · 2.1 KB
/
Copy pathcodeql.yml
File metadata and controls
67 lines (63 loc) · 2.1 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
name: CodeQL
on:
push:
branches: [main]
pull_request:
schedule:
- cron: '17 3 * * 1'
workflow_dispatch:
permissions:
contents: read
concurrency:
group: codeql-${{ github.ref }}
cancel-in-progress: true
jobs:
analyze:
name: CodeQL (C/C++)
runs-on: ubuntu-24.04
timeout-minutes: 30
permissions:
contents: read
security-events: write
actions: read
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
persist-credentials: false
- name: Install build dependencies
run: |
sudo apt-get update
sudo apt-get install --no-install-recommends -y gcc-14 binutils pkg-config libpcre2-dev
sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-14 100
- name: Check out pinned Forge build dependency
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
repository: minelogy-dev/forge
ref: b6826ba762a1e9e337895e01ee604b943c682d23
path: .ci-deps/forge
persist-credentials: false
- name: Bootstrap Forge without installing system files
env:
CC: gcc
run: |
sh .ci-deps/forge/bootstrap.sh --no-test
echo "$GITHUB_WORKSPACE/.ci-deps/forge/build/output" >> "$GITHUB_PATH"
echo "CPATH=$GITHUB_WORKSPACE/.ci-deps/forge/build/output/include" >> "$GITHUB_ENV"
- name: Configure the build compiler
env:
CC: gcc
run: bash .github/scripts/configure.sh
- name: Initialize security and maintainability queries
uses: github/codeql-action/init@9b3254085494b55a0f7c4c2b3d2d52cc712ce370 # v4
with:
languages: c-cpp
build-mode: manual
queries: security-and-quality
- name: Build production code for analysis
run: |
forge .
./make
- name: Publish findings to code scanning and the pull request
uses: github/codeql-action/analyze@9b3254085494b55a0f7c4c2b3d2d52cc712ce370 # v4
with:
category: /language:c-cpp