andrewmusselman opened a new issue, #1359:
URL: https://github.com/apache/tooling-trusted-releases/issues/1359

   ### Summary
   
   `to_uri_list` in `atr/form.py` uses negative validation (rejects entries 
with no scheme) rather than a positive allowlist of permitted schemes. Values 
such as `javascript:` or `data:` satisfy the "has a scheme" check and pass 
validation.
   
   ### Details
   
   The current implementation rejects URIs that lack a scheme but does not 
restrict which schemes are permitted. Values such as `javascript:` or `data:` 
are accepted. No dangerous sink is present in the audited files, so this is a 
defense-in-depth deviation rather than a confirmed XSS vector.
   
   **Attacker capability required:** Authenticated committer submitting a form 
with a `URIList` field.
   
   **Affected files:**
   - `atr/form.py`
   
   **ASVS:** 1.2.2, 2.2.1 (L1)
   
   ### Remediation
   
   - Add a URL-scheme allowlist to `to_uri_list` (e.g., `http`, `https`, `git`, 
`git+ssh`, `git+https`, `ssh`, `svn`, `mailto`) rejecting disallowed or missing 
schemes.
   - Apply scheme filtering at every `href`/`src` emission point that consumes 
`URIList` values.
   
   ### Acceptance Criteria
   
   - [ ] Fixed
   - [ ] Test added — assert that `javascript:` and `data:` URIs are rejected; 
assert that permitted schemes are accepted
   
   ### References
   
   - ASVS 1.2.2, 2.2.1
   - Source reports: `1.2.2.md`, `2.2.1.md`


-- 
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]

Reply via email to