← Back to PRs

#21305: Fix/proxy-ip-allow-list

by janaka open 2026-02-19 22:03 View on GitHub →
docs scripts docker size: S
## Summary Describe the problem and fix in 2–5 bullets: - Problem: - Why it matters: - What changed: - What did NOT change (scope boundary): ## Change Type (select all) - [ ] Bug fix - [ ] Feature - [ ] Refactor - [ ] Docs - [ ] Security hardening - [ ] Chore/infra ## Scope (select all touched areas) - [ ] Gateway / orchestration - [ ] Skills / tool execution - [ ] Auth / tokens - [ ] Memory / storage - [ ] Integrations - [ ] API / contracts - [ ] UI / DX - [ ] CI/CD / infra ## Linked Issue/PR - Closes # - Related # ## User-visible / Behavior Changes List user-visible changes (including defaults/config). If none, write `None`. ## Security Impact (required) - New permissions/capabilities? (`Yes/No`) - Secrets/tokens handling changed? (`Yes/No`) - New/changed network calls? (`Yes/No`) - Command/tool execution surface changed? (`Yes/No`) - Data access scope changed? (`Yes/No`) - If any `Yes`, explain risk + mitigation: ## Repro + Verification ### Environment - OS: - Runtime/container: - Model/provider: - Integration/channel (if any): - Relevant config (redacted): ### Steps 1. 2. 3. ### Expected - ### Actual - ## Evidence Attach at least one: - [ ] Failing test/log before + passing after - [ ] Trace/log snippets - [ ] Screenshot/recording - [ ] Perf numbers (if relevant) ## Human Verification (required) What you personally verified (not just CI), and how: - Verified scenarios: - Edge cases checked: - What you did **not** verify: ## Compatibility / Migration - Backward compatible? (`Yes/No`) - Config/env changes? (`Yes/No`) - Migration needed? (`Yes/No`) - If yes, exact upgrade steps: ## Failure Recovery (if this breaks) - How to disable/revert this change quickly: - Files/config to restore: - Known bad symptoms reviewers should watch for: ## Risks and Mitigations List only real risks for this PR. Add/remove entries as needed. If none, write `None`. - Risk: - Mitigation: <!-- greptile_comment --> <h3>Greptile Summary</h3> Adds Docker/EasyRunner deployment support with dynamic proxy IP resolution and auto-configuration via entrypoint script. Major changes include new `docker-entrypoint.sh` that resolves `OPENCLAW_TRUSTED_PROXY_HOST` to IP and updates config, comprehensive EasyRunner deployment docs, and Dockerfile updates for proper permissions. **Key Issues Found:** - CIDR notation in fallback `trustedProxies` config won't work - `isTrustedProxyAddress` (`src/gateway/net.ts:51-55`) only does exact IP matching, not CIDR range matching - Hardcoded gateway token committed in `.easyrunner/docker-compose-app.yaml` (should use placeholder) - Legacy `moltbot` naming used instead of `openclaw` in compose file **Positive Changes:** - Dynamic proxy IP resolution via `getent hosts` is a good approach for EasyRunner's container networking - Proper fallback when resolution fails - Good security practices (non-root user, proper permissions on extensions/docs dirs) <h3>Confidence Score: 2/5</h3> - Not safe to merge - contains a critical bug where CIDR notation won't work - Score reflects a critical logical error: the fallback `trustedProxies` config uses CIDR notation (`10.0.0.0/8`, etc.) but the implementation only supports exact IP matching. This means the proxy IP allow-list won't work as intended when `OPENCLAW_TRUSTED_PROXY_HOST` is not set, potentially breaking reverse proxy setups. Also includes hardcoded secrets and naming inconsistencies. - `scripts/docker-entrypoint.sh` needs CIDR notation removed or CIDR support added to `src/gateway/net.ts`. `.easyrunner/docker-compose-app.yaml` needs placeholder token and naming fixes. <sub>Last reviewed commit: 1b13eb1</sub> <!-- greptile_other_comments_section --> <sub>(2/5) Greptile learns from your feedback when you react with thumbs up/down!</sub> <!-- /greptile_comment -->

Most Similar PRs