You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
A DNS-rebind attacker could slip past the web client's SSRF guard: the
pre-flight IP check and the actual TCP connect used **separate** DNS
lookups, so a host could answer the check with a public IP and the
connect with a private/internal one. This PR pins the resolved IP and
validates the exact address it dials through a single authority, closing
the window for both http and https (HTTPS cert-name verification still
binds to the real hostname; the SNI-vhosting trade-off is documented,
not silently accepted). It also removes three silent-fallback violations
that hid real failures, and adds tests to three high-risk modules that
had none.
Reviewer-relevant threads:
- **SSRF hardening** (`web/client.py`) — the security fix above; worth a
close read of `PinnedIPAdapter`.
- **Fail-loudly fixes** — corrupt memory-settings now logs instead of
reverting to defaults silently; Telegram background startup re-raises on
PID-write failure (a supervisor can no longer be fooled into thinking a
dead process started); a raising system-prompt fragment now logs instead
of vanishing from the prompt.
- **New coverage** — DockerAgent (subprocess/path-allowlist), the
home-dir discovery classifiers, and Jira JQL templating; the API
non-streaming completion happy-path is now tested with a mocked backend
instead of `@pytest.mark.skip`.
## Test plan
- [ ] `pytest tests/unit/agents/test_discovery.py
tests/unit/agents/test_docker_agent.py
tests/unit/agents/test_jql_templates.py
tests/unit/test_web_client_ip_pinning.py -q` — 100 pass
- [ ] `pytest tests/unit/test_web_client_edge_cases.py tests/test_rag.py
-q` — no regression (96 pass)
- [ ] `pytest tests/test_api.py -q` — completion happy-path now runs (no
longer skipped)
- [ ] `python util/lint.py --black --isort --flake8` — clean on changed
files
- [ ] Agent eval (running separately) confirms no regression from the
prompt-fragment logging change — the change is logging-only on the
exception branch, so the composed prompt is byte-identical on the happy
path
---------
Co-authored-by: Ovtcharov <kovtchar@amd.com>
0 commit comments