File size: 336 Bytes
8117458
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
import json
from analyzers.rule_matcher import match_rule

def static_scan(rules):
    all_findings = []

    for rule in rules["rules"]:
        result = match_rule(rule)
        all_findings.extend(result)

    with open("artifacts/rule_findings.json", "w") as f:
        json.dump(all_findings, f, indent=2)

    return all_findings