File tree Expand file tree Collapse file tree 2 files changed +5
-1
lines changed Expand file tree Collapse file tree 2 files changed +5
-1
lines changed Original file line number Diff line number Diff line change @@ -255,6 +255,9 @@ def get_group_by_group_name(finding, finding_group_by_option):
255
255
group_name = f"Filepath { finding .file_path } "
256
256
elif finding_group_by_option == "finding_title" :
257
257
group_name = finding .title
258
+ elif finding_group_by_option == "vuln_id_from_tool" :
259
+ if finding .vuln_id_from_tool :
260
+ group_name = f"Vulnerability ID { finding .vuln_id_from_tool } " if finding .vuln_id_from_tool else "None"
258
261
else :
259
262
msg = f"Invalid group_by option { finding_group_by_option } "
260
263
raise ValueError (msg )
Original file line number Diff line number Diff line change @@ -3449,7 +3449,8 @@ class Finding_Group(TimeStampedModel):
3449
3449
GROUP_BY_OPTIONS = [("component_name" , "Component Name" ),
3450
3450
("component_name+component_version" , "Component Name + Version" ),
3451
3451
("file_path" , "File path" ),
3452
- ("finding_title" , "Finding Title" )]
3452
+ ("finding_title" , "Finding Title" ),
3453
+ ("vuln_id_from_tool" , "Vulnerability ID from Tool" )]
3453
3454
3454
3455
name = models .CharField (max_length = 255 , blank = False , null = False )
3455
3456
test = models .ForeignKey (Test , on_delete = models .CASCADE )
You can’t perform that action at this time.
0 commit comments