-
Notifications
You must be signed in to change notification settings - Fork 0
59 lines (51 loc) · 1.81 KB
/
Copy pathcodeql.yml
File metadata and controls
59 lines (51 loc) · 1.81 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
# GitHub CodeQL analysis.
#
# CodeQL is FREE for public repositories. On private repos it requires
# GitHub Advanced Security (~$49/user/month) — the `init` and `analyze`
# steps run fine but the SARIF upload step will fail with HTTP 403.
#
# This workflow is therefore gated to public repos only. When/if you flip
# crawlproof.com to public on GitHub, this job runs automatically on every
# PR with no further config needed.
#
# Until then, see .github/workflows/security.yml — Semgrep + npm audit +
# gitleaks cover the same surface for free on a private repo.
name: codeql
on:
pull_request:
branches: [master]
push:
branches: [master]
schedule:
- cron: "21 4 * * 1"
jobs:
analyze:
name: analyze (${{ matrix.language }})
# Auto-skips on private repos; CodeQL is free on public ones.
if: ${{ github.event.repository.visibility == 'public' }}
runs-on: ubuntu-latest
permissions:
actions: read
contents: read
security-events: write
strategy:
fail-fast: false
matrix:
# `javascript-typescript` analyzes .ts, .tsx, .js, .jsx with one DB.
language: [javascript-typescript]
steps:
- uses: actions/checkout@v4
- name: Initialize CodeQL
uses: github/codeql-action/init@v3
with:
languages: ${{ matrix.language }}
# 'security-and-quality' is the broadest preset — includes both
# security queries and code-quality queries (vs the default
# 'security-extended' which is security-only).
queries: security-and-quality
- name: Build (autobuild for JS/TS — no-op compile)
uses: github/codeql-action/autobuild@v3
- name: Perform CodeQL analysis
uses: github/codeql-action/analyze@v3
with:
category: "/language:${{ matrix.language }}"