Repository navigation
51 lines (47 loc) · 1.43 KB
/
Copy pathcodeql.yml
File metadata and controls
51 lines (47 loc) · 1.43 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
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
sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-14 100
- 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: sh bootstrap.sh --no-test
- name: Publish findings to code scanning and the pull request
uses: github/codeql-action/analyze@9b3254085494b55a0f7c4c2b3d2d52cc712ce370 # v4
with:
category: /language:c-cpp