From 20480c496481938dab5acd1e70e23988e045fe48 Mon Sep 17 00:00:00 2001 From: Cita Date: Sun, 15 Mar 2026 16:55:04 +0800 Subject: [PATCH] ci: add codeql scanning workflow (#108) --- .github/workflows/codeql.yml | 56 ++++++++++++++++++++++++++++++++++++ 1 file changed, 56 insertions(+) create mode 100644 .github/workflows/codeql.yml diff --git a/.github/workflows/codeql.yml b/.github/workflows/codeql.yml new file mode 100644 index 0000000..fba8f38 --- /dev/null +++ b/.github/workflows/codeql.yml @@ -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 }}