-
Notifications
You must be signed in to change notification settings - Fork 2
feat: add localhost keyword for playwright testing #427
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
- Automatically maps 'localhost' to 'host.docker.internal' - Enables host access when localhost is specified - Configures common development ports (3000, 4200, 5173, 8080, etc.) - Supports protocol prefixes (http://localhost, https://localhost) - Preserves user-specified --allow-host-ports if provided - Add comprehensive integration tests for localhost functionality Co-authored-by: Mossaka <5447827+Mossaka@users.noreply.github.com>
- Add localhost keyword section to AGENTS.md - Add Playwright testing examples to README.md - Add comprehensive guide to docs/usage.md - Create dedicated Playwright testing guide in docs-site - Explain automatic configuration and security considerations Co-authored-by: Mossaka <5447827+Mossaka@users.noreply.github.com>
Add localhost to --allow-domains help text explaining it auto-configures for local testing Co-authored-by: Mossaka <5447827+Mossaka@users.noreply.github.com>
|
🎬 THE END — Smoke Claude MISSION: ACCOMPLISHED! The hero saves the day! ✨ |
|
📰 VERDICT: Smoke Copilot has concluded. All systems operational. This is a developing story. 🎤 |
|
| Metric | Base | PR | Delta |
|---|---|---|---|
| Lines | 77.98% | 77.23% | 📉 -0.75% |
| Statements | 78.05% | 77.32% | 📉 -0.73% |
| Functions | 77.77% | 77.36% | 📉 -0.41% |
| Branches | 71.70% | 70.64% | 📉 -1.06% |
📁 Per-file Coverage Changes (1 files)
| File | Lines (Before → After) | Statements (Before → After) |
|---|---|---|
src/cli.ts |
40.1% → 37.8% (-2.24%) | 40.3% → 38.0% (-2.24%) |
Coverage comparison generated by scripts/ci/compare-coverage.ts
Smoke Test ResultsLast 2 merged PRs:
✅ GitHub MCP Status: PASS cc @Copilot @Mossaka
|
|
Smoke Test Results (Claude Engine) GitHub MCP:
Tests: Status: PASS
|
Security Review: Localhost Keyword FeatureI've reviewed PR #427 for security implications. The implementation is generally sound with proper validation, but I found one security concern that should be addressed before merge. 🔴 Security Issue: Port 8888 in Default Port ListFile: Issue: The default localhost port list includes port 8888, which is commonly used by Jupyter Notebook/JupyterLab servers: options.allowHostPorts = '3000,3001,4000,4200,5000,5173,8000,8080,8081,8888,9000,9090';Security Risk:
Recommendation:
Suggested fix: // Remove 8888 from this line:
options.allowHostPorts = '3000,3001,4000,4200,5000,5173,8000,8080,8081,9000,9090';Users who genuinely need Jupyter access can explicitly specify ✅ Security Aspects That Are Safe
VerdictConditional approval - Safe to merge after removing port 8888 from the default list. All other aspects of the implementation maintain the firewall's security posture.
|
Playwright tests against local dev servers required manual configuration of host access, domain mapping, and port allowlists. The
localhostkeyword now auto-configures this setup.Changes
CLI Enhancement (
src/cli.ts)localhostin--allow-domainsautomatically:host.docker.internal(preserves http:// / https:// prefixes)--enable-host-access--allow-host-portsstill respectedContainer Fix (
containers/agent/setup-iptables.sh)multiportmodule from port range rules (not supported by iptables DNAT)Testing (
tests/integration/localhost-access.test.ts)Documentation
Usage
Security warnings maintained for host access. Custom port lists still supported via
--allow-host-ports.Original prompt
💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.