bunkerized-nginx/.github/workflows/codeql.yml

47 lines
1.8 KiB
YAML

name: CodeQL Analysis
on:
schedule:
# Weekly on Saturdays.
- cron: "30 1 * * 6"
workflow_call:
jobs:
code-security:
runs-on: ubuntu-latest
permissions:
actions: read
contents: read
security-events: write
strategy:
fail-fast: false
matrix:
language: ["python", "javascript"]
steps:
- name: Checkout repository
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
- name: Set up Python 3.9
uses: actions/setup-python@65d7f2d534ac1bc67fcd62888c5f4f3d2cb2b236 # v4.7.1
if: matrix.language == 'python'
with:
python-version: "3.9"
- name: Install python dependencies
if: matrix.language == 'python'
run: |
python -m pip install --no-cache-dir --ignore-installed --require-hashes -r src/deps/requirements.txt
python -m pip install --no-cache-dir --require-hashes -r src/scheduler/requirements.txt
python -m pip install --no-cache-dir --require-hashes -r src/ui/requirements.txt
python -m pip install --no-cache-dir --require-hashes -r src/common/gen/requirements.txt
python -m pip install --no-cache-dir --require-hashes -r src/common/db/requirements.txt
echo "CODEQL_PYTHON=$(which python)" >> $GITHUB_ENV
- name: Initialize CodeQL
uses: github/codeql-action/init@407ffafae6a767df3e0230c3df91b6443ae8df75 # v2.22.8
with:
languages: ${{ matrix.language }}
config-file: ./.github/codeql.yml
setup-python-dependencies: false
- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@407ffafae6a767df3e0230c3df91b6443ae8df75 # v2.22.8
with:
category: "/language:${{matrix.language}}"