CodeQL Security Analysis #215
This file contains hidden or 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 Security Analysis' | |
| on: | |
| push: | |
| branches: [main] | |
| pull_request: | |
| branches: [main] | |
| schedule: | |
| # Run at 3 AM UTC every Monday | |
| - cron: '0 3 * * 1' | |
| permissions: | |
| actions: read | |
| contents: read | |
| security-events: write | |
| jobs: | |
| analyze: | |
| name: Analyze JavaScript/TypeScript | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 10 | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v4 | |
| - name: Initialize CodeQL | |
| uses: github/codeql-action/init@v3 | |
| with: | |
| languages: javascript | |
| # Disable default queries and use security-extended | |
| queries: security-extended | |
| # Scan all JS/TS files | |
| config: | | |
| paths: | |
| - src | |
| - lib | |
| - cli | |
| - task-lib | |
| paths-ignore: | |
| - node_modules | |
| - dist | |
| - coverage | |
| - '**/*.test.js' | |
| - '**/*.test.ts' | |
| - name: Setup Node.js | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: 22 | |
| cache: 'npm' | |
| - name: Install dependencies | |
| run: npm ci | |
| - name: Perform CodeQL Analysis | |
| uses: github/codeql-action/analyze@v3 | |
| with: | |
| category: '/language:javascript' |