From security review on PR #121 (finding #3 MINOR):
SSRF risk: Allowing inputs.gitea-url and action-repo to control request destinations without validation enables server-side requests to arbitrary/internal addresses from the runner environment. Even without tokens, this can be abused on self-hosted runners to access internal services.
Token exfiltration is prevented (GitHub path ignores user URLs entirely)
What remains
DNS resolution + IP validation to block private/link-local/loopback addresses
Preventing DNS rebinding attacks
Blocking non-standard ports
Preventing redirects to untrusted hosts
Challenge
These defenses are complex in pure bash. Options:
Add a Go helper binary (review-bot validate-url) that performs DNS resolution and IP checks
Use dig/getent hosts + IP range checks in bash (fragile, platform-dependent)
Accept the residual risk with documentation (Gitea tokens are the user's own; the attack requires controlling workflow inputs on their own runner)
Acceptance Criteria
Decide on approach
Implement URL validation that blocks requests to RFC1918/loopback/link-local IPs
Block HTTP redirects to non-https or different hosts
Add tests
## Context
From security review on PR #121 (finding #3 MINOR):
> SSRF risk: Allowing inputs.gitea-url and action-repo to control request destinations without validation enables server-side requests to arbitrary/internal addresses from the runner environment. Even without tokens, this can be abused on self-hosted runners to access internal services.
## Current State (after PR #121 fix)
- URL scheme is validated (https:// only)
- Whitespace/newlines are rejected
- Token exfiltration is prevented (GitHub path ignores user URLs entirely)
## What remains
- DNS resolution + IP validation to block private/link-local/loopback addresses
- Preventing DNS rebinding attacks
- Blocking non-standard ports
- Preventing redirects to untrusted hosts
## Challenge
These defenses are complex in pure bash. Options:
1. Add a Go helper binary (`review-bot validate-url`) that performs DNS resolution and IP checks
2. Use `dig`/`getent hosts` + IP range checks in bash (fragile, platform-dependent)
3. Accept the residual risk with documentation (Gitea tokens are the user's own; the attack requires controlling workflow inputs on their own runner)
## Acceptance Criteria
- [ ] Decide on approach
- [ ] Implement URL validation that blocks requests to RFC1918/loopback/link-local IPs
- [ ] Block HTTP redirects to non-https or different hosts
- [ ] Add tests
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
Context
From security review on PR #121 (finding #3 MINOR):
Current State (after PR #121 fix)
What remains
Challenge
These defenses are complex in pure bash. Options:
review-bot validate-url) that performs DNS resolution and IP checksdig/getent hosts+ IP range checks in bash (fragile, platform-dependent)Acceptance Criteria