T09 · Insecure Skill Coding Practices
- Location
SKILL.md:124- Finding
Predictable Hardcoded Webhook Signing Secrets in Executable Examples
- Content
View full analysis
Vulnerability Details
File Location:
SKILL.md:124-131,SKILL.md:240-247, andSKILL.md:252-259
Vulnerability Type: Hardcoded and predictable webhook signing secrets
Risk Level: MediumVulnerable Code
SKILL.md:124-131:bash skill-platform cron add \ --name "reminder-deploy-verify" \ --at "$REMIND_AT" \ --session isolated \ --message "验证最新部署的功能" \ --webhook "https://monitoring.example.com/hooks/verify" \ --webhook-signing-secret "monitor-secret" \ --delete-after-runSKILL.md:240-247:bash skill-platform cron add \ --name "reminder-deploy-verify" \ --at "$(date -u -d '+5 minutes' +"%Y-%m-%dT%H:%M:%SZ")" \ --session isolated \ --message "验证最新部署的功能" \ --webhook "https://ci.example.com/hooks/verify" \ --webhook-signing-secret "ci-secret" \ --delete-after-runSKILL.md:252-259:bash skill-platform cron add \ --name "reminder-incident-alert" \ --at "$(date -u -d '+1 minute' +"%Y-%m-%dT%H:%M:%SZ")" \ --session isolated \ --message "触发告警:生产事故" \ --webhook "https://alerts.example.com/hooks/incident" \ --webhook-signing-secret "alert-secret" \ --delete-after-runTechnical Analysis
The documentation provides copy-paste-ready commands containing static, predictable webhook signing secrets such as
monitor-secret,ci-secret, andalert-secret. Although these appear in examples rather than as deployed production credentials, users may execute the examples after changing only the endpoint. This can result in the documented value becoming an actual authentication secret.A webhook signature only proves authenticity while its signing key remains secret and sufficiently unpredictable. An attacker who knows or guesses one of these values can construct an arbitrary request body and calculate the expected HMAC signature. If the receiving endpoint relies solely on that signature, it cannot distingui ...[truncated 2248 chars]
- Remediation
View remediation
Remediation Suggestions
-
Replace all literal signing secrets with references to protected runtime values:
bash : "${WEBHOOK_SIGNING_SECRET:?WEBHOOK_SIGNING_SECRET must be configured}" skill-platform cron add \ --name "reminder-deploy-verify" \ --at "$REMIND_AT" \ --session isolated \ --message "Verify the latest deployment" \ --webhook "$WEBHOOK_URL" \ --webhook-signing-secret "$WEBHOOK_SIGNING_SECRET" \ --delete-after-run -
Generate an independent, cryptographically random secret for each integration, with at least 256 bits of entropy. Do not reuse one secret across monitoring, CI/CD, and incident-management receivers.
-
Prefer a platform secret manager or protected credential reference over direct command-line arguments. If the CLI supports secret identifiers, file descriptors, or standard-input ingestion, use those mechanisms to prevent exposure through process listings and shell history.
-
Ensure the command fails closed when the secret is absent. Never silently fall back to a sample or default value.
-
Mark all example values explicitly as nonfunctional placeholders and warn users that they must not be deployed unchanged.
-
On the receiving endpoint, use constant-time signature comparison, enforce HTTPS certificate validation, reject unsigned requests, validate timestamps and nonce values to prevent replay, and limit the maximum accepted request age.
-
Rotate any signing key that was based on these examples and audit webhook logs for forged, replayed, or otherwise unexpected requests.
-
Restrict each receiving integration to the minimum downstream privileges needed for reminder delivery so that a forged webhook cannot trigger unrelated administrative or deployment operations.
-
