open-swe/agent
open-swe[bot] a9331e78e6
fix: harden http_request SSRF guard against DNS rebinding [closes AB-2321] (#1277)
* fix: harden http_request SSRF guard against DNS rebinding [closes AB-2321]

Pin DNS resolution per request hop so urllib3's connection-time lookup
cannot rebind to a private IP after _is_url_safe validated a public one.

Co-authored-by: Johannes du Plessis <51395795+johannes117@users.noreply.github.com>

* fix: scope DNS pin to urllib3 with reference-counted install

Address review feedback: the previous version permanently overwrote the
process-global socket.getaddrinfo on first use. Now the patch targets
urllib3.util.connection.create_connection (much narrower blast radius),
and is installed/uninstalled via reference count so no global mutation
persists once no http_request calls are in flight.

Co-authored-by: Johannes du Plessis <51395795+johannes117@users.noreply.github.com>

* fix: forward timeout and socket_options through pinned create_connection

urllib3 calls create_connection with timeout positional and socket_options
as a keyword. The previous wrapper only read kwargs, silently dropping the
caller's connect timeout (so a slow validated IP could hang) and TCP
options like TCP_NODELAY. Accept both positionally and forward them to
the underlying socket.

---------

Co-authored-by: open-swe[bot] <open-swe@users.noreply.github.com>
Co-authored-by: Johannes du Plessis <51395795+johannes117@users.noreply.github.com>
Co-authored-by: Johannes du Plessis <johannes@langchain.dev>
2026-05-08 22:06:25 +00:00
..
integrations feat: add idle TTL and delete-after-stop sandbox lifecycle controls (#1265) 2026-05-08 00:30:14 -04:00
middleware fix Slack assistant status endpoint (#1272) 2026-05-08 13:07:32 -07:00
tools fix: harden http_request SSRF guard against DNS rebinding [closes AB-2321] (#1277) 2026-05-08 22:06:25 +00:00
utils slack: move feedback-reaction ask out of every reply, into the tip rotation (#1279) 2026-05-08 21:59:14 +00:00
encryption.py feat: support TOKEN_ENCRYPTION_KEY rotation via MultiFernet [closes AB-2323] (#1275) 2026-05-08 14:29:23 -07:00
prompt.py slack: move feedback-reaction ask out of every reply, into the tip rotation (#1279) 2026-05-08 21:59:14 +00:00
reviewer.py feat: add optional Slack Assistants API typing status indicator (#1269) 2026-05-08 10:21:55 -07:00
reviewer_diff.py fix(open-swe): surface reviewer diff-prep failures instead of swallowing (#1260) 2026-05-07 18:20:27 -07:00
reviewer_findings.py feat(open-swe): always anchor findings to a single line (#1264) 2026-05-07 20:26:59 -07:00
reviewer_publish.py fix(open-swe): host-format the review summary, drop agent prose (#1257) 2026-05-07 15:41:40 -07:00
server.py fix: recover from mid-run sandbox death (#1274) 2026-05-08 12:55:36 -07:00
webapp.py slack: slim down the trace reply (drop greeting, suppress unfurl) (#1278) 2026-05-08 14:51:28 -07:00