forked from RaminNietzsche/CVE-Radar
-
Notifications
You must be signed in to change notification settings - Fork 0
126 lines (111 loc) · 3.89 KB
/
Copy pathsecurity-codeql.yml
File metadata and controls
126 lines (111 loc) · 3.89 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
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
# Category: Security | SAST — path filters on PRs; push/schedule run all languages (main baselines).
# PR path filters: run workflow_dispatch if required CodeQL jobs were skipped on docs-only PRs.
# Docs/test PRs: touch this file to satisfy required Analyze (actions) when workflows did not change.
# CI path-touch commits may also edit src/ for Analyze (javascript-typescript).
# Overview icons: extended-docs/hooks/asset_paths.py → /CVE-Radar/assets/ at build.
name: Security / CodeQL
on:
pull_request:
branches: [main]
push:
branches: [main]
schedule:
- cron: "30 1 * * 0"
workflow_dispatch:
permissions:
contents: read
security-events: write
actions: read
concurrency:
group: codeql-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true
jobs:
changes:
if: github.event_name != 'schedule'
runs-on: ubuntu-latest
outputs:
js: ${{ steps.filter.outputs.js }}
python: ${{ steps.filter.outputs.python }}
actions: ${{ steps.filter.outputs.actions }}
steps:
- uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6
- uses: dorny/paths-filter@6852f92c20ea7fd3b0c25de3b5112db3a98da050 # v3
id: filter
with:
filters: |
js:
- 'src/**'
- 'server/**'
- 'shared/**'
- 'tests/**'
- 'package.json'
- 'package-lock.json'
- 'tsconfig*.json'
python:
- 'extended-docs/**'
actions:
- '.github/workflows/*.yml'
- '.github/workflows/security/**'
analyze-js:
name: Analyze (javascript-typescript)
needs: changes
runs-on: ubuntu-latest
timeout-minutes: 30
if: |
always() && (
github.event_name == 'schedule' ||
github.event_name == 'workflow_dispatch' ||
github.event_name == 'push' ||
(needs.changes.result == 'success' && needs.changes.outputs.js == 'true')
)
steps:
- uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6
- uses: github/codeql-action/init@411bbbe57033eedfc1a82d68c01345aa96c737d7 # v4
with:
languages: javascript-typescript
build-mode: none
- uses: github/codeql-action/analyze@411bbbe57033eedfc1a82d68c01345aa96c737d7 # v4
with:
category: "/language:javascript-typescript"
analyze-python:
name: Analyze (python)
needs: changes
runs-on: ubuntu-latest
timeout-minutes: 30
if: |
always() && (
github.event_name == 'schedule' ||
github.event_name == 'workflow_dispatch' ||
github.event_name == 'push' ||
(needs.changes.result == 'success' && needs.changes.outputs.python == 'true')
)
steps:
- uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6
- uses: github/codeql-action/init@411bbbe57033eedfc1a82d68c01345aa96c737d7 # v4
with:
languages: python
build-mode: none
- uses: github/codeql-action/analyze@411bbbe57033eedfc1a82d68c01345aa96c737d7 # v4
with:
category: "/language:python"
analyze-actions:
name: Analyze (actions)
needs: changes
runs-on: ubuntu-latest
timeout-minutes: 30
if: |
always() && (
github.event_name == 'schedule' ||
github.event_name == 'workflow_dispatch' ||
github.event_name == 'push' ||
(needs.changes.result == 'success' && needs.changes.outputs.actions == 'true')
)
steps:
- uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6
- uses: github/codeql-action/init@411bbbe57033eedfc1a82d68c01345aa96c737d7 # v4
with:
languages: actions
build-mode: none
- uses: github/codeql-action/analyze@411bbbe57033eedfc1a82d68c01345aa96c737d7 # v4
with:
category: "/language:actions"