🔒 Add CodeQL Security Scanning

 CodeQL Workflow:
- Automated JavaScript/TypeScript analysis
- Runs on push/PR to production branch
- Weekly scheduled scans
- Security events reporting

🔧 Features:
- Code vulnerability detection
- Dependency security scanning
- Integration with GitHub Security tab
- Professional security posture

🎯 Combined with existing Trivy scanning for comprehensive security coverage
This commit is contained in:
Dennis Konkol
2025-09-05 23:28:11 +00:00
parent bbbea4e8ba
commit 248580b533

46
.github/workflows/codeql.yml vendored Normal file
View File

@@ -0,0 +1,46 @@
name: "CodeQL"
on:
push:
branches: [ "production" ]
pull_request:
branches: [ "production" ]
schedule:
- cron: '0 0 * * 0' # Weekly scan
jobs:
analyze:
name: Analyze
runs-on: ubuntu-latest
permissions:
actions: read
contents: read
security-events: write
strategy:
fail-fast: false
matrix:
language: [ 'javascript' ]
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Initialize CodeQL
uses: github/codeql-action/init@v3
with:
languages: ${{ matrix.language }}
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: '20'
cache: 'npm'
- name: Install dependencies
run: npm ci
- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v3
with:
category: "/language:${{matrix.language}}"