Skip to content

CodeQL

CodeQL #317

name: "CodeQL"
on:
push:
branches: [ main ]
schedule:
- cron: '0 07 * * 1'
jobs:
analyze:
name: Analyze
runs-on: ubuntu-latest
permissions:
security-events: write
strategy:
fail-fast: false
steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
persist-credentials: false
- uses: actions/setup-python@v5
with:
python-version: "3.11"
- name: Install poetry
uses: snok/install-poetry@v1
with:
virtualenvs-create: true
virtualenvs-in-project: true
- name: Load cached venv
uses: actions/cache@v4.1.2
id: cache-venv
with:
path: .venv
key: ${{ runner.os }}-${{ hashFiles('**/poetry.lock') }}-0
- name: Install dependencies
run: poetry install --no-interaction --no-root
if: steps.cache-venv.outputs.cache-hit != 'true'
- name: Initialize CodeQL
uses: github/codeql-action/init@v2
with:
setup-python-dependencies: false
languages: python
queries: +security-extended
- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v2