Skip to content

CodeQL

CodeQL #142

Workflow file for this run

name: "CodeQL"
on:
push:
branches: [ "master" ]
pull_request:
branches: [ "master" ]
schedule:
- cron: "43 1 * * 5"
jobs:
analyze:
name: Analyze
runs-on: ubuntu-latest
permissions:
actions: read
contents: read
security-events: write
strategy:
fail-fast: false
matrix:
language: [ cpp ]
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Initialize CodeQL
uses: github/codeql-action/init@v2
with:
languages: ${{ matrix.language }}
config-file: .github/config.yml
- name: Autobuild
uses: github/codeql-action/autobuild@v2
- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v2
with:
upload: false # disable the upload here - we will upload in a different action
output: sarif-results
category: "/language:${{ matrix.language }}"
- name: filter-sarif
uses: zbazztian/filter-sarif@master
with:
# filter out documentation, all test files, examples, debugging, and autoconf checking files
patterns: |
-**/doc
-**/tests
-**/examples
-**/lib/debug.cpp
-**/conftest.c
-**/conftest.cpp
input: sarif-results/${{ matrix.language }}.sarif
output: sarif-results/${{ matrix.language }}.sarif
- name: Upload SARIF
uses: github/codeql-action/upload-sarif@v2
with:
sarif_file: sarif-results/${{ matrix.language }}.sarif