name: "CodeQL"

on:
  push:
    branches:
      - "master"
  pull_request:
    branches:
      - "master"
  schedule:
    - cron: '39 16 * * 5'

jobs:
  analyze:
    name: Analyze
    runs-on: ubuntu-latest
    timeout-minutes: 360
    permissions:
      actions: read
      contents: read
      security-events: write

    steps:
    - name: Checkout repository
      uses: actions/checkout@v6
      with:
        persist-credentials: false

    - name: Initialize CodeQL
      uses: github/codeql-action/init@v4
      with:
        languages: python

    - name: Perform CodeQL Analysis
      uses: github/codeql-action/analyze@v4
      with:
        category: "/language:python"
