T09 · Insecure Skill Coding Practices
- Location
register.sh:14- Finding
Published Hard-Coded Webhook Authentication Token
- Content
View full analysis
- Remediation
View remediation
Security audit
Security checks for vulnerabilities and agentic risk
This webhook router is not clearly malicious, but it ships with a reusable public secret and unsafe routing/storage defaults that need careful review before use.
Do not deploy this as-is on a public endpoint. Rotate and remove the published hook token, require per-source secrets and provider signature verification, validate source names before any file or handler lookup, disable raw payload vault storage unless explicitly needed, and add redaction plus retention controls for logs and vault entries.
register.sh:14Published Hard-Coded Webhook Authentication Token
router.sh:176Handler Path Traversal Can Execute Files Outside the Handler Directory
register.sh:78Unvalidated Registration Type Enables File Writes Outside Intended Directories
router.sh:99Webhook Provider Signatures Are Detected but Never Verified
handlers/custom.sh:41Webhook Payloads Are Persisted Without Field-Level Redaction
The skill publishes what appears to be a live hook authentication token and instructs users to reuse it in multiple webhook configurations. Exposing a bearer-style secret in documentation enables unauthorized parties to send forged webhooks to the public endpoint, potentially triggering actions, alerts, or downstream automation as trusted events.
Referenced artifact was not completely inspected
- `SKILL.md` - This documentation
The generated handler forwards the complete webhook payload into a vault entry, which may transmit and retain highly sensitive information such as customer data, API metadata, or embedded secrets. Because this happens in a template intended for broad reuse and there is no warning or filtering, it increases the chance of compliance, privacy, and secret-exposure issues across all deployed handlers.
Tool calls are chained to bypass individual safety checks or escalate capabilities beyond what any single tool call would allow.
HANDLER_TEMPLATE
# Replace template variables
sed -i.bak "s/{{SOURCE_TYPE}}/${SOURCE_TYPE}/g" "$HANDLER_FILE" && rm -f "${HANDLER_FILE}.bak"
chmod +x "$HANDLER_FILE"
echo "Created handler template: $HANDLER_FILE"
Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.
Sends mock webhooks to test the routing system.
# GitHub push event
The documentation says webhook payloads are logged as hashes, but the handler example explicitly writes the full payload to vault storage. That discrepancy can cause operators to handle sensitive webhook data under false assumptions, increasing the risk of credential, token, or personal data retention and disclosure.
The script stores the full webhook payload in the vault verbatim, and webhook payloads often contain secrets, personal data, tokens, headers, URLs, or attacker-controlled content. Persisting all received data without minimization, filtering, or any disclosure increases the risk of sensitive-data retention, insider exposure, and later compromise if the vault contents are accessed or exported.
The file header describes this as a generic webhook handler that 'logs payload and attempts to extract meaningful information.' In practice, the script writes structured webhook data including payload content to a vault (L107-L133) and sends alert messages for important events (L157-L167), which are materially different side effects from simple logging.
The handler stores attacker-controlled webhook payload content into persistent vault storage by default, including potentially sensitive fields such as user identifiers, emails, status details, and raw payload fragments. In a generic webhook handler, this is dangerous because unknown third-party sources can cause sensitive, excessive, or maliciously crafted data to be retained indefinitely, increasing exposure in the event of vault misuse, over-retention, or downstream access by other tools.
When a payload is classified as important, the script sends extracted webhook details to an external alert channel, potentially exposing sensitive operational, user, or incident information to systems outside the primary processing boundary. This is particularly risky in a generic webhook context because untrusted payload content can influence alert content, causing unintended data disclosure or message injection into downstream notification systems.
The script writes registration data including a per-source token to a local JSON file under .config without setting restrictive permissions or warning the user that secret material is being persisted. If the workspace is shared, backed up, or readable by other local users/processes, the token could be exposed and used to spoof webhook traffic if relied on elsewhere.
The generated webhook handler stores full inbound payloads in a vault path, which can capture secrets, PII, tokens, or proprietary event contents unrelated to the operational need of handling the webhook. In this context the behavior is built into an auto-generated template and not clearly disclosed, making accidental over-collection and sensitive data retention likely.
This code logs source, event type, repository, sender, payload hash, and handler information to a persistent file via LOG_FILE. For code files, safety-relevant data handling should have some visible disclosure such as a prompt, print statement, or explanatory comment/docstring, but the script performs the write silently from the user's perspective.
This line executes another shell script as a subprocess and passes it the webhook payload and derived metadata. Although subprocess execution is core behavior for a router, there is no visible runtime disclosure that untrusted webhook content will be handed off to executable handlers, which fits the missing-warning criteria for code files.
The file header describes the script as a GitHub webhook handler that processes events and triggers appropriate actions. In practice, those actions include writing structured repository event data to a vault and sending notifications through an external message tool, which are meaningful side effects not reflected in the documentation.