fix(gitea): allow opted-in private network access - #253
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (5)
Summary by CodeRabbit
WalkthroughGitea now supports opt-in access to private and overlay network targets. URL validation uses Sequence Diagram(s)sequenceDiagram
participant Client
participant GiteaExecutors
participant createProviderFetch
participant GiteaServer
Client->>GiteaExecutors: validate credentials or execute request
GiteaExecutors->>createProviderFetch: apply private-network policy
createProviderFetch->>GiteaServer: send guarded request
GiteaServer-->>GiteaExecutors: return response
GiteaExecutors-->>Client: return validation or execution result
Possibly related PRs
🚥 Pre-merge checks | ✅ 4✅ Passed checks (4 passed)
✨ Finishing Touches✨ Simplify code
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Summary
OOMOL_CONNECT_ALLOW_PRIVATE_NETWORKopt-inWhy
Gitea is commonly self-hosted on a LAN or an overlay network such as Tailscale.
Before this change, setting:
did not affect the Gitea provider. Its base URL validation and request paths remained public-only, so instance URLs such as
http://192.168.1.10:3000or hostnames resolving to private addresses were still rejected.This change applies the existing deployment-level opt-in consistently across:
Security behavior
The default behavior is unchanged: private and plain HTTP targets remain blocked unless the deployment explicitly enables private-network access.
When enabled:
Private targets are only reachable from runtimes with network access to them, such as Node/Docker deployments. Enabling the flag does not make private addresses reachable from Cloudflare Workers.
Validation
npm run fix-checknpx vitest run src/providers/gitea/runtime.test.ts src/providers/gitea/executors.test.ts