andrewmusselman opened a new issue, #793: URL: https://github.com/apache/tooling-trusted-releases/issues/793
**ASVS:** 3.2.1 · **CWE:** CWE-1021 · **Files:** `atr/get/download.py` (lines 166–192), `atr/get/published.py` (lines 56–85) ### Description Directory listing endpoints generate HTML incorporating file and directory names. The global CSP provides good protection (`frame-src: 'none'`, `object-src: 'none'`), but does not include a `sandbox` directive, which ASVS 3.2.1 recommends for preventing script execution in dynamically served content. ### Recommended fix Consider adding a stricter CSP for directory listing responses: ```python response = web.ElementResponse(response_body) response.headers['Content-Security-Policy'] = "sandbox; default-src 'self'" return response ``` -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
