Labsco
appsec-innovation-labs logo

Secure Fetch

β˜… 3

from appsec-innovation-labs

Secure fetch to prevent access to local resources

πŸ”₯πŸ”₯πŸ”₯βœ“ VerifiedFreeQuick setup

Secure Fetch

This project implements a secure URL fetching tool using FastMCP.

Features

  • Fetches URLs securely
  • Resolves domains to IPs
  • Checks for private/internal IPs
  • Handles redirects (up to 3)
  • Supports custom HTTP methods and headers
  • Uses an allowlist for trusted domains/IPs

Security Considerations

  • The tool prevents access to private/internal IPs unless explicitly allowed
  • Only HTTP and HTTPS schemes are permitted
  • SNI is set to match the hostname for HTTPS connections

Note

This tool is designed for secure URL fetching. Always review and understand the code before using it in your environment.