#18845: feat(config): add strictLoopback config option for Debug UI security
app: web-ui
gateway
size: M
Adds strictLoopback field to gateway config schema for hardening Control UI defaults. Part of PR #6590.
<!-- greptile_comment -->
<h3>Greptile Summary</h3>
Added `strictLoopback` config field to `GatewayControlUiConfig` type and Zod schema. However, the PR has critical issues:
- PR body describes an unrelated change (plugin precedence warnings) instead of the actual `strictLoopback` feature
- The new config field has no implementation - it's defined but never checked or enforced anywhere
- No tests added for the new config option
- Unclear interaction with existing `gateway.bind` config which already supports loopback-only binding
- Missing security audit integration (similar fields like `allowInsecureAuth` have audit checks in `src/security/audit.ts`)
The PR appears incomplete - it adds the schema definition but lacks the actual runtime enforcement logic that would make this security feature functional.
<h3>Confidence Score: 1/5</h3>
- This PR is incomplete and should not be merged in its current state
- The PR adds a security config option without any implementation. The `strictLoopback` field is defined in types but never used, meaning it has no effect. Additionally, the PR body describes a completely different feature, indicating significant confusion about what this PR is meant to do. The feature is non-functional and may give users a false sense of security.
- All files need attention: `PR_BODY.md` has wrong content, and the code changes are incomplete without implementation
<sub>Last reviewed commit: 8f43279</sub>
<!-- greptile_other_comments_section -->
<sub>(4/5) You can add custom instructions or style guidelines for the agent [here](https://app.greptile.com/review/github)!</sub>
<!-- /greptile_comment -->
Most Similar PRs
#6590: Harden Debug UI defaults: loopback-only binding + warnings
by dinakars777 · 2026-02-01
79.9%
#22227: fix(security): harden gateway auth — audit logging, pairing, mode v...
by novalis133 · 2026-02-20
74.4%
#12499: fix(config): add missing customBindHost to gateway Zod schema
by sfo2001 · 2026-02-09
73.2%
#21326: Security/UI: harden Control UI gatewayUrl URL overrides
by bmendonca3 · 2026-02-19
72.6%
#21186: fix(gateway): strict loopback guard for Control UI (v2)
by dinakars777 · 2026-02-19
72.0%
#21100: Security/Gateway: require explicit break-glass env for Control UI b...
by bmendonca3 · 2026-02-19
71.9%
#13960: fix(ui): preserve structured config validation error details
by constansino · 2026-02-11
71.8%
#23364: Gateway: add risk-ack interlock for dangerous Control UI flags
by bmendonca3 · 2026-02-22
71.3%
#23465: Gateway: strengthen Control UI security headers
by bmendonca3 · 2026-02-22
70.2%
#21741: fix(gateway): allow plaintext ws:// for Docker/private network addr...
by Joe3112 · 2026-02-20
70.1%