adding back in rules
This commit is contained in:
@@ -43,24 +43,24 @@ def build_rules_engine() -> RuleEngine:
|
|||||||
function=FunctionRuleAdapter(form_action_missing, category="form", adapter=adapter, rule_name="form_action_missing"),
|
function=FunctionRuleAdapter(form_action_missing, category="form", adapter=adapter, rule_name="form_action_missing"),
|
||||||
))
|
))
|
||||||
|
|
||||||
# add(Rule(
|
add(Rule(
|
||||||
# name="form_http_on_https_page",
|
name="form_http_on_https_page",
|
||||||
# description="Form submits via HTTP from HTTPS page",
|
description="Form submits via HTTP from HTTPS page",
|
||||||
# category="form",
|
category="form",
|
||||||
# rule_type="function",
|
rule_type="function",
|
||||||
# function=FunctionRuleAdapter(form_http_on_https_page, category="form", adapter=adapter, rule_name="form_http_on_https_page"),
|
function=FunctionRuleAdapter(form_http_on_https_page, category="form", adapter=adapter, rule_name="form_http_on_https_page"),
|
||||||
# ))
|
))
|
||||||
|
|
||||||
# add(Rule("form_http_on_https_page", "Form submits via HTTP from HTTPS page", "form", "function",
|
add(Rule("form_http_on_https_page", "Form submits via HTTP from HTTPS page", "form", "function",
|
||||||
# FunctionRuleAdapter(form_http_on_https_page, category="form", adapter=adapter, rule_name="form_http_on_https_page")))
|
FunctionRuleAdapter(form_http_on_https_page, category="form", adapter=adapter, rule_name="form_http_on_https_page")))
|
||||||
# add(Rule("form_submits_to_different_host", "Form submits to a different host", "form", "function",
|
add(Rule("form_submits_to_different_host", "Form submits to a different host", "form", "function",
|
||||||
# FunctionRuleAdapter(form_submits_to_different_host, category="form", adapter=adapter, rule_name="form_submits_to_different_host")))
|
FunctionRuleAdapter(form_submits_to_different_host, category="form", adapter=adapter, rule_name="form_submits_to_different_host")))
|
||||||
# add(Rule("script_src_uses_data_or_blob", "Script src uses data:/blob: URL", "script", "function",
|
add(Rule("script_src_uses_data_or_blob", "Script src uses data:/blob: URL", "script", "function",
|
||||||
# FunctionRuleAdapter(script_src_uses_data_or_blob, category="script", adapter=adapter, rule_name="script_src_uses_data_or_blob")))
|
FunctionRuleAdapter(script_src_uses_data_or_blob, category="script", adapter=adapter, rule_name="script_src_uses_data_or_blob")))
|
||||||
# add(Rule("script_src_has_dangerous_extension", "External script with dangerous extension", "script", "function",
|
add(Rule("script_src_has_dangerous_extension", "External script with dangerous extension", "script", "function",
|
||||||
# FunctionRuleAdapter(script_src_has_dangerous_extension, category="script", adapter=adapter, rule_name="script_src_has_dangerous_extension")))
|
FunctionRuleAdapter(script_src_has_dangerous_extension, category="script", adapter=adapter, rule_name="script_src_has_dangerous_extension")))
|
||||||
# add(Rule("script_third_party_host", "Script is from a third-party host", "script", "function",
|
add(Rule("script_third_party_host", "Script is from a third-party host", "script", "function",
|
||||||
# FunctionRuleAdapter(script_third_party_host, category="script", adapter=adapter, rule_name="script_third_party_host")))
|
FunctionRuleAdapter(script_third_party_host, category="script", adapter=adapter, rule_name="script_third_party_host")))
|
||||||
|
|
||||||
log.info("Registered %d total rules (YAML + function)", len(eng.rules))
|
log.info("Registered %d total rules (YAML + function)", len(eng.rules))
|
||||||
return eng
|
return eng
|
||||||
|
|||||||
Reference in New Issue
Block a user