Ssrf

From thejefflarson/soundcheck · View interactive version

Ssrf is an AI agent skill from the GitHub repository thejefflarson/soundcheck. Detects HTTP requests to user-controlled URLs that can reach internal services or cloud metadata endpoints. Use when writing code that makes HTTP requests to URLs constructed from user input, fetches resources from caller-specified addresses, or proxies requests on behalf of users. Also invoke when

How to use this skill

Skill file

SSRF Security Check (A10:2025 / API7:2023)

What this checks

Protects against Server-Side Request Forgery where an attacker tricks the server into

making requests to internal services, cloud metadata endpoints, or arbitrary external

hosts. Exploitation leads to internal network scanning, credential theft from cloud

metadata APIs (169.254.169.254), and access to services behind firewalls.

Vulnerable patterns

Fix immediately

Flag the vulnerable code, explain the risk, and suggest a fix establishing these

properties. Proxy, webhook, and URL-preview features are the highest-risk shapes —

the scheme/host/IP/redirect checks must actually run at the call site before the

outbound request; a comment saying "URL should be validated" satisfies nothing if the

next line still fetches the raw URL. Translate to the language and HTTP client of the

audited file — use that stack's documented URL parser, DNS resolver, and redirect

controls.

  1. Scheme is restricted to https (and http only for trusted internal use). Reject file:, gopher:, ftp:, dict:, and other schemes that SSRF toolkits exploit.
  2. Host is checked against an allowlist, and the resolved IP is checked against a blocklist covering private, loopback, and link-local ranges — IPv4 10.0.0.0/8, 172.16.0.0/12, 192.168.0.0/16, 127.0.0.0/8, 169.254.0.0/16 and IPv6 ::1/128, fc00::/7, fe80::/10. Resolve-then-check defeats DNS rebinding: an allowlisted hostname can still resolve to 169.254.169.254. Language-idiomatic checks that cover the same ranges are equivalent to explicit CIDR comparisons.
  3. Redirects are disabled, or each redirect target is re-validated against the same allowlist. A lone allowlisted host can still 302 to an internal IP.
  4. The check actually runs. A blocklist declared and never evaluated does not satisfy any of the above — the comparison must be present at the call site, before the outbound request.

Verification

References

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.