Class PolicyAnalyzerServiceImpl
- java.lang.Object
-
- io.openraven.magpie.core.cspm.services.PolicyAnalyzerServiceImpl
-
- All Implemented Interfaces:
PolicyAnalyzerService
public class PolicyAnalyzerServiceImpl extends Object implements PolicyAnalyzerService
-
-
Constructor Summary
Constructors Constructor Description PolicyAnalyzerServiceImpl()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ScanResultsanalyze(List<PolicyContext> policyContexts)Using the supplied List of Policies, execute each Policy's Rules (SQL query) against the database credentials provided in MagpieConfig.List<Map<String,Object>>evaluate(Rule rule, Object resultSet)protected voidexecuteRule(List<Violation> policyViolations, List<IgnoredRule> policyIgnoredRules, Policy policy, Rule rule)voidinit(MagpieConfig config)
-
-
-
Method Detail
-
init
public void init(MagpieConfig config)
- Specified by:
initin interfacePolicyAnalyzerService
-
analyze
public ScanResults analyze(List<PolicyContext> policyContexts)
Description copied from interface:PolicyAnalyzerServiceUsing the supplied List of Policies, execute each Policy's Rules (SQL query) against the database credentials provided in MagpieConfig. Each query is expected to return at a minimum a field named 'arn' for each row matched. If no rows are matched then no violation occured for that Rule.- Specified by:
analyzein interfacePolicyAnalyzerService- Parameters:
policyContexts- The List of PolicyContexts to match against.- Returns:
- A list of violations, or an empty list of none are found.
-
executeRule
protected void executeRule(List<Violation> policyViolations, List<IgnoredRule> policyIgnoredRules, Policy policy, Rule rule)
-
-