Back to skill

Security audit

Webhook

Security checks for vulnerabilities and agentic risk

Overview

This documentation-only webhook skill is coherent, but its unsafe logging advice and missing SSRF protections need user review before use.

Review and amend the guidance before relying on it for production webhook code. Add SSRF protections for outbound webhook destinations, disable or tightly validate redirects, bound response sizes, redact URLs and bodies in logs, and capture raw payloads or response bodies only in short-lived, access-controlled debug workflows.

Vulnerability Patterns
  • Insecure Skill Coding PracticesFinds exploitable flaws such as hardcoded secrets or command injection
  • Skill Instruction HijackingAlters the agent's session goals or safety constraints when the skill loads
  • Agent Memory PoisoningWrites attacker-controlled rules into memory that affect later sessions
  • Remote Payload Retrieval and ExecutionFetches external code whose behavior can change after review
  • Embedded Malicious CodeShips malicious scripts inside the skill and executes them locally
Findings (1)

T09 · Insecure Skill Coding Practices

Warning
Location
SKILL.md:52
Finding
Webhook Delivery Guidance Omits Server-Side Request Forgery Protections## Vulnerability Details **File Location**: `SKILL.md`, lines 52–80 **Vulnerability Type**: Inadequate SSRF prevention guidance and sensitive delivery logging **Risk Level**: Medium **Relevant snippet**: ```markdown ## Sending: Timeouts - 5-10 second timeout—don't wait forever for slow receivers - Treat timeout as failure—retry later - Don't follow redirects—or limit to 1-2; prevents redirect loops - Validate HTTPS certificate—don't skip verification ## Event Design - Include event type: `{"type": "order.created", ...}`—receivers filter by type - Include timestamp: ISO 8601 with timezone—for ordering and freshness - Include full resource or ID—prefer full data; saves receiver a lookup - Version events: `api_version` field—allows breaking changes ## Delivery Tracking - Log every attempt: URL, status code, response time, response body - Dashboard for retry queue—let users see pending/failed deliveries - Manual retry button—for stuck webhooks after receiver fix - Webhook logs retention: 7-30 days—balance debugging vs storage ## Security Checklist - HTTPS only—never send webhooks to HTTP endpoints - Rotate secrets periodically—support multiple active secrets during rotation - IP allowlisting optional—document your IP ranges if offered - Don't include secrets in payload—webhook URL should be secret enough - Rate limit per endpoint—one slow receiver shouldn't affect others ``` ### Technical Analysis The Skill instructs implementations to send server-side HTTP requests to webhook destinations but does not require validation that destination URLs resolve only to permitted public network addresses. Missing controls include: - Blocking loopback, private, link-local, multicast, reserved, and cloud metadata addresses. - Rejecting credentials embedded in URLs. - Restricting destination ports and URL schemes. - Preventing DNS rebinding or time-of-check/time-of-use resolution changes. - Revalidatin ...[truncated 2218 chars]
Remediation
## Remediation Suggestions - Permit only the `https` scheme and reject malformed URLs, URL fragments, embedded credentials, and unexpected ports. - Resolve destinations before connecting and reject every address in loopback, private, link-local, multicast, reserved, unspecified, and cloud metadata ranges for both IPv4 and IPv6. - Validate every resolved address, not only the first returned address. - Pin the validated address during connection or use a transport that prevents DNS rebinding between validation and connection. - Disable redirects by default. If redirects are necessary, independently parse, resolve, and validate every redirect target and enforce a small hop limit. - Use explicit destination allowlists for high-risk deployments. - Apply outbound firewall or proxy rules so application-layer validation is not the only defense. - Do not attach internal credentials, cookies, or authorization headers to arbitrary webhook destinations. - Limit response size, response time, and connection concurrency. - Redact credentials, tokens, query parameters, and sensitive path components before logging destination URLs. - Avoid storing full response bodies by default. Store only bounded, redacted diagnostic data and apply strict access controls and retention limits. - Ensure manual retries repeat all destination validation rather than trusting previously stored URLs.
Vulnerability Patterns
  • Excessive AgencyUnrestricted Tool Access, Autonomous Decision Making, Scope Creep
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
  • Supply ChainUnpinned Dependencies, External Script Fetching, Obfuscated Code
Findings (4)

Missing User Warnings

Medium
Confidence
92% confidence
Finding
The error-handling section advises logging full payloads on error, with only a brief note to redact sensitive fields. Because webhook payloads frequently include customer data, tokens, internal identifiers, or payment-related metadata, this guidance can lead implementers to persist sensitive data in logs during failure scenarios, which are often the noisiest and most widely reviewed logs.

Unbounded Resource Access

Medium
Category
Excessive Agency
Content
## Sending: Retry Strategy

- Exponential backoff: 1min, 5min, 30min, 2h, 8h—then give up or alert
- Cap retries (5-10 attempts)—don't retry forever
- Record delivery attempts—show status to user
- Different retry for 4xx vs 5xx—4xx often means stop retrying
Confidence
75% confidence
Finding
Skill allows unbounded resource consumption (API calls, storage, compute). Without rate limits or quotas, a compromised or misbehaving agent can cause denial-of-service or cost overruns.

Autonomous Decision Making

Medium
Category
Excessive Agency
Content
- 5-10 second timeout—don't wait forever for slow receivers
- Treat timeout as failure—retry later
- Don't follow redirects—or limit to 1-2; prevents redirect loops
- Validate HTTPS certificate—don't skip verification

## Event Design
Confidence
85% confidence
Finding
Skill enables autonomous high-impact decisions without human-in-the-loop verification. Critical operations (destructive commands, financial transactions, data deletion) should require explicit user confirmation.

Missing User Warnings

Medium
Confidence
89% confidence
Finding
The skill recommends logging every webhook attempt including response bodies, but does not clearly warn that payloads and responses may contain personal data, secrets, tokens, or business-sensitive content. In webhook systems, logs are often broadly accessible and long-lived, so indiscriminate body logging can create a secondary data-exposure channel even when transport security is otherwise correct.

Static analysis

No suspicious patterns detected.