Hello,
Have an application running on Elastic Beanstalk on AWS and the OWASP ZAP running as a containerized application on EC2 and running into an issue which seems like a bug after reviewing the code.
- Application running on EB using the default nginx configuration with custom override for nginx configuration exclusion with server_tokens off;
- OWASP ZAP scan reports Cloud Metadata Potentially Exposed on the initial scan with error code of 90034 and riskdesc of High (Low).
Remediation:
- Updated nginx config to respond with 401 when the request matches the path of /latest/meta-data
- Validated the response header as the following with the associated response:
- Header:
HTTP/1.1 401 Unauthorized
Date: Wed, 01 Mar 2023 21:34:41 GMT
Content-Type: text/html
Content-Length: 172
Connection: keep-alive
Server: nginx
- Response
<html>
<head><title>401 Authorization Required</title></head>
<body>
<center><h1>401 Authorization Required</h1></center>
<hr><center>nginx</center>
</body>
</html>
- Ran the scan again with the same error
Code:
Per the code for ascan rules and the
linked code this should come back as negative after the change described above based on the status code.
Request:
Can someone please review and provide some guidance on what version of the zap-extensions is bundled with the owasp/zap2docker-stable and if there is an active bug on this issue or if a new one needs to be filed ?
Thanks