Add CodeQL workflow for GitHub code scanning

This commit is contained in:
LGTM Migrator
2022-12-07 09:23:31 +00:00
parent 10c2fe19c2
commit e0b01924fa
2 changed files with 47 additions and 0 deletions

3
.github/codeql.yml vendored Normal file
View File

@@ -0,0 +1,3 @@
query-filters:
- exclude:
id: cpp/unsigned-comparison-zero

44
.github/workflows/codeql.yml vendored Normal file
View File

@@ -0,0 +1,44 @@
name: "CodeQL"
on:
push:
branches: [ "master" ]
pull_request:
branches: [ "master" ]
schedule:
- cron: "41 14 * * 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
with:
submodules: recursive
- name: Initialize CodeQL
uses: github/codeql-action/init@v2
with:
languages: ${{ matrix.language }}
config-file: ./.github/codeql.yml
queries: +security-and-quality
- name: Autobuild
uses: github/codeql-action/autobuild@v2
- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v2
with:
category: "/language:${{ matrix.language }}"