agentleFS
awarexoneawarexone/AXguard/ssrf-analysis/SKILL.md

ssrf-analysis

Skill18 starsChanged 3 months agoMITView on GitHub

Analyze and validate server-side request forgery in application code — use when reviewing outbound HTTP/fetch sinks, user-controlled URLs, webhook callbacks, previewers, or cloud metadata exposure (CWE-918 / A10:2021).

The file

We split this skill into the rules it gives an agent

12 rules. About 0 are common, 8 are distinctive, and 4 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈8

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 4

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Very specific:

    After axguard scan|audit hits ssrf.* or cloud.*metadata*.

    line 39
  2. Distinctive:

    Read cloud credentials via metadata services.

    line 55
  3. Distinctive:

    Prefer static analysis + safe local validation.

    line 63
  4. Very specific:

    Prefer axguard flow evidence when available (dataflow.json / unsanitized net paths).

    line 73
  5. Distinctive:

    Document whether response is observable.

    line 103
  6. Distinctive:

    Do not brute-force third-party hosts.

    line 105
  7. Distinctive:

    Test fixtures intentionally vulnerable (unless scanning fixtures)

    line 123
  8. Distinctive:

    Do not invent CVSS vectors.

    line 134
  9. Very specific:

    Use cloud metadata IMDSv2 / hop limits.

    line 141
  10. Distinctive:

    Never return raw third-party response bodies to clients unless required and sanitized.

    line 142
  11. Distinctive:

    Add regression tests: attempts to pass metadata IP / localhost must fail closed.

    line 150
  12. Very specific:

    Use AXguard report fields: location, evidence snippet, why it matters, fix, confidence.

    line 154

≈ “Common” is an estimate: at least 1 in 5 of the 213,895 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

SSRF Analysis

Purpose

Teach the agent to reason about Server-Side Request Forgery (SSRF): when attacker-influenced input reaches a server-side network client and the server fetches a destination the attacker can affect.

When to Use

  • Code review of requests, fetch, httpx, urllib, axios, webhook/callback URLs, link previewers, PDF/HTML renderers, importers.
  • After axguard scan|audit hits ssrf.* or cloud.*metadata*.
  • Cloud apps that might reach instance metadata (169.254.169.254).

When Not to Use

  • Pure client-side browser fetch to same-origin APIs (not SSRF).
  • Outbound calls with fully hard-coded, non-user-influenced destinations and no redirect following of user input.

Security Concepts

SSRF is an egress trust failure: the server becomes a proxy into networks the attacker cannot reach directly (localhost, RFC1918, link-local, cloud metadata, internal admin).

Threat Model

Attacker goals:

  1. Read cloud credentials via metadata services.
  2. Port-scan or hit internal admin panels.
  3. Bypass network controls using the app as pivot.
  4. Chain into RCE via internal-only endpoints.

Preconditions

  • Target is software the user owns or is authorized to test.
  • Prefer static analysis + safe local validation; do not attack third-party infrastructure.

Inputs

  • Source tree / PR diff
  • Optional: axguard audit JSON report
  • Known deployment context (cloud provider, VPC, IMDSv1 vs v2)

Discovery

  1. Prefer axguard flow evidence when available (dataflow.json / unsanitized net paths); otherwise run axguard scan . or axguard audit . and collect ssrf.* / metadata findings.
  2. Grep for network clients: requests., httpx., urllib, fetch(, axios., curl, HttpClient, RestTemplate.
  3. Find URL construction: query params, body fields, webhooks, next=, url=, callback=, redirect=.

Analysis Workflow

Trace source → transform → sink:

  1. Where does the URL/host enter (param, JSON, header, DB)?
  2. Is it concatenated, parsed, normalized?
  3. Is there an allowlist of schemes/hosts? Or only a denylist?
  4. Is validation on hostname before or after DNS resolution?
  5. Are redirects followed? To what depth?
  6. Can the destination be localhost, 127.0.0.1, 0.0.0.0, IPv6 loopback, RFC1918, link-local, metadata IP?
  7. Is response body/status returned to the attacker (full SSRF) or only timing/errors (blind)?
  8. In cloud: can it reach metadata? Is IMDSv2 required (more resistant)?

Data Flow

attacker input → URL builder → HTTP client → internal/metadata network → response handling

Validation

Authorized defensive checks only:

  • Confirm code path is reachable in normal request handling.
  • Confirm user influence on host/scheme/path.
  • Confirm missing or weak allowlist.
  • Document whether response is observable.

Do not brute-force third-party hosts.

Evidence Requirements

Hypothesis becomes HIGH/CONFIRMED only with:

  • File:line of sink
  • Source of attacker influence
  • Missing control (no allowlist / redirect follow / DNS rebinding gap)
  • Impact hypothesis tied to environment (e.g., metadata readable)

False Positive Controls

Drop or downgrade when:

  • URL is enum/constant from server config only
  • Strict allowlist of https + exact hosts, no redirects
  • Client-side only request
  • Test fixtures intentionally vulnerable (unless scanning fixtures)

Severity Assessment

ConditionTypical severity
Metadata credential theft plausibleCritical/High
Internal admin reachable + response returnedHigh
Blind internal probe onlyMedium
Hardened allowlist, theoretical onlyLow/Info

Do not invent CVSS vectors.

Remediation

  1. Allowlist schemes (https) and hosts; reject IP literals unless required.
  2. Resolve DNS and re-validate resolved addresses (block private/link-local/metadata ranges).
  3. Disable or strictly limit redirects.
  4. Use cloud metadata IMDSv2 / hop limits; block 169.254.169.254 at egress.
  5. Never return raw third-party response bodies to clients unless required and sanitized.

Verification

Detect → Fix allowlist/egress → Re-run axguard → Manually re-trace source→sink → Confirm blocked destinations

Add regression tests: attempts to pass metadata IP / localhost must fail closed.

Reporting

Use AXguard report fields: location, evidence snippet, why it matters, fix, confidence.

Related Skills

  • cloud-security — metadata & egress policy
  • api-security — webhook/callback designs
  • secrets-detection — stolen cloud keys impact
  • security-triage — confidence gating
  • security-remediation — patch patterns

Framework Mapping

  • CWE-918
  • OWASP Top 10 2021 A10:2021 SSRF

References

Research Provenance

Primary sources:

  • OWASP Top 10:2021 A10 (accessed 2026-09-15)
  • CWE-918 (accessed 2026-09-15)

Secondary / internal:

  • AXGuard rules/ssrf.json, rules/cloud.json
  • AwareXone Agentic-Bug-Hunter web SSRF methodology (concepts only; not copied)

Datasets:

  • UVID HF dataset — category linkage concepts only (MIT license metadata review 2026-09-15)

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.