File tree Expand file tree Collapse file tree
vulnerabilities/pipelines/v2_improvers Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -55,7 +55,10 @@ def collect_detection_rules(self):
5555 source_url = json_data .get ("source_url" )
5656 for rule in json_data .get ("rules" , []):
5757 vulns_id = rule .get ("vulnerabilities" , [])
58- advisories = build_alias_to_advisory_map (vulns_id )
58+ advisories_map = build_alias_to_advisory_map (vulns_id )
59+ advisory_instances = {
60+ advisory for adv_list in advisories_map .values () for advisory in adv_list
61+ }
5962
6063 raw_text = rule .get ("rule_text" )
6164 rule_metadata = rule .get ("rule_metadata" )
@@ -67,8 +70,9 @@ def collect_detection_rules(self):
6770 "rule_metadata" : rule_metadata ,
6871 },
6972 )
70- if advisories :
71- detection_rule .related_advisories .add (* advisories )
73+
74+ if advisory_instances :
75+ detection_rule .related_advisories .add (* advisory_instances )
7276
7377 def clean_downloads (self ):
7478 """Cleanup any temporary repository data."""
You can’t perform that action at this time.
0 commit comments