CodeQL Analysis #9
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: "CodeQL Analysis" | |
on: | |
push: | |
branches: | |
- main | |
- "releases/**" # Customize as needed for your release branches | |
pull_request: | |
branches: | |
- main | |
schedule: | |
- cron: "0 2 * * 0" # Run a weekly scan every Sunday at 2:00 AM UTC | |
jobs: | |
analyze: | |
name: "Analyze" | |
permissions: | |
actions: read | |
contents: read | |
security-events: write # Required for uploading results to GitHub Security tab | |
runs-on: ubuntu-latest | |
strategy: | |
fail-fast: false | |
matrix: | |
language: ["javascript", "python"] # Add more languages if necessary | |
steps: | |
- name: "Checkout repository" | |
uses: actions/checkout@v3 | |
- name: "Initialize CodeQL" | |
uses: github/codeql-action/init@v3 | |
with: | |
languages: ${{ matrix.language }} | |
- name: "Set up Python" | |
uses: actions/setup-python@v4 | |
with: | |
python-version: '3.x' | |
- name: "Build backend code" | |
run: | | |
python -m pip install --upgrade pip | |
pip install poetry | |
cd backend | |
poetry install --no-root | |
cd .. | |
- name: "Set up Node.js" | |
uses: actions/setup-node@v3 | |
with: | |
node-version: '22.x' | |
- name: "Build frontend code" | |
run: | | |
cd frontend | |
npm install | |
cd .. | |
- name: "Perform CodeQL Analysis" | |
uses: github/codeql-action/analyze@v3 |