-
Notifications
You must be signed in to change notification settings - Fork 8
67 lines (58 loc) · 1.85 KB
/
Copy pathcodeql.yml
File metadata and controls
67 lines (58 loc) · 1.85 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
65
66
67
# ===============================================================
# 🛡️ CodeQL Analysis
# ===============================================================
#
# - scans Python and JavaScript/TypeScript code for security issues
# - runs on pushes, PRs, and a weekly scheduled sweep
# - publishes results to GitHub code scanning
# ---------------------------------------------------------------
name: CodeQL Analysis
on:
push:
branches: ["main"]
paths:
- "src/**"
- "apps/**"
- ".github/workflows/codeql.yml"
pull_request:
types: [opened, synchronize, ready_for_review]
branches: ["main"]
paths:
- "src/**"
- "apps/**"
- ".github/workflows/codeql.yml"
schedule:
- cron: "23 4 * * 1"
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
permissions: {}
jobs:
analyze:
if: github.event_name != 'pull_request' || !github.event.pull_request.draft
name: codeql (${{ matrix.language }})
runs-on: ubuntu-latest
timeout-minutes: 20
permissions:
actions: read
contents: read
security-events: write
strategy:
fail-fast: false
matrix:
language: [python, javascript-typescript]
steps:
- name: ⬇️ Checkout code
uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4
with:
persist-credentials: false
- name: 🧰 Initialize CodeQL
uses: github/codeql-action/init@0daab03d71ff584ef619d027a3fd9146679c5d84 # v3
with:
languages: ${{ matrix.language }}
queries: security-extended,security-and-quality
config-file: .github/codeql-config.yml
- name: 🔎 Analyze
uses: github/codeql-action/analyze@0daab03d71ff584ef619d027a3fd9146679c5d84 # v3
with:
category: "/language:${{ matrix.language }}"