2023-06-01 17:53:25 +00:00
# See https://codeql.github.com and https://github.com/github/codeql-action
# This action runs GitHub's industry-leading semantic code analysis engine, CodeQL, against a
# repository's source code to find security vulnerabilities. It then automatically uploads the
# results to GitHub so they can be displayed in the repository's security tab.
2021-10-25 20:05:12 +00:00
name : "CodeQL"
on :
push :
2023-06-01 18:51:48 +00:00
branches : [ "main" , release* ]
2021-10-25 20:05:12 +00:00
pull_request :
# The branches below must be a subset of the branches above
2023-06-01 18:51:48 +00:00
branches : [ "main" ]
2021-10-25 20:05:12 +00:00
schedule :
2023-06-01 18:51:48 +00:00
- cron : '24 3 * * 3'
2021-10-25 20:05:12 +00:00
jobs :
analyze :
name : Analyze
2023-06-01 18:51:48 +00:00
runs-on : ${{ (matrix.language == 'swift' && 'macos-latest') || 'ubuntu-latest' }}
timeout-minutes : ${{ (matrix.language == 'swift' && 120) || 360 }}
2021-10-25 20:05:12 +00:00
permissions :
actions : read
contents : read
security-events : write
strategy :
fail-fast : false
matrix :
language : [ 'go' , 'javascript' ]
steps :
- name : Checkout repository
2023-06-01 17:53:25 +00:00
uses : actions/checkout@v3
2021-10-25 20:05:12 +00:00
- name : Initialize CodeQL
2023-06-01 17:53:25 +00:00
uses : github/codeql-action/init@v2
2021-10-25 20:05:12 +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.
2023-06-01 18:51:48 +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
# queries: security-extended,security-and-quality
2021-10-25 20:05:12 +00:00
# Autobuild attempts to build any compiled languages (C/C++, C#, or Java).
# If this step fails, then you should remove it and run the build manually (see below)
- name : Autobuild
2023-06-01 17:53:25 +00:00
uses : github/codeql-action/autobuild@v2
2021-10-25 20:05:12 +00:00
# ℹ ️ Command-line programs to run using the OS shell.
# 📚 https://git.io/JvXDl
2023-06-01 18:51:48 +00:00
# If the Autobuild fails above, remove it and uncomment the following three lines.
# modify them (or add more) to build your code if your project, please refer to the EXAMPLE below for guidance.
2021-10-25 20:05:12 +00:00
2023-06-01 18:51:48 +00:00
# - run: |
# echo "Run, Build Application using script"
# ./location_of_script_within_repo/buildscript.sh
2021-10-25 20:05:12 +00:00
- name : Perform CodeQL Analysis
2023-06-01 17:53:25 +00:00
uses : github/codeql-action/analyze@v2
2023-06-01 18:51:48 +00:00
with :
category : "/language:${{matrix.language}}"