Skip to content

CodeQL

CodeQL #258

# 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: [ master ]
pull_request:
# The branches below must be a subset of the branches above
branches: [ master ]
schedule:
- cron: '17 4 * * 2'
workflow_dispatch:
jobs:
analyze:
name: Analyze
runs-on: [self-hosted, public, linux, x64]
permissions:
actions: read
contents: read
security-events: write
steps:
- name: Checkout repository
uses: actions/checkout@v2
- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: '3.10'
- name: Setup python for CodeQL
run: |
python -m pip install --upgrade pip pipenv
echo "CODEQL_PYTHON=$(which python)" >> $GITHUB_ENV
- name: Check Pipfile.lock changed
uses: tj-actions/[email protected]
id: changed_files
with:
files: Pipfile.lock
- name: Setup dependencies if they changed
if: steps.changed_files.outputs.files_changed == 'true'
run: |
pipenv lock -r > requirements.txt
pip install -r requirements.txt
- name: Initialize CodeQL
uses: github/codeql-action/init@v1
with:
languages: python
setup-python-dependencies: false
- name: Autobuild
uses: github/codeql-action/autobuild@v1
- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v1