-
Notifications
You must be signed in to change notification settings - Fork 1
64 lines (57 loc) · 2.09 KB
/
Copy pathcodeql.yml
File metadata and controls
64 lines (57 loc) · 2.09 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
60
61
62
63
64
# CodeQL Security Analysis
#
# Aligned with GitHub's canonical advanced-setup starter:
# refs/actions/starter-workflows/code-scanning/codeql.yml
# and the canonical advanced-setup how-to:
# refs/github/docs/.../configuring-advanced-setup-for-code-scanning.md L83
# ("analyze your code each time you either push a change to the
# default branch or any protected branches, or raise a pull request
# against the default branch").
#
# Original contribution by @4444J99 (PR #39); triggers + permissions
# tightened to the canonical starter shape; autobuild step removed
# because JavaScript/TypeScript is interpreted (no compile step).
name: 'CodeQL Security Analysis'
on:
push:
branches: [main]
pull_request:
branches: [main]
schedule:
# Weekly scan, Monday 06:00 UTC. Out-of-band catches issues that
# weren't surfaced by inline PR scans.
- cron: '0 6 * * 1'
# Permissions matched to the canonical starter (L31-40):
# security-events: write required to upload SARIF results
# packages: read required to fetch internal/private CodeQL packs
# actions: read required for workflows in private repos
# contents: read required for checkout
permissions:
security-events: write
packages: read
actions: read
contents: read
jobs:
analyze:
name: Analyze (${{ matrix.language }})
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
language: ['javascript-typescript']
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Initialize CodeQL
uses: github/codeql-action/init@v4
with:
languages: ${{ matrix.language }}
# security-and-quality query suite per @4444J99's original
# PR #39 intent: OWASP Top 10 + CWE coverage + code-quality
# checks. Stricter than the default suite; trade-off is
# slightly more false-positive volume.
queries: security-and-quality
- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v4
with:
category: '/language:${{ matrix.language }}'