<?xml version="1.0"?>
<OWASPZAPReport
	th:attr="programName=${programName}, version=${zapVersion}, generated=${generatedString}, created=${created}">
	<th:block th:each="site: ${reportData.sites}">
		<site th:name="${site}"
			th:attr="host=${helper.getHostForSite(site)}, port=${helper.getPortForSite(site)}, ssl=${helper.isSslSite(site)}">
			<alerts>
				<th:block
					th:each="alert: ${helper.getAlertsForSite(alertTree, site)}"
					th:with="instances=${helper.getAlertInstancesForSite(alertTree, site, alert.name, alert.risk)}">
					<alertitem>
						<pluginid th:text="${alert.pluginId}"></pluginid>
						<alertRef th:text="${alert.alertRef}"></alertRef>
						<alert th:text="${alert.name}"></alert>
						<name th:text="${alert.name}"></name>
						<riskcode th:text="${alert.risk}"></riskcode>
						<confidence th:text="${alert.confidence}"></confidence>
						<riskdesc
							th:text="${helper.getRiskString(alert.risk) + ' (' + helper.getConfidenceString(alert.confidence) + ')'}"></riskdesc>
						<confidencedesc
							th:text="${helper.getConfidenceString(alert.confidence)}"></confidencedesc>
						<desc th:text="${alert.description}"></desc>
						<instances>
							<th:block th:each="instance: ${instances}">
								<instance>
									<uri th:text="${instance.uri}"></uri>
									<nodeName th:text="${helper.getNodeName(instance)}"></nodeName>
									<method th:text="${instance.method}"></method>
									<param th:text="${instance.param}"></param>
									<attack th:text="${instance.attack}"></attack>
									<evidence th:text="${instance.evidence}"></evidence>
									<otherinfo th:text="${instance.otherinfo}"></otherinfo>
									<requestheader
										th:text="${instance.message.requestHeader}"></requestheader>
									<requestbody
										th:text="${instance.message.requestBody}"></requestbody>
									<responseheader
										th:text="${instance.message.responseHeader}"></responseheader>
									<responsebody
										th:text="${instance.message.responseBody}"></responsebody>
								</instance>
							</th:block>
						</instances>
						<count th:text="${instances.size()}"></count>
						<systemic th:text="${helper.isSystemic(alert)}"></systemic>
						<solution th:text="${alert.solution}"></solution>
						<otherinfo th:text="${alert.otherinfo}"></otherinfo>
						<reference th:text="${alert.reference}"></reference>
						<cweid th:text="${alert.cweid}"></cweid>
						<wascid th:text="${alert.wascid}"></wascid>
						<sourceid th:text="${alert.sourceHistoryId}"></sourceid>
						<tags>
							<th:block th:each="tag: ${alert.tags}">
								<tag>
									<tag th:text="${tag.key}"></tag>
									<link th:text="${tag.value}"></link>
								</tag>
							</th:block>
						</tags>
					</alertitem>
				</th:block>
			</alerts>
			<statistics>
				<th:block th:each="stat: ${helper.getSiteStats(site, '')}">
					<statistic>
						<key th:text="${stat.key}"></key>
						<value th:text="${stat.value}"></value>
					</statistic>
				</th:block>
			</statistics>
		</site>
	</th:block>
	<statistics>
		<th:block th:each="stat: ${helper.getGlobalStats('')}">
			<statistic>
				<key th:text="${stat.key}"></key>
				<value th:text="${stat.value}"></value>
			</statistic>
		</th:block>
	</statistics>
</OWASPZAPReport>