andrewmusselman opened a new issue, #704:
URL: https://github.com/apache/tooling-trusted-releases/issues/704
**ASVS:** 15.2.1 · Finding 2.5
**Severity:** MEDIUM
**CWE:** CWE-494 (Download of Code Without Integrity Check)
### Description
In `atr/tasks/checks/rat.py` (lines 258–296), the Apache RAT JAR file is
loaded from multiple potential paths with only existence checks — no
cryptographic integrity verification:
```python
def _synchronous_check_jar_exists(rat_jar_path: str) -> tuple[str,
checkdata.Rat | None]:
if not os.path.exists(rat_jar_path):
alternative_paths = [...]
for alt_path in alternative_paths:
if os.path.exists(alt_path): # Only checks existence, not
integrity
rat_jar_path = alt_path
break
```
### Recommendation
Add SHA-256 verification against known checksums:
```python
KNOWN_RAT_CHECKSUMS = {
"apache-rat-0.16.1.jar": "expected_sha256_hash_here",
}
```
--
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]