Skip to content

fix(http): apply SSRF guard to os.http.request - #46

Open
Bartok9 wants to merge 1 commit into
AtomicBot-ai:mainfrom
Bartok9:sera/http-request-ssrf
Open

fix(http): apply SSRF guard to os.http.request#46
Bartok9 wants to merge 1 commit into
AtomicBot-ai:mainfrom
Bartok9:sera/http-request-ssrf

Conversation

@Bartok9

@Bartok9 Bartok9 commented Jul 29, 2026

Copy link
Copy Markdown
Contributor

os.web.fetch blocked private/internal hosts; os.http.request did not, so model-controlled curl could reach metadata/LAN under the default-open allowlist. Apply the same SSRF guard, pin curl with --resolve, and re-check each redirect hop.

Closes #45

Tested: npx vitest run src/tools/os/http-request.test.ts src/tools/os/web-fetch-ssrf-guard.test.ts → 42 passed

Agent-Owner: sera


Agent-Owner: sera · Platform: hermes · Claim-TTL: 24h

Os.web.fetch already blocked private/internal addresses and pinned DNS;
os.http.request did not, so model-controlled curl could hit metadata/LAN
while web.fetch of the same URL failed. Share the guard, pin --resolve,
and re-validate each redirect hop.

Closes AtomicBot-ai#45

Signed-off-by: Bartok9 <danielrpike9@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

os.http.request bypasses SSRF guard that os.web.fetch enforces

1 participant