2021-09-08 10:05:32 +00:00
# For most projects, this workflow file will not need changing; you simply need
# to commit it to your repository.
#
# You may wish to alter this file to override the set of languages analyzed,
# or to provide custom queries or build logic.
#
# ******** NOTE ********
# We have attempted to detect the languages in your repository. Please check
# the `language` matrix defined below to confirm you have the correct set of
# supported CodeQL languages.
#
name : "CodeQL"
on :
push :
branches : [ $default-branch, $protected-branches ]
pull_request :
# The branches below must be a subset of the branches above
branches : [ $default-branch ]
schedule :
- cron : $cron-weekly
jobs :
analyze :
name : Analyze
2023-04-18 18:45:37 +00:00
runs-on : ${{ (matrix.language == 'swift' && 'macos-latest') || 'ubuntu-latest' }}
2023-05-31 19:17:44 +00:00
timeout-minutes : ${{ (matrix.language == 'swift' && 120) || 360 }}
2021-09-08 10:05:32 +00:00
permissions :
actions : read
contents : read
security-events : write
strategy :
fail-fast : false
matrix :
language : [ $detected-codeql-languages ]
# CodeQL supports [ $supported-codeql-languages ]
2022-12-13 12:32:36 +00:00
# Use only 'java' to analyze code written in Java, Kotlin or both
# Use only 'javascript' to analyze code written in JavaScript, TypeScript or both
2022-04-26 18:52:33 +00:00
# Learn more about CodeQL language support at https://aka.ms/codeql-docs/language-support
2021-09-08 10:05:32 +00:00
steps :
- name : Checkout repository
2022-03-28 17:11:12 +00:00
uses : actions/checkout@v3
2021-09-08 10:05:32 +00:00
# Initializes the CodeQL tools for scanning.
- name : Initialize CodeQL
2022-03-31 13:39:38 +00:00
uses : github/codeql-action/init@v2
2021-09-08 10:05:32 +00:00
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.
2022-11-10 13:45:36 +00:00
2023-04-18 18:45:37 +00:00
# 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
2022-05-04 05:52:48 +00:00
# queries: security-extended,security-and-quality
2021-09-08 10:05:32 +00:00
2022-11-10 13:45:36 +00:00
2022-10-27 07:05:03 +00:00
# Autobuild attempts to build any compiled languages (C/C++, C#, Go, or Java).
2021-09-08 10:05:32 +00:00
# If this step fails, then you should remove it and run the build manually (see below)
- name : Autobuild
2022-03-31 13:39:38 +00:00
uses : github/codeql-action/autobuild@v2
2021-09-08 10:05:32 +00:00
# ℹ ️ Command-line programs to run using the OS shell.
2022-04-26 18:52:33 +00:00
# 📚 See https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#jobsjob_idstepsrun
2021-09-08 10:05:32 +00:00
2022-11-10 13:45:36 +00:00
# If the Autobuild fails above, remove it and uncomment the following three lines.
2022-05-04 05:52:48 +00:00
# modify them (or add more) to build your code if your project, please refer to the EXAMPLE below for guidance.
2021-09-08 10:05:32 +00:00
2022-05-04 05:52:48 +00:00
# - run: |
2023-01-23 17:32:59 +00:00
# echo "Run, Build Application using script"
# ./location_of_script_within_repo/buildscript.sh
2021-09-08 10:05:32 +00:00
- name : Perform CodeQL Analysis
2022-03-31 13:39:38 +00:00
uses : github/codeql-action/analyze@v2
2022-09-21 15:06:01 +00:00
with :
category : "/language:${{matrix.language}}"