1
# For most projects, this workflow file will not need changing; you simply need
2
# to commit it to your repository.
4
# You may wish to alter this file to override the set of languages analyzed,
5
# or to provide custom queries or build logic.
7
# ******** NOTE ********
8
# We have attempted to detect the languages in your repository. Please check
9
# the `language` matrix defined below to confirm you have the correct set of
10
# supported CodeQL languages.
16
branches: [ "main", rel-* ]
18
# The branches below must be a subset of the branches above
19
branches: [ "main", rel-* ]
23
permissions: # set top-level default permissions as security best practice
27
group: ${{ github.workflow }}-${{ github.ref }}-${{ github.event_name == 'workflow_dispatch' }}
28
cancel-in-progress: true
33
runs-on: ubuntu-latest
37
security-events: write
42
language: [ 'cpp', 'python' ]
43
# CodeQL supports [ 'cpp', 'csharp', 'go', 'java', 'javascript', 'python', 'ruby' ]
44
# Learn more about CodeQL language support at https://aka.ms/codeql-docs/language-support
47
- name: Checkout repository
48
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
50
uses: actions/setup-python@82c7e631bb3cdc910f68e0081d67478d79c6982d # v5.1.0
52
python-version: '3.11'
53
- name: Install dependencies
55
python -m pip install --upgrade pip
57
# Initializes the CodeQL tools for scanning.
58
- name: Initialize CodeQL
59
uses: github/codeql-action/init@afb54ba388a7dca6ecae48f608c4ff05ff4cc77a # v3.25.15
61
languages: ${{ matrix.language }}
62
queries: security-extended,security-and-quality
63
# If you wish to specify custom queries, you can do so here or in a config file.
64
# By default, queries listed here will override any specified in a config file.
65
# Prefix the list here with "+" to use these queries and those in the config file.
67
# 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
68
config-file: ./.github/codeql/codeql-config.yml
70
# Install onnx so that it is found by the linters
73
source workflow_scripts/protobuf/build_protobuf_unix.sh $(nproc)
74
python -m pip install --quiet -r requirements-release.txt
75
git submodule update --init --recursive
79
# ℹ️ Command-line programs to run using the OS shell.
80
# 📚 See https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#jobsjob_idstepsrun
82
# If the Autobuild fails above, remove it and uncomment the following three lines.
83
# modify them (or add more) to build your code if your project, please refer to the EXAMPLE below for guidance.
86
# echo "Run, Build Application using script"
87
# ./location_of_script_within_repo/buildscript.sh
89
- name: Perform CodeQL Analysis
90
uses: github/codeql-action/analyze@afb54ba388a7dca6ecae48f608c4ff05ff4cc77a # v3.25.15
92
category: "/language:${{matrix.language}}"