recreate codeql.yml
This commit is contained in:
parent
be9df8d62b
commit
2b7146575f
185
.github/workflows/codeql-analysis.yml
vendored
185
.github/workflows/codeql-analysis.yml
vendored
@ -14,116 +14,129 @@ name: "CodeQL"
|
|||||||
on:
|
on:
|
||||||
workflow_dispatch:
|
workflow_dispatch:
|
||||||
branches: [ master, stable* ]
|
branches: [ master, stable* ]
|
||||||
pull_request_target:
|
push:
|
||||||
branches: [ master, stable* ]
|
branches: [ "master", "stable*" ]
|
||||||
|
pull_request:
|
||||||
permissions:
|
branches: [ "master", "stable*" ]
|
||||||
contents: read
|
schedule:
|
||||||
|
- cron: '41 2 * * 2'
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
analyze:
|
analyze:
|
||||||
|
name: Analyze (${{ matrix.language }})
|
||||||
|
# Runner size impacts CodeQL analysis time. To learn more, please see:
|
||||||
|
# - https://gh.io/recommended-hardware-resources-for-running-codeql
|
||||||
|
# - https://gh.io/supported-runners-and-hardware-resources
|
||||||
|
# - https://gh.io/using-larger-runners (GitHub.com only)
|
||||||
|
# Consider using larger runners or machines with greater resources for possible analysis time improvements.
|
||||||
|
runs-on: ${{ (matrix.language == 'swift' && 'macos-latest') || 'ubuntu-latest' }}
|
||||||
|
timeout-minutes: ${{ (matrix.language == 'swift' && 120) || 360 }}
|
||||||
permissions:
|
permissions:
|
||||||
|
# required for all workflows
|
||||||
security-events: write
|
security-events: write
|
||||||
|
|
||||||
|
# only required for workflows in private repositories
|
||||||
actions: read
|
actions: read
|
||||||
contents: read
|
contents: read
|
||||||
name: Analyze
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
|
|
||||||
strategy:
|
strategy:
|
||||||
fail-fast: false
|
fail-fast: false
|
||||||
matrix:
|
matrix:
|
||||||
language: [ 'cpp' ]
|
include:
|
||||||
# CodeQL supports [ 'cpp', 'csharp', 'go', 'java', 'javascript', 'python' ]
|
- language: c-cpp
|
||||||
# Learn more:
|
build-mode: manual
|
||||||
# https://docs.github.com/en/free-pro-team@latest/github/finding-security-vulnerabilities-and-errors-in-your-code/configuring-code-scanning#changing-the-languages-that-are-analyzed
|
# CodeQL supports the following values keywords for 'language': 'c-cpp', 'csharp', 'go', 'java-kotlin', 'javascript-typescript', 'python', 'ruby', 'swift'
|
||||||
|
# Use `c-cpp` to analyze code written in C, C++ or both
|
||||||
|
# Use 'java-kotlin' to analyze code written in Java, Kotlin or both
|
||||||
|
# Use 'javascript-typescript' to analyze code written in JavaScript, TypeScript or both
|
||||||
|
# To learn more about changing the languages that are analyzed or customizing the build mode for your analysis,
|
||||||
|
# see https://docs.github.com/en/code-security/code-scanning/creating-an-advanced-setup-for-code-scanning/customizing-your-advanced-setup-for-code-scanning.
|
||||||
|
# If you are analyzing a compiled language, you can modify the 'build-mode' for that language to customize how
|
||||||
|
# your codebase is analyzed, see https://docs.github.com/en/code-security/code-scanning/creating-an-advanced-setup-for-code-scanning/codeql-code-scanning-for-compiled-languages
|
||||||
steps:
|
steps:
|
||||||
- uses: suzuki-shunsuke/get-pr-action@v0.1.0
|
- name: Checkout repository
|
||||||
id: pr
|
uses: actions/checkout@v4
|
||||||
- uses: actions/checkout@v4
|
|
||||||
with:
|
|
||||||
ref: ${{steps.pr.outputs.merge_commit_sha}}
|
|
||||||
|
|
||||||
# Initializes the CodeQL tools for scanning.
|
# Initializes the CodeQL tools for scanning.
|
||||||
- name: Initialize CodeQL
|
- name: Initialize CodeQL
|
||||||
uses: github/codeql-action/init@v3
|
uses: github/codeql-action/init@v3
|
||||||
with:
|
with:
|
||||||
languages: ${{ matrix.language }}
|
languages: ${{ matrix.language }}
|
||||||
|
build-mode: ${{ matrix.build-mode }}
|
||||||
# If you wish to specify custom queries, you can do so here or in a config file.
|
# If you wish to specify custom queries, you can do so here or in a config file.
|
||||||
# By default, queries listed here will override any specified in a config file.
|
# By default, queries listed here will override any specified in a config file.
|
||||||
# Prefix the list here with "+" to use these queries and those in the config file.
|
# Prefix the list here with "+" to use these queries and those in the config file.
|
||||||
# queries: ./path/to/local/query, your-org/your-repo/queries@main
|
|
||||||
|
|
||||||
# Autobuild attempts to build any compiled languages (C/C++, C#, or Java).
|
# 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
|
||||||
# If this step fails, then you should remove it and run the build manually (see below)
|
# queries: security-extended,security-and-quality
|
||||||
# - name: Autobuild
|
|
||||||
# uses: github/codeql-action/autobuild@v2
|
|
||||||
|
|
||||||
|
# If the analyze step fails for one of the languages you are analyzing with
|
||||||
|
# "We were unable to automatically build your code", modify the matrix above
|
||||||
|
# to set the build mode to "manual" for that language. Then modify this step
|
||||||
|
# to build your code.
|
||||||
# ℹ️ Command-line programs to run using the OS shell.
|
# ℹ️ Command-line programs to run using the OS shell.
|
||||||
# 📚 https://git.io/JvXDl
|
# 📚 See https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#jobsjob_idstepsrun
|
||||||
|
- if: matrix.build-mode == 'manual'
|
||||||
# ✏️ If the Autobuild fails above, remove it and uncomment the following three lines
|
run: |
|
||||||
# and modify them (or add more) to build your code if your project
|
sudo apt update
|
||||||
# uses a compiled language
|
sudo apt install \
|
||||||
|
libxrandr-dev \
|
||||||
- run: |
|
libxinerama-dev \
|
||||||
sudo apt update
|
libusb-1.0-0-dev \
|
||||||
sudo apt install \
|
xserver-xorg-dev \
|
||||||
libxrandr-dev \
|
libswscale-dev \
|
||||||
libxinerama-dev \
|
libswresample-dev \
|
||||||
libusb-1.0-0-dev \
|
libavutil-dev \
|
||||||
xserver-xorg-dev \
|
libavcodec-dev \
|
||||||
libswscale-dev \
|
libcups2-dev \
|
||||||
libswresample-dev \
|
libpulse-dev \
|
||||||
libavutil-dev \
|
libasound2-dev \
|
||||||
libavcodec-dev \
|
libpcsclite-dev \
|
||||||
libcups2-dev \
|
xsltproc \
|
||||||
libpulse-dev \
|
libxcb-cursor-dev \
|
||||||
libasound2-dev \
|
libxcursor-dev \
|
||||||
libpcsclite-dev \
|
libcairo2-dev \
|
||||||
xsltproc \
|
libfaac-dev \
|
||||||
libxcb-cursor-dev \
|
libfaad-dev \
|
||||||
libxcursor-dev \
|
libjpeg-dev \
|
||||||
libcairo2-dev \
|
libgsm1-dev \
|
||||||
libfaac-dev \
|
ninja-build \
|
||||||
libfaad-dev \
|
libxfixes-dev \
|
||||||
libjpeg-dev \
|
libxkbcommon-dev \
|
||||||
libgsm1-dev \
|
libwayland-dev \
|
||||||
ninja-build \
|
libpam0g-dev \
|
||||||
libxfixes-dev \
|
libxdamage-dev \
|
||||||
libxkbcommon-dev \
|
libxcb-damage0-dev \
|
||||||
libwayland-dev \
|
ccache \
|
||||||
libpam0g-dev \
|
libxtst-dev \
|
||||||
libxdamage-dev \
|
libfuse3-dev \
|
||||||
libxcb-damage0-dev \
|
libsystemd-dev \
|
||||||
ccache \
|
libcairo2-dev \
|
||||||
libxtst-dev \
|
libsoxr-dev \
|
||||||
libfuse3-dev \
|
libsdl2-dev \
|
||||||
libsystemd-dev \
|
docbook-xsl \
|
||||||
libcairo2-dev \
|
libkrb5-dev \
|
||||||
libsoxr-dev \
|
libcjson-dev \
|
||||||
libsdl2-dev \
|
libpkcs11-helper1-dev \
|
||||||
docbook-xsl \
|
libsdl2-ttf-dev \
|
||||||
libkrb5-dev \
|
libsdl2-image-dev \
|
||||||
libcjson-dev \
|
libwebkit2gtk-4.0-dev \
|
||||||
libpkcs11-helper1-dev \
|
clang \
|
||||||
libsdl2-ttf-dev \
|
libopus-dev \
|
||||||
libsdl2-image-dev \
|
libwebp-dev \
|
||||||
libwebkit2gtk-4.0-dev \
|
libpng-dev \
|
||||||
clang \
|
libjpeg-dev \
|
||||||
libopus-dev \
|
liburiparser-dev
|
||||||
libwebp-dev \
|
mkdir ci-build
|
||||||
libpng-dev \
|
cd ci-build
|
||||||
libjpeg-dev \
|
export CC=/usr/bin/clang
|
||||||
liburiparser-dev
|
export CXX=/usr/bin/clang++
|
||||||
mkdir ci-build
|
export CFLAGS="-Weverything"
|
||||||
cd ci-build
|
export CXXFLAGS="-Weverything"
|
||||||
export CC=/usr/bin/clang
|
cmake -GNinja ../ci/cmake-preloads/config-linux-all.txt ..
|
||||||
export CXX=/usr/bin/clang++
|
cmake --build .
|
||||||
export CFLAGS="-Weverything"
|
|
||||||
export CXXFLAGS="-Weverything"
|
|
||||||
cmake -GNinja ../ci/cmake-preloads/config-linux-all.txt ..
|
|
||||||
cmake --build .
|
|
||||||
|
|
||||||
- name: Perform CodeQL Analysis
|
- name: Perform CodeQL Analysis
|
||||||
uses: github/codeql-action/analyze@v3
|
uses: github/codeql-action/analyze@v3
|
||||||
|
with:
|
||||||
|
category: "/language:${{matrix.language}}"
|
||||||
|
Loading…
Reference in New Issue
Block a user