ssrf
This skill should be used when the user asks to "check for SSRF", "analyze server-side request forgery", "find URL fetching vulnerabilities", "check for internal network access", or mentions "SSRF", "URL fetching", "cloud metadata", "169.254.169.254", or "request forgery" in a security context. Maps to OWASP Top 10 2021 A10: Server-Side Request Forgery.
What this skill does
# Server-Side Request Forgery (A10:2021) Analyze source code for server-side request forgery vulnerabilities including URL fetching from user input, missing URL validation, internal network access, redirect following, DNS rebinding, and cloud metadata endpoint access. SSRF is especially critical in cloud environments where metadata endpoints expose credentials and instance configuration. ## Supported Flags Read `../../shared/schemas/flags.md` for the full flag specification. This skill supports all cross-cutting flags. Key flags for this skill: - `--scope` determines which files to analyze (default: `changed`) - `--depth standard` reads code and checks URL fetch calls for user-controlled input - `--depth deep` traces URL input from request parameters through all transformations to fetch calls - `--severity` filters output (SSRF to cloud metadata is `critical`, general SSRF is `high`) ## Framework Context Read `../../shared/frameworks/owasp-top10-2021.md`, section **A10:2021 - Server-Side Request Forgery (SSRF)**, for the full category description, common vulnerabilities, and prevention guidance. Key CWEs in scope: - CWE-918: Server-Side Request Forgery (SSRF) - CWE-441: Unintended Proxy or Intermediary - CWE-601: URL Redirection to Untrusted Site (open redirect enabling SSRF chains) ## Detection Patterns Read `references/detection-patterns.md` for the full catalog of code patterns, search heuristics, language-specific examples, and false positive guidance. ## Workflow ### 1. Determine Scope Parse flags and resolve the file list per `../../shared/schemas/flags.md`. Filter to files likely to contain outbound HTTP request logic: - HTTP client usage (`**/http/**`, `**/client/**`, `**/fetch/**`, `**/request/**`) - Webhook and callback handlers (`**/webhooks/**`, `**/callbacks/**`) - Proxy and gateway code (`**/proxy/**`, `**/gateway/**`) - Integration modules (`**/integrations/**`, `**/connectors/**`, `**/services/**`) - File import/upload handlers (`**/upload/**`, `**/import/**`) - URL preview or unfurling code (`**/preview/**`, `**/unfurl/**`, `**/embed/**`) - PDF generation and screenshot services (`**/pdf/**`, `**/screenshot/**`, `**/render/**`) ### 2. Check for Available Scanners Detect scanners per `../../shared/schemas/scanners.md`: 1. `semgrep` -- primary scanner for SSRF patterns (taint analysis for URL flow) 2. `bandit` -- Python-specific request patterns 3. `gosec` -- Go HTTP client patterns Record which scanners are available and which are missing. ### 3. Run Scanners (If Available) If semgrep is available, run with rules targeting SSRF: ``` semgrep scan --config auto --json --quiet <target> ``` Filter results to rules matching SSRF, URL fetching, and request forgery patterns. Normalize output to the findings schema. ### 4. Claude Code Analysis Regardless of scanner availability, perform manual code analysis: 1. **URL from user input**: Find HTTP client calls (fetch, requests, http.get, etc.) and trace whether the URL or any URL component originates from user input (query params, request body, headers, path params). 2. **URL scheme validation**: Check that URL schemes are restricted to `http://` and `https://` only, blocking `file://`, `gopher://`, `dict://`, `ftp://`, and other dangerous schemes. 3. **Internal IP blocking**: Verify that URLs are validated against internal/private IP ranges (127.0.0.0/8, 10.0.0.0/8, 172.16.0.0/12, 192.168.0.0/16, 169.254.0.0/16, 0.0.0.0, ::1, fd00::/8) before making requests. 4. **Cloud metadata protection**: Check for blocking of cloud metadata endpoints (169.254.169.254, metadata.google.internal, 169.254.170.2) and IMDSv2 enforcement on AWS. 5. **Redirect handling**: Verify that HTTP redirects are either disabled or validated at each hop to prevent redirect-based SSRF bypass. 6. **DNS rebinding**: Check if DNS resolution and connection happen atomically or if there is a TOCTOU gap where a hostname could resolve to a safe IP during validation but a private IP during the actual request. When `--depth deep`, additionally trace: - Complete data flow from request parameter to HTTP client call - URL construction through string concatenation, template rendering, or URL builder APIs - Indirect SSRF via PDF generators, screenshot services, SVG/XML processors, or webhook URLs ### 5. Report Findings Format output per `../../shared/schemas/findings.md` using the `SSRF` prefix (e.g., `SSRF-001`, `SSRF-002`). Include for each finding: - Severity and confidence - Exact file location with code snippet - Impact description specific to the SSRF scenario (cloud metadata, internal scanning, data exfiltration) - Concrete fix with diff when possible - CWE and OWASP references ## What to Look For These are the high-signal patterns specific to server-side request forgery. Each maps to a detection pattern in `references/detection-patterns.md`. 1. **URL from user input passed to HTTP client** -- Any HTTP request function (fetch, requests.get, http.Get, HttpClient) called with a URL that originates from user-controlled input without validation. 2. **Missing URL scheme whitelist** -- URL validation that does not restrict the scheme to http/https, allowing file://, gopher://, or other dangerous protocols. 3. **No blocking of internal IP ranges** -- Outbound requests to user-supplied URLs without checking the resolved IP against private/reserved ranges, enabling internal network scanning and service access. 4. **Cloud metadata endpoint accessible** -- No specific blocking of 169.254.169.254 (AWS/Azure/GCP metadata), metadata.google.internal, or 169.254.170.2 (ECS task metadata), allowing credential theft from cloud environments. 5. **Redirect following on user-supplied URLs** -- HTTP client configured to follow redirects when fetching user-supplied URLs, enabling attackers to bypass URL validation by redirecting from an allowed domain to an internal target. 6. **DNS rebinding vulnerability** -- URL validation resolves the hostname to check the IP, but the actual HTTP request resolves it again, allowing a DNS record with a short TTL to return a different (internal) IP on the second resolution. 7. **Indirect SSRF via document processors** -- PDF generators (wkhtmltopdf, Puppeteer), SVG renderers, XML parsers (XXE), or webhook registration endpoints that fetch URLs without SSRF protection. ## Scanner Integration | Scanner | Coverage | Command | |---------|----------|---------| | semgrep | URL from user input, taint tracking through request calls | `semgrep scan --config auto --json --quiet <target>` | | bandit | Python requests/urllib with user input | `bandit -r <target> -f json -q` | | gosec | Go net/http with user input | `gosec -fmt json ./...` | **Fallback (no scanner)**: Use Grep with patterns from `references/detection-patterns.md` to find HTTP client calls, URL construction from user input, and missing validation. Report findings with `confidence: medium`. Relevant semgrep rule categories: - `python.requests.security.ssrf.*` - `python.urllib.security.audit.ssrf.*` - `javascript.fetch.security.ssrf.*` - `java.net.security.audit.ssrf.*` - `go.net.security.audit.ssrf.*` ## Output Format Use the findings schema from `../../shared/schemas/findings.md`. - **ID prefix**: `SSRF` (e.g., `SSRF-001`) - **metadata.tool**: `ssrf` - **metadata.framework**: `owasp` - **metadata.category**: `A10` - **references.owasp**: `A10:2021` - **references.stride**: `I` (Information Disclosure) or `E` (Elevation of Privilege) Severity guidance for this category: - **critical**: SSRF to cloud metadata endpoint (169.254.169.254), unauthenticated endpoint with no URL validation - **high**: SSRF to internal network with no IP range blocking, redirect following enabled on user URLs - **medium**: Partial URL validation (scheme checked but IP not validated), DNS rebinding possible - **low**: SSRF risk in internal-only service not exposed to external
Related in Cloud & DevOps
appbuilder-action-scaffolder
IncludedCreate, implement, deploy, and debug Adobe Runtime actions with consistent layout, validation, and error handling. Use this skill whenever the user needs to add actions to an App Builder project, understand action structure (params, response format, web/raw actions), configure actions in the manifest, use App Builder SDKs (State, Files, Events, database), deploy and invoke actions via CLI, debug action issues, or implement patterns such as webhook receivers, custom event providers, journaling consumers, large payload redirects, action sequence pipelines, and Asset Compute workers. Also trigger when users mention serverless functions in Adobe context, action logging, IMS authentication for actions, or cron-style scheduled actions.
orchestrating-datacloud
IncludedSalesforce Data Cloud product orchestrator for connect→prepare→harmonize→segment→act workflows. Use this skill when the user needs a multi-step Data Cloud pipeline, cross-phase troubleshooting, or data space and data kit management. TRIGGER when: user needs a multi-step Data Cloud pipeline, asks to set up or troubleshoot Data Cloud across phases, manages data spaces or data kits, or wants a cross-phase sf data360 workflow. DO NOT TRIGGER when: work is isolated to a single phase (use the matching phase-specific skill), the task is STDM/session tracing/parquet telemetry (use observing-agentforce), standard CRM SOQL (use querying-soql), or Apex implementation (use generating-apex).
github-project-automation
IncludedAutomate GitHub repository setup with CI/CD workflows, issue templates, Dependabot, and CodeQL security scanning. Includes 12 production-tested workflows and prevents 18 errors: YAML syntax, action pinning, and configuration. Use when: setting up GitHub Actions CI/CD, creating issue/PR templates, enabling Dependabot or CodeQL scanning, deploying to Cloudflare Workers, implementing matrix testing, or troubleshooting YAML indentation, action version pinning, secrets syntax, runner versions, or CodeQL configuration. Keywords: github actions, github workflow, ci/cd, issue templates, pull request templates, dependabot, codeql, security scanning, yaml syntax, github automation, repository setup, workflow templates, github actions matrix, secrets management, branch protection, codeowners, github projects, continuous integration, continuous deployment, workflow syntax error, action version pinning, runner version, github context, yaml indentation error
sf-datacloud
IncludedSalesforce Data Cloud product orchestrator for connect→prepare→harmonize→segment→act workflows. TRIGGER when: user needs a multi-step Data Cloud pipeline, asks to set up or troubleshoot Data Cloud across phases, manages data spaces or data kits, or wants a cross-phase `sf data360` workflow. DO NOT TRIGGER when: work is isolated to a single phase (use the matching sf-datacloud-* skill), the task is STDM/session tracing/parquet telemetry (use sf-ai-agentforce-observability), standard CRM SOQL (use sf-soql), or Apex implementation (use sf-apex).
fabric-cli
IncludedUse this skill for Fabric.so CLI workflows with the `fabric` terminal command: diagnose/install/login, search or browse a Fabric library, save notes/links/files, create folders, ask the Fabric AI assistant, manage tasks/workspaces, generate shell completion, check subscription usage, produce JSON output, and use Fabric as persistent agent memory. Do not use for Microsoft Fabric/Azure/Power BI `fab`, Daniel Miessler's Fabric framework, Python Fabric SSH, Fabric.js, or textile/fashion fabric.
lark
IncludedLark/Feishu CLI skills: lark-cli operations for docs, markdown, sheets, base, calendar, im, mail, task, okr, drive, wiki, slides, whiteboard, apps, approval, attendance, contact, vc, minutes, event. Use when the user needs to operate Lark/Feishu resources via lark-cli, send messages, manage documents, spreadsheets, calendars, tasks, OKRs, deploy web pages, or any Feishu/Lark workspace operations.