-
Notifications
You must be signed in to change notification settings - Fork 37
52 lines (46 loc) · 1.81 KB
/
codeql.yaml
File metadata and controls
52 lines (46 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
name: CodeQL
# Static security analysis (SAST) for the TypeScript sources. Surfaces
# command-injection / path-traversal / unsafe-shell patterns — the bug class the
# pre-tool-use VFS hooks deal in — as alerts in the repo's Security tab and as
# inline annotations on PRs. Findings do NOT fail the build by default; gate on
# them later via branch protection if desired.
on:
push:
branches: [main]
pull_request:
branches: [main]
schedule:
# Weekly full scan (Mondays 06:00 UTC) so new CodeQL queries catch latent
# issues even when the code itself hasn't changed.
- cron: "0 6 * * 1"
# Least privilege at the top; the analyze job adds only what it needs.
permissions:
contents: read
jobs:
analyze:
name: Analyze (javascript-typescript)
runs-on: ubuntu-latest
permissions:
contents: read
security-events: write # upload SARIF results to the Security tab
actions: read # required for CodeQL on private repos
steps:
- name: Checkout
uses: actions/checkout@v6.0.3
with:
# Read-only job: don't leave GITHUB_TOKEN in .git/config.
persist-credentials: false
- name: Initialize CodeQL
uses: github/codeql-action/init@v4.36.1
with:
languages: javascript-typescript
# `security-extended` adds the broader security query suite on top of
# the default — appropriate for a security-sensitive codebase. It only
# surfaces more alerts; it does not fail the run.
queries: security-extended
# No build step: CodeQL analyzes JS/TS source directly (no compilation
# needed), so we skip the autobuild/manual-build phase entirely.
- name: Analyze
uses: github/codeql-action/analyze@v4.36.1
with:
category: "/language:javascript-typescript"