chore: update the CodeQL workflow (#1246)

Co-authored-by: Taj <tjgurwara99@users.noreply.github.com>
This commit is contained in:
David Leal 2023-05-16 12:39:34 -06:00 committed by GitHub
parent aae2aac1ff
commit a555d2dd07
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 44 additions and 39 deletions

View File

@ -1,56 +1,61 @@
name: "CodeQL" name: "Code Scanning - Action"
on: on:
push: push:
branches: [ "master" ] branches: [master]
pull_request: pull_request:
branches: [ "master" ] branches: [master]
schedule:
# ┌───────────── minute (0 - 59)
# │ ┌───────────── hour (0 - 23)
# │ │ ┌───────────── day of the month (1 - 31)
# │ │ │ ┌───────────── month (1 - 12 or JAN-DEC)
# │ │ │ │ ┌───────────── day of the week (0 - 6 or SUN-SAT)
# │ │ │ │ │
# │ │ │ │ │
# │ │ │ │ │
# * * * * *
- cron: '30 1 * * 0'
jobs: jobs:
analyze: CodeQL-Build:
name: Analyze # CodeQL runs on ubuntu-latest, windows-latest, and macos-latest
runs-on: ubuntu-latest runs-on: ubuntu-latest
permissions: permissions:
actions: read # required for all workflows
contents: read
security-events: write security-events: write
strategy: # only required for workflows in private repositories
fail-fast: false actions: read
matrix: contents: read
language: [ 'cpp' ]
steps: steps:
- name: Checkout repository - name: Checkout repository
uses: actions/checkout@v3 uses: actions/checkout@v3
- name: Initialize CodeQL
uses: github/codeql-action/init@v2
with:
languages: ${{ matrix.language }}
# 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.
# Prefix the list here with "+" to use these queries and those in the config file.
# 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 # Initializes the CodeQL tools for scanning.
# queries: security-extended,security-and-quality - name: Initialize CodeQL
uses: github/codeql-action/init@v2
# Override language selection by uncommenting this and choosing your languages
with:
languages: cpp
# Autobuild attempts to build any compiled languages (C/C++, C#, Go, or Java). # Autobuild attempts to build any compiled languages (C/C++, C#, Go, or Java).
# If this step fails, then you should remove it and run the build manually (see below) # If this step fails, then you should remove it and run the build manually (see below).
- name: Autobuild - name: Autobuild
uses: github/codeql-action/autobuild@v2 uses: github/codeql-action/autobuild@v2
# Command-line programs to run using the OS shell. # Command-line programs to run using the OS shell.
# 📚 See https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#jobsjob_idstepsrun # 📚 See https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#jobsjob_idstepsrun
# If the Autobuild fails above, remove it and uncomment the following three lines. # ✏️ If the Autobuild fails above, remove it and uncomment the following
# modify them (or add more) to build your code if your project, please refer to the EXAMPLE below for guidance. # three lines and modify them (or add more) to build your code if your
# project uses a compiled language
# - run: | #- run: |
# echo "Run, Build Application using script" # make bootstrap
# ./location_of_script_within_repo/buildscript.sh # make release
#
# In our case, this would be a CMake build step.
- name: Perform CodeQL Analysis - name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v2 uses: github/codeql-action/analyze@v2
with:
category: "/language:${{matrix.language}}"