Weave Code
Code Weaver
Helps Laravel developers discover, compare, and choose open-source packages. See popularity, security, maintainers, and scores at a glance to make better decisions.
Feedback
Share your thoughts, report bugs, or suggest improvements.
Subject
Message

Httplug Ssrf Plugin Laravel Package

j0k3r/httplug-ssrf-plugin

HTTPlug plugin to mitigate SSRF by validating URL parts against configurable allow/deny lists. Resolves hostnames to IPs, blocks private networks by default, and restricts schemes to HTTP/HTTPS. Throws InvalidURLException on invalid targets.

View on GitHub
Deep Wiki
Context7

Product Decisions This Supports

  • Security Hardening: Integrate SSRF protection into API gateways, microservices, or backend systems to mitigate a critical attack vector (CWE-918). Reduces risk of internal network exposure via malicious payloads.
  • Compliance Alignment: Meets requirements for PCI-DSS, HIPAA, or GDPR by enforcing strict request validation (e.g., blocking localhost, private IPs, or internal domains).
  • Build vs. Buy: Avoids reinventing SSRF detection logic (e.g., regex, IP whitelisting, or URL parsing) while maintaining flexibility for custom rules.
  • Roadmap Prioritization: Justifies investment in PHP-based systems (e.g., legacy monoliths, Laravel APIs) where HTTPlug is already used for HTTP clients.
  • Use Cases:
    • API Gateways: Protect downstream services from SSRF in user-submitted requests (e.g., image uploads, proxy endpoints).
    • Scraping Services: Block unintended internal network access when processing external URLs.
    • CI/CD Pipelines: Secure build systems that fetch dependencies or assets from untrusted sources.

When to Consider This Package

Adopt if:

  • Your PHP stack uses HTTPlug (e.g., httplug/httplug, php-http/client) for HTTP requests.
  • You handle user-controlled URLs (e.g., file uploads, webhooks, proxies) and need SSRF safeguards.
  • Your security posture requires automated validation of outbound requests (e.g., blocking 127.0.0.1, 169.254.169.254, or internal DNS names).
  • You prefer MIT-licensed, lightweight solutions over enterprise-grade WAFs (e.g., Cloudflare, AWS WAF) for internal systems.

Look elsewhere if:

  • You need real-time DDoS protection or advanced WAF features (e.g., rate limiting, bot mitigation).
  • Your stack is non-PHP (e.g., Node.js, Go, Python) or uses a different HTTP client library.
  • You require deep protocol inspection (e.g., HTTP/2, WebSockets) beyond URL/IP validation.
  • Your compliance needs mandate audit logs or SIEM integration (this package focuses on blocking, not logging).
  • You’re using a managed service (e.g., AWS API Gateway) that already handles SSRF protection.

How to Pitch It (Stakeholders)

For Executives: "This plugin adds a lightweight, automated shield against Server-Side Request Forgery (SSRF) attacks—a top OWASP risk—for our PHP-based HTTP clients. By blocking malicious requests to internal systems (e.g., databases, admin panels) before they’re processed, we reduce exposure to data breaches or service disruptions. It’s a low-cost, high-impact security layer that aligns with compliance needs (PCI, GDPR) and integrates seamlessly with our existing HTTPlug infrastructure. The MIT license and minimal overhead make it a no-brainer for hardening our API gateways and scraping services."

For Engineering: *"The j0k3r/httplug-ssrf-plugin provides a drop-in SSRF filter for HTTPlug clients, supporting:

  • Customizable rules: Block lists for IPs, domains, or URL patterns (e.g., file://, gopher://).
  • Performance: Zero runtime overhead for clean requests; only validates suspicious payloads.
  • Extensibility: Hook into HTTPlug’s middleware pipeline or override default rules.
  • Compatibility: Works with Laravel HTTP clients, Guzzle, or any HTTPlug adapter. Proposal: Integrate this into our [API Gateway]/[Scraping Service] to replace ad-hoc SSRF checks. Estimated effort: 2 dev days for testing/configuration. Trade-off: Less granular than a WAF, but avoids vendor lock-in and costs."*
Weaver

How can I help you explore Laravel packages today?

Conversation history is not saved when not logged in.
Prompt
Add packages to context
No packages found.
besmartand-pro/php-quality-config
sentix/ai-chatbot
terminal42/code-quality-tools
codifyo/ts-generator-bundle
testo/fiber
mintobit/jobqueue
a4sex/maintenance-bundle
a4sex/entity-date-update
a4sex/client-identifier
a4sex/base-utilites
a4sex/key-value-storage
a4sex/micro-status
chilldev/dependency-injection-extra
datinglibre/datinglibre-app-api
biberltd/corebundle
bricre/symfony-bundle-test
biberltd/logbundle
dominium/http-adapter-bundle
dominium/google-analytics
a4sex/auto-clean-entity