-
Notifications
You must be signed in to change notification settings - Fork 36
272 lines (229 loc) · 7.37 KB
/
repo_search.yml
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
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
name: SearchRepos
# Controls when the workflow will run
on:
schedule:
# * is a special character in YAML so you have to quote this string
- cron: '26 4/12 * * *'
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
jobs:
search:
name: Search
runs-on: ubuntu-latest
strategy:
max-parallel: 10
fail-fast: false
matrix:
search_str:
# comments indicate a snapshot of how many results there were
# for a given search around the time it was added to the list
# 106
- vuln poc
# 110
- heap overflow
# 119
- cnvd-c OR cnvd-2 OR cnnvd-2
# 126
- zeroday
# 191
- rce poc
# 219
- attack poc
# 2652
- metasploit module OR payload
# 279
- command injection
# 383
- 0day
# 441
- vulnerability poc
# 526
- remote code execution
# 960
- sploit
# 1114
- cve poc
# 2021
- shellcode
# 2267
- rce
# 4626
- cve-2 OR cve_2
# 18176
- exploit
# 17
- UEFI bootkit
# 313
- uac bypass
# 12
- secure boot bypass
# 35
- exploitation persistence
# # 2944
# - '"privilege escalation" OR privesc'
# # 1504
# - buffer overflow
# # 4383 (noisy)
# - zero-day
# # 21863 (very noisy)
# - 0-day
# # 502 (noisy)
# - 1day
steps:
- name: Get today and yesterday dates
id: date
run: |
echo "today=$(date +'%Y-%m-%d')" >> $GITHUB_OUTPUT
echo "yesterday=$(date -d yesterday '+%Y-%m-%d')" >> $GITHUB_OUTPUT
- name: checkout
uses: actions/checkout@v4
- name: setup python
uses: actions/setup-python@v5
with:
python-version: '3.9'
- name: setup env
uses: ./.github/actions/setup_my_env
- name: search github
uses: ./.github/actions/single_search
with:
start_date: ${{ steps.date.outputs.yesterday }}
end_date: ${{ steps.date.outputs.today }}
search_str: ${{ matrix.search_str }}
token: ${{ secrets.GITHUB_TOKEN }}
- name: add and commit
uses: ./.github/actions/commit_results
with:
commit_msg: Search for ${{ steps.date.outputs.yesterday }}..${{ steps.date.outputs.today }} ${{ matrix.search_str }}
- name: push results
uses: ./.github/actions/pull_rebase_push_retry
update_summaries:
name: Update Summaries
needs: search
runs-on: ubuntu-latest
steps:
- name: Get dates
id: date
run: |
echo "today=$(date +'%Y-%m-%d')" >> $GITHUB_OUTPUT
echo "yesterday=$(date -d yesterday '+%Y-%m-%d')" >> $GITHUB_OUTPUT
echo "this_month=$(date +'%Y-%m')" >> $GITHUB_OUTPUT
echo "this_year=$(date +'%Y')" >> $GITHUB_OUTPUT
- name: checkout
uses: actions/checkout@v4
with:
token: ${{ secrets.VUL_DRILLER_TOKEN }}
- name: setup python
uses: actions/setup-python@v5
with:
python-version: '3.9'
- name: setup env
uses: ./.github/actions/setup_my_env
- name: git pull
run: git pull
- name: summarize yesterday
uses: ./.github/actions/generate_summaries
with:
ymd_option: '--day'
ymd_value: ${{ steps.date.outputs.yesterday }}
- name: add and commit
uses: ./.github/actions/commit_results
with:
commit_msg: Update Summaries for day ${{ steps.date.outputs.yesterday }}
- name: summarize today
uses: ./.github/actions/generate_summaries
with:
ymd_option: '--day'
ymd_value: ${{ steps.date.outputs.today }}
- name: add and commit
uses: ./.github/actions/commit_results
with:
commit_msg: Update Summaries for day ${{ steps.date.outputs.today }}
- name: summarize this month
uses: ./.github/actions/generate_summaries
with:
ymd_option: '--month'
ymd_value: ${{ steps.date.outputs.this_month }}
- name: add and commit
uses: ./.github/actions/commit_results
with:
commit_msg: Update Summaries for month ${{ steps.date.outputs.this_month }}
- name: push results
uses: ./.github/actions/pull_rebase_push_retry
deep_dive:
name: Deep Dive
needs: update_summaries
runs-on: ubuntu-latest
strategy:
max-parallel: 11
fail-fast: false
matrix:
mod: [ 0, 1, 2, 3, 4, 5, 6, 7, 8, 9 ]
steps:
- name: Get dates
id: date
run: |
echo "today=$(date +'%Y-%m-%d')" >> $GITHUB_OUTPUT
echo "yesterday=$(date -d yesterday '+%Y-%m-%d')" >> $GITHUB_OUTPUT
echo "last_day=$(date -d yesterday +'%d')" >> $GITHUB_OUTPUT
echo "this_day=$(date +'%d')" >> $GITHUB_OUTPUT
echo "this_month=$(date +'%m')" >> $GITHUB_OUTPUT
echo "this_year=$(date +'%Y')" >> $GITHUB_OUTPUT
- name: checkout
uses: actions/checkout@v4
- name: setup python
uses: actions/setup-python@v5
with:
python-version: '3.9'
- name: setup env
uses: ./.github/actions/setup_my_env
# in case things have changed since we spawned
- name: git pull
run: git pull
- name: do_deep_dive
uses: ./.github/actions/deep_dive
with:
in_dir: results/${{ steps.date.outputs.this_year }}/${{ steps.date.outputs.this_month }}/${{ steps.date.outputs.last_day }}
mod: ${{ matrix.mod }}
divisor: ${{ 10 }}
token: ${{ secrets.VUL_DRILLER_TOKEN }}
max_age: 7200
- name: do_deep_dive
uses: ./.github/actions/deep_dive
with:
in_dir: results/${{ steps.date.outputs.this_year }}/${{ steps.date.outputs.this_month }}/${{ steps.date.outputs.this_day }}
mod: ${{ matrix.mod }}
divisor: ${{ 10 }}
token: ${{ secrets.VUL_DRILLER_TOKEN }}
max_age: 3600
- name: add and commit
uses: ./.github/actions/commit_results
with:
results_dir: data
commit_msg: Deep Dive for ${{ steps.date.outputs.yesterday }}..${{ steps.date.outputs.today }} chunk ${{ matrix.mod }}/10
- name: push result
uses: ./.github/actions/pull_rebase_push_retry
repo2vulid:
name: Repo to Vul IDs
needs: deep_dive
runs-on: ubuntu-latest
steps:
- name: checkout
uses: actions/checkout@v4
- name: setup python
uses: actions/setup-python@v5
with:
python-version: '3.9'
- name: setup env
uses: ./.github/actions/setup_my_env
# in case things have changed since we spawned
- name: git pull
run: git pull
- name: extract vul ids
run: repo_to_vul_id --verbose --input_dir data/repo_id
- name: add and commit
uses: ./.github/actions/commit_results
with:
results_dir: data/vul_id
commit_msg: Update vulnerability ID data
- name: push result
uses: ./.github/actions/pull_rebase_push_retry