Files
goodgo-platform/.github/workflows/codeql.yml
Ho Ngoc Hai 92e708f17f fix(ci): target master branch in security.yml and codeql.yml
Both workflow files referenced 'main' branch for push/PR triggers, but
the repo default branch is 'master'. This caused security scanning and
CodeQL analysis to never trigger on pushes to the default branch.

Co-Authored-By: Paperclip <noreply@paperclip.ing>
2026-04-15 09:39:11 +07:00

62 lines
1.4 KiB
YAML

name: CodeQL Analysis
on:
push:
branches: [master]
pull_request:
branches: [master]
schedule:
# Run weekly on Monday at 06:17 UTC — off-peak to avoid :00/:30 congestion
- cron: "17 6 * * 1"
concurrency:
group: codeql-${{ github.ref }}
cancel-in-progress: true
permissions:
actions: read
contents: read
security-events: write
jobs:
analyze:
name: CodeQL (${{ matrix.language }})
runs-on: ubuntu-latest
timeout-minutes: 30
strategy:
fail-fast: false
matrix:
language: [javascript-typescript]
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Initialize CodeQL
uses: github/codeql-action/init@v3
with:
languages: ${{ matrix.language }}
# Use extended security queries for deeper analysis
queries: security-extended,security-and-quality
config: |
paths:
- apps/
- libs/
paths-ignore:
- node_modules/
- "**/dist/"
- "**/*.spec.ts"
- "**/*.test.ts"
- "**/__tests__/"
- name: Autobuild
uses: github/codeql-action/autobuild@v3
- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v3
with:
category: "/language:${{ matrix.language }}"
# SARIF results are automatically uploaded to GitHub Security tab
upload: always