You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Add support for OWASP ZAP reports with merged alerts
Change class ZapReader to cope with reports that contain merged alerts.
Since version 2.4.2 of OWASP ZAP it's possible to create reports where
alerts of same type are merged into one (which greatly reduce the size
of the report by removing duplicated information). One single alert can
have multiple URIs and its details (param, attack and evidence).
The XML structure of reports with merged alerts is changed from:
<alert>
<!-- other alert details (name, description, cweid...) -->
<uri />
<param />
<attack />
<evidence />
</alert>
to:
<alert>
<!-- other alert details (name, description, cweid...) -->
<instances>
<instance>
<uri />
<param />
<attack />
<evidence />
</instance>
<!-- more "instance" elements per merged alert -->
</instances>
</alert>
The class ZapReader now checks for the presence of "instances" element
in the alert, if it has it, it creates a TestCaseResult per "instance"
element otherwise it's created just one TestCaseResult, as before.
// <desc>Web Browser XSS Protection is not enabled, or is disabled by the configuration of the 'X-XSS-Protection' HTTP response header on the web server
// <!-- more "instance" elements per merged alert -->
91
+
// </instances>
92
+
86
93
// <otherinfo>The X-XSS-Protection HTTP response header allows the web server to enable or disable the web browser's XSS protection mechanism. The following values would attempt to enable it:
87
94
// <solution>Ensure that the web browser's XSS filter is enabled, by setting the X-XSS-Protection HTTP response header to '1'.
0 commit comments