MCPcopy
hub / github.com/zaproxy/zaproxy / match_alerts

Function match_alerts

python/scripts/generic-pytest/test_zap.py:57–68  ·  view source on GitHub ↗
(alert, pattern)

Source from the content-addressed store, hash-verified

55 return True # No such pattern matches all
56
57def match_alerts (alert, pattern):
58 if ( not match_alert_pattern (alert, pattern, "alert")):
59 return False
60 if ( not match_alert_pattern (alert, pattern, "url")):
61 return False
62 if ( not match_alert_pattern (alert, pattern, "reliability")):
63 return False
64 if ( not match_alert_pattern (alert, pattern, "risk")):
65 return False
66 if ( not match_alert_pattern (alert, pattern, "param")):
67 return False
68 return True
69
70# Returns a list of the alerts which dont match the 'ignoreAlerts' - a dictionary of regex patterns
71def strip_alerts (alerts, ignoreAlerts):

Callers 2

strip_alertsFunction · 0.85
test_zapFunction · 0.85

Calls 1

match_alert_patternFunction · 0.85

Tested by

no test coverage detected