ci: add codeql scanning workflow (#108)

This commit is contained in:
Cita
2026-03-15 16:55:04 +08:00
committed by GitHub
parent cc04466cad
commit 20480c4964
+56
View File
@@ -0,0 +1,56 @@
name: CodeQL
on:
push:
branches: [main, master]
paths-ignore:
- 'docs/**'
- 'README.md'
- 'README_EN.md'
- 'CONTRIBUTING.md'
- 'SECURITY.md'
- 'CODE_OF_CONDUCT.md'
pull_request:
paths-ignore:
- 'docs/**'
- 'README.md'
- 'README_EN.md'
- 'CONTRIBUTING.md'
- 'SECURITY.md'
- 'CODE_OF_CONDUCT.md'
schedule:
- cron: '19 18 * * 0'
permissions:
actions: read
contents: read
security-events: write
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true
jobs:
analyze:
name: Analyze (JavaScript/TypeScript)
runs-on: ubuntu-latest
timeout-minutes: 30
strategy:
fail-fast: false
matrix:
language: ['javascript-typescript']
steps:
- name: Checkout
uses: actions/checkout@v6
- name: Initialize CodeQL
uses: github/codeql-action/init@v4
with:
languages: ${{ matrix.language }}
build-mode: none
- name: Analyze
uses: github/codeql-action/analyze@v4
with:
category: /language:${{ matrix.language }}