Skip to content

Commit 09ef3dd

Browse files
committed
Add missing rule_metadata to DetectionRule
Signed-off-by: ziad hany <ziadhany2016@gmail.com>
1 parent 340b29d commit 09ef3dd

1 file changed

Lines changed: 4 additions & 2 deletions

File tree

‎vulnerabilities/pipelines/v2_improvers/detection_rules.py‎

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ class DetectionRulesPipeline(VulnerableCodePipeline):
2525
"""
2626

2727
pipeline_id = "detection_rules"
28-
license_url = "https://github.com/ziadhany/detection-rules-collector/blob/master/LICENSE"
28+
license_url = "https://github.com/aboutcode-data/detection-rules-collector/blob/master/LICENSE"
2929
precedence = 200
3030

3131
@classmethod
@@ -81,11 +81,13 @@ def collect_detection_rules(self):
8181
self.log(f"No advisory found for aliases {vulnerability_id}")
8282

8383
raw_text = rule.get("rule_text")
84+
rule_metadata = rule.get("rule_metadata")
8485
detection_rule, _ = DetectionRule.objects.get_or_create(
8586
rule_text=raw_text,
86-
rule_type=rule_type,
8787
defaults={
8888
"source_url": source_url,
89+
"rule_type": rule_type,
90+
"rule_metadata": rule_metadata,
8991
},
9092
)
9193
if advisories:

0 commit comments

Comments
 (0)