Skip to content

Commit c001c34

Browse files
committed
sigmaness
1 parent 0443038 commit c001c34

File tree

2 files changed

+55
-3
lines changed

2 files changed

+55
-3
lines changed

src/lib/project-fetcher-hoc.jsx

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -216,8 +216,17 @@ function protobufToJson(buffer) {
216216
newJson.monitors.push(newMonitor);
217217
}
218218

219+
for (const extensionData in json.antiSigmaExtensionData) {
220+
// "legacy" shit
221+
newJson.extensionData[extensionData] = json.antiSigmaExtensionData[extensionData];
222+
}
223+
219224
for (const extensionData in json.extensionData) {
220-
newJson.extensionData[extensionData] = json.extensionData[extensionData];
225+
if (json.extensionData[extensionData].parse) {
226+
newJson.extensionData[extensionData] = JSON.parse(json.extensionData[extensionData].data);
227+
} else {
228+
newJson.extensionData[extensionData] = json.extensionData[extensionData].data;
229+
}
221230
}
222231

223232
for (const extensionURL in json.extensionURLs) {

src/lib/project.protobuf.json

Lines changed: 45 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -223,6 +223,36 @@
223223
}
224224
}
225225
},
226+
"extensionData": {
227+
"oneofs": {
228+
"_data": {
229+
"oneof": [
230+
"data"
231+
]
232+
},
233+
"_parse": {
234+
"oneof": [
235+
"parse"
236+
]
237+
}
238+
},
239+
"fields": {
240+
"data": {
241+
"type": "string",
242+
"id": 1,
243+
"options": {
244+
"proto3_optional": true
245+
}
246+
},
247+
"parse": {
248+
"type": "bool",
249+
"id": 2,
250+
"options": {
251+
"proto3_optional": true
252+
}
253+
}
254+
}
255+
},
226256
"Project": {
227257
"oneofs": {
228258
"_metaSemver": {
@@ -273,11 +303,16 @@
273303
"type": "monitor",
274304
"id": 5
275305
},
276-
"extensionData": {
306+
"antiSigmaExtensionData": {
277307
"keyType": "string",
278308
"type": "string",
279309
"id": 6
280310
},
311+
"extensionData": {
312+
"keyType": "string",
313+
"type": "extensionData",
314+
"id": 10
315+
},
281316
"extensions": {
282317
"rule": "repeated",
283318
"type": "string",
@@ -586,6 +621,11 @@
586621
"mutation"
587622
]
588623
},
624+
"_is_variable_reporter": {
625+
"oneof": [
626+
"is_variable_reporter"
627+
]
628+
},
589629
"_varReporterBlock": {
590630
"oneof": [
591631
"varReporterBlock"
@@ -661,7 +701,10 @@
661701
},
662702
"is_variable_reporter": {
663703
"type": "bool",
664-
"id": 11
704+
"id": 11,
705+
"options": {
706+
"proto3_optional": true
707+
}
665708
},
666709
"varReporterBlock": {
667710
"type": "var_reporter_block",

0 commit comments

Comments
 (0)