ssrf-prevention

ssrf-prevention is a skill for Claude Code, Codex from ShieldNet-360/secure-vibe. It costs 92 tokens per session (2,070 once invoked), scanned C, original, MIT.

Rules for preventing Server-Side Request Forgery, an attack in which an attacker makes your server fetch places they should not reach. They cover approved destinations, DNS changes, redirects, URL parsers, cloud metadata, and responses that reveal information.

In plain words
What is it for?
Use them when building a server-side URL fetcher, webhook checker, proxy, image importer, document converter, or any feature that retrieves a user-supplied address.
Why use it?
They help stop server-side fetches from reaching internal systems, cloud credentials, or other unintended destinations through alternate addresses or redirects.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one.

Good fit Use them when building a server-side URL fetcher, webhook checker, proxy, image importer, document converter, or any feature that retrieves a user-supplied address.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/shieldnet-360/secure-vibe/ssrf-prevention
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add ShieldNet-360/secure-vibe --skill ssrf-prevention
Clone the repo
git clone --depth 1 https://github.com/ShieldNet-360/secure-vibe

Made for: Claude Code, Codex.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for ssrf-prevention

README.md
[![agentmods](https://agentmods.dev/badge/skills/shieldnet-360/secure-vibe/ssrf-prevention.svg)](https://agentmods.dev/skills/shieldnet-360/secure-vibe/ssrf-prevention)
Your own site
<a href="https://agentmods.dev/skills/shieldnet-360/secure-vibe/ssrf-prevention"><img src="https://agentmods.dev/badge/skills/shieldnet-360/secure-vibe/ssrf-prevention.svg" alt="Measured on agentmods" height="20"></a>
Per session 92 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 2,070 The whole file, excluding the scripts and references it only reads on demand.
Security scan C 1 finding. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00092 $0.02070
Opus 5 $0.00046 $0.01035
Sonnet 5 $0.00018 $0.00414
Haiku 4.5 $0.00009 $0.00207

Measured 8d ago against content hash fa1e444967a2, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-08, from the pricing page.

Security

Grade C, and why

ssrf-prevention scanned grade C with 1 finding against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 8d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Cloud metadata endpointhighServer-side request forgery

One request to 169.254.169.254 can return temporary IAM credentials.

`http://169.254.169.254/` is the single most common bypass, and it defeats a check
skills/ssrf-prevention/SKILL.md · 141 lines

How it starts

The opening of the file, as written. The whole thing — 141 lines — stays where its author put it; the contents beside it link to each section on GitHub.

SSRF Prevention

Rules (for AI agents)

ALWAYS

  • Constrain the destination with an allowlist of hosts you intend to reach, not a denylist of addresses you intend to avoid. A denylist has to enumerate every spelling of every internal address — decimal and octal IPv4, IPv6 and IPv4-mapped IPv6, a hostname whose A record is private, a public wildcard resolver like nip.io that encodes any address into a name — and it only has to be wrong once.
  • Know which of the two controls you built, because it decides whether re-resolution matters. An allowlist of hostnames survives DNS rebinding: the attacker controls DNS only for names they own, and those names are not on the list. An IP-range check does not: the name resolves to a public address when you validate and a private one when you connect, and the two resolutions are independent. If your control is address-based, resolve once and connect to that pinned address — a custom dialer or transport, carrying the original hostname for SNI and Host — so no second lookup can occur.
  • Re-validate at every redirect hop, or disable redirect-following entirely on fetchers that take user-supplied URLs. An allowed host answering 302 to http://169.254.169.254/ is the single most common bypass, and it defeats a check performed only on the URL the user submitted.
  • Restrict the scheme to http and https before anything else. file://, gopher://, dict://, ldap://, jar:// and friends turn a fetcher into a file reader or a protocol-smuggling primitive.
  • Keep the user-URL fetcher and the internal fetcher as separate clients, and make mixing them fail to compile rather than fail at runtime — distinct types in Go, Rust or TypeScript. A single client used for both eventually gets called with the wrong argument.
  • Treat a parser as a fetcher. XML entity resolution, SVG with external references, HTML-to-PDF renderers, Markdown image embedding, oEmbed and link-preview unfurlers, and office-document converters all issue outbound requests from URLs inside the document, using no code you wrote. deserialization-security owns disabling external entities; what belongs here is that the request those parsers make is a server-side fetch and needs the same allowlist and the same egress policy.
  • Decide what the response may reveal. Returning the body, the status code, the redirect chain, the content type, or the elapsed time to the caller turns a blind SSRF into a readable one. Return a fixed error on failure and never echo the URL or the fetch error back — error-handling-security owns the shape of that response.
  • Enforce IMDSv2 on EC2 (session token required, hop limit 1) so a plain GET from a compromised process cannot read instance credentials, and give the workload its own identity so the metadata service is not a credential worth reaching. Endpoints for each cloud, and the egress rules that go with them, are in references/metadata-and-egress.md.

Read the full file on GitHub · 141 lines

Files

What ships with it

5 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 8d ago First seen · 141 lines · 92 tokens per session scan C fa1e444967a2

Subscribe to this mod's changes

ssrf-prevention is a skill published in the GitHub repository ShieldNet-360/secure-vibe (22 stars, last pushed 25d ago), licensed MIT. It adds 92 tokens to every session and 2,070 once invoked, about $0.0005 per session on Opus 5. A static security scan graded it C with 1 finding (cloud metadata endpoint). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.

Related

Other skills, from other repositories

offensive-api-abuse

Advanced API exploitation methodology focused on business logic abuse and sophisticated attack patterns that bypass traditional security controls. Covers business logic bypass through API call chaining and workflow manipulation. Addresses GraphQL-specific attacks including batching for credential brute-force, query…

SnailSploit/Claude-Red · 184 tokens

offensive-graphql

Offensive methodology for attacking GraphQL APIs during penetration tests and bug bounty engagements. Covers the full attack lifecycle: endpoint discovery, introspection abuse and blind schema reconstruction when introspection is disabled, authentication and authorization bypass through Relay node IDs and nested…

SnailSploit/Claude-Red · 219 tokens

zcfg

Integrate zcfg (Zero Dependency Configuration Utility) into Java applications. Use when adding configuration loading, reading properties files, setting up application configuration, or integrating zcfg into a Java project. Triggers on "zcfg", "add configuration", "load properties", "application configuration with…

AdamBien/airails · 75 tokens

agent-ready-auth-md

Sub-skill: Implement Auth.md for agent registration discovery. Serve /auth.md with OAuth metadata at /.well-known/oauth-protected-resource and authorization server endpoints.

fabricioctelles/skills · 37 tokens

agent-ready-dns-aid

Sub-skill: Implement DNS-AID records so agents discover endpoints through DNS. Use SVCB/HTTPS records under agents namespace with alpn and connection parameters.

fabricioctelles/skills · 41 tokens

agent-ready-link-headers

Sub-skill de agent-ready-cloudflare: Implement Link Response Headers.

fabricioctelles/skills · 20 tokens