Skip to content

fix(security): harden outbound fetch policy#43

Merged
chaliy merged 1 commit intomainfrom
fix/harden-fetchkit-egress
Mar 14, 2026
Merged

fix(security): harden outbound fetch policy#43
chaliy merged 1 commit intomainfrom
fix/harden-fetchkit-egress

Conversation

@chaliy
Copy link
Contributor

@chaliy chaliy commented Mar 14, 2026

What

Add a hardened outbound policy profile for fetchkit and document how to deploy it safely in cluster/data-plane environments.

Why

fetchkit should reject more unsafe outbound paths itself, not rely only on cluster networking. Ambient proxy env, internal DNS suffixes, nonstandard ports, and cross-host redirects all widened the fetch surface for shared deployments.

How

  • add builder options for ambient proxy suppression, host blocking, port allow-listing, and same-host redirect restrictions
  • add ToolBuilder::hardened() and expose it in CLI, MCP, and Python bindings
  • enforce the new checks before connect and on every redirect hop
  • add SSRF/security regression tests and CLI flag coverage
  • add user-facing hardening guidance and update specs/threat model/changelog

Risk

  • Medium
  • Hardened mode is intentionally stricter and may block deployments that depend on nonstandard ports, internal-looking public DNS names, cross-host redirects, or inherited proxy env

Checklist

  • Unit tests are passed
  • Smoke tests are passed
  • Documentation is updated
  • Specs are up to date and not in conflict
  • Security review completed for the changed fetch path

@chaliy chaliy force-pushed the fix/harden-fetchkit-egress branch from a3492cd to bca3e17 Compare March 14, 2026 01:24
@chaliy chaliy merged commit bf0be4d into main Mar 14, 2026
10 checks passed
@chaliy chaliy deleted the fix/harden-fetchkit-egress branch March 14, 2026 01:29
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.

1 participant