2 files changed +22
-20
lines changed Original file line number Diff line number Diff line change @@ -18,7 +18,9 @@ const processSchema = Joi.object().keys({
18
18
} ) ;
19
19
20
20
const lineitemSchema = Joi . object ( ) . keys ( {
21
- type : Joi . string ( ) . required ( ) ,
21
+ type : Joi . string ( )
22
+ . required ( )
23
+ . valid ( "sast" , "sca" , "secret" ) ,
22
24
ruleId : Joi . string ( ) . required ( ) ,
23
25
location : Joi . object ( ) . keys ( {
24
26
path : Joi . string ( )
@@ -120,9 +122,9 @@ reportData.output.forEach(lineItem => {
120
122
}
121
123
} ) ;
122
124
let metadataSchema ;
123
- if ( lineItem . type == "issue " || lineItem . type == "secret" ) {
125
+ if ( lineItem . type == "sast " || lineItem . type == "secret" ) {
124
126
metadataSchema = metadataSchemaSAST ;
125
- } else if ( lineItem . type == "advisory " ) {
127
+ } else if ( lineItem . type == "sca " ) {
126
128
metadataSchema = metadataSchemaSCA ;
127
129
}
128
130
Original file line number Diff line number Diff line change 13
13
},
14
14
"output" : [
15
15
{
16
- "type" : " issue " ,
16
+ "type" : " sast " ,
17
17
"ruleId" : " 25" ,
18
18
"location" : {
19
19
"path" : " app/controllers/password_resets_controller.rb" ,
34
34
}
35
35
},
36
36
{
37
- "type" : " issue " ,
37
+ "type" : " sast " ,
38
38
"ruleId" : " 0" ,
39
39
"location" : {
40
40
"path" : " app/models/analytics.rb" ,
55
55
}
56
56
},
57
57
{
58
- "type" : " issue " ,
58
+ "type" : " sast " ,
59
59
"ruleId" : " 23" ,
60
60
"location" : {
61
61
"path" : " app/controllers/dashboard_controller.rb" ,
76
76
}
77
77
},
78
78
{
79
- "type" : " issue " ,
79
+ "type" : " sast " ,
80
80
"ruleId" : " 26" ,
81
81
"location" : {
82
82
"path" : " config/initializers/session_store.rb" ,
97
97
}
98
98
},
99
99
{
100
- "type" : " issue " ,
100
+ "type" : " sast " ,
101
101
"ruleId" : " 7" ,
102
102
"location" : {
103
103
"path" : " app/controllers/application_controller.rb" ,
118
118
}
119
119
},
120
120
{
121
- "type" : " issue " ,
121
+ "type" : " sast " ,
122
122
"ruleId" : " 29" ,
123
123
"location" : {
124
124
"path" : " config/initializers/secret_token.rb" ,
139
139
}
140
140
},
141
141
{
142
- "type" : " issue " ,
142
+ "type" : " sast " ,
143
143
"ruleId" : " 29" ,
144
144
"location" : {
145
145
"path" : " config/initializers/secret_token.rb" ,
160
160
}
161
161
},
162
162
{
163
- "type" : " issue " ,
163
+ "type" : " sast " ,
164
164
"ruleId" : " 24" ,
165
165
"location" : {
166
166
"path" : " app/controllers/api/v1/mobile_controller.rb" ,
181
181
}
182
182
},
183
183
{
184
- "type" : " issue " ,
184
+ "type" : " sast " ,
185
185
"ruleId" : " 105" ,
186
186
"location" : {
187
187
"path" : " app/controllers/users_controller.rb" ,
202
202
}
203
203
},
204
204
{
205
- "type" : " issue " ,
205
+ "type" : " sast " ,
206
206
"ruleId" : " 0" ,
207
207
"location" : {
208
208
"path" : " app/controllers/users_controller.rb" ,
223
223
}
224
224
},
225
225
{
226
- "type" : " issue " ,
226
+ "type" : " sast " ,
227
227
"ruleId" : " 70" ,
228
228
"location" : {
229
229
"path" : " app/controllers/users_controller.rb" ,
244
244
}
245
245
},
246
246
{
247
- "type" : " issue " ,
247
+ "type" : " sast " ,
248
248
"ruleId" : " 30" ,
249
249
"location" : {
250
250
"path" : " app/models/user.rb" ,
265
265
}
266
266
},
267
267
{
268
- "type" : " issue " ,
268
+ "type" : " sast " ,
269
269
"ruleId" : " 14" ,
270
270
"location" : {
271
271
"path" : " app/models/benefits.rb" ,
286
286
}
287
287
},
288
288
{
289
- "type" : " issue " ,
289
+ "type" : " sast " ,
290
290
"ruleId" : " 24" ,
291
291
"location" : {
292
292
"path" : " app/controllers/api/v1/mobile_controller.rb" ,
307
307
}
308
308
},
309
309
{
310
- "type" : " issue " ,
310
+ "type" : " sast " ,
311
311
"ruleId" : " 16" ,
312
312
"location" : {
313
313
"path" : " app/controllers/benefit_forms_controller.rb" ,
328
328
}
329
329
},
330
330
{
331
- "type" : " issue " ,
331
+ "type" : " sast " ,
332
332
"ruleId" : " 2" ,
333
333
"location" : {
334
334
"path" : " app/views/layouts/application.html.erb" ,
349
349
}
350
350
},
351
351
{
352
- "type" : " issue " ,
352
+ "type" : " sast " ,
353
353
"ruleId" : " 24" ,
354
354
"location" : {
355
355
"path" : " app/controllers/benefit_forms_controller.rb" ,
0 commit comments