Skip to content

Add CodeQL analysis

Add CodeQL analysis #3

Workflow file for this run

name: CodeQL (JS/TS)
on:
push:
branches: ["main"]
pull_request:
branches: ["main"]
schedule:
- cron: "0 3 * * 1"
jobs:
analyze-jsts:
name: Analyze JavaScript/TypeScript
runs-on: ubuntu-latest
permissions:
security-events: write
actions: read
contents: read
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup Node
uses: actions/setup-node@v4
with:
node-version: "20"
- name: Install dependencies
run: |
if [ -f package-lock.json ]; then
npm ci
elif [ -f yarn.lock ]; then
corepack enable
yarn install --frozen-lockfile
elif [ -f pnpm-lock.yaml ]; then
corepack enable
pnpm install --frozen-lockfile
else
npm install
fi
- name: Initialize CodeQL
uses: github/codeql-action/init@v3
with:
languages: javascript-typescript
config-file: ./.github/codeql/codeql-config.yml
queries: security-extended
- name: Autobuild
uses: github/codeql-action/autobuild@v3
- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v3
with:
category: "/language:javascript-typescript"