name: "CodeQL"

on:
  push:
    branches: [ "main" ]
  pull_request:
    # The branches below must be a subset of the branches above
    branches: [ "main" ]
  schedule:
    - cron: '34 20 * * 1'

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

    strategy:
      fail-fast: false
      matrix:
        language: [ 'python' ]

    steps:
    - name: Checkout repository
      uses: actions/checkout@v3

    - name: Initialize CodeQL
      uses: github/codeql-action/init@v2
      with:
        languages: ${{ matrix.language }}
    - name: Autobuild
      uses: github/codeql-action/autobuild@v2

    - name: Perform CodeQL Analysis
      uses: github/codeql-action/analyze@v2

name: "CodeQL"

on:
  push:
    branches: [ "main" ]
  pull_request:
    # The branches below must be a subset of the branches above
    branches: [ "main" ]
  schedule:
    - cron: '34 20 * * 1'

permissions:  # added using https://github.com/step-security/secure-workflows
  contents: read

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

    strategy:
      fail-fast: false
      matrix:
        language: [ 'python' ]

    steps:
    - name: Harden Runner
      uses: step-security/harden-runner@dd2c410b088af7c0dc8046f3ac9a8f4148492a95
      with:
        egress-policy: audit # TODO: change to 'egress-policy: block' after couple of runs

    - name: Checkout repository
      uses: actions/checkout@d0651293c4a5a52e711f25b41b05b2212f385d28 # v3

    - name: Initialize CodeQL
      uses: github/codeql-action/init@28e9fd3ce77072419105df3fc2972846bf61ad6f # v2
      with:
        languages: ${{ matrix.language }}
    - name: Autobuild
      uses: github/codeql-action/autobuild@28e9fd3ce77072419105df3fc2972846bf61ad6f # v2

    - name: Perform CodeQL Analysis
      uses: github/codeql-action/analyze@28e9fd3ce77072419105df3fc2972846bf61ad6f # v2

Secure according to recommended StepSecuirty tool
Secure according to recommended StepSecuirty tool
