Index of every page on this site: llms.txt
All skills
jeremylongshore avatar

/elevenlabs-security-basics

@0d57af8
Run it yourself

Apply ElevenLabs security best practices for API keys, webhook HMAC validation, and voice data protection. Use when securing API keys, validating webhook signatures, or auditing ElevenLabs security configuration. Trigger with "elevenlabs security", "elevenlabs secrets", "secure elevenlabs", "elevenlabs API key security", "elevenlabs webhook signature", "elevenlabs HMAC".

Use this Skill: https://skilld.dev/gh/jeremylongshore/tons-of-skills-marketplace/elevenlabs-security-basics

Nothing lands on disk. Nothing to clean up.

Fork this Skill

Edit a local copy. It keeps the author and licence.

referencesexamples.md

≈576 tokens on demand. Your agent reads this file only when SKILL.md points to it.

ElevenLabs Security — Worked Examples

End-to-end scenarios exercising the code from implementation.md. Each example is a concrete situation an operator hits when hardening an ElevenLabs integration.

Example 1: Block a key commit before it happens

Install the pre-commit hook from Step 1, then attempt to commit a file containing a key:

$ echo 'const KEY = "sk_abc123def456ghi789jkl";' > leak.ts
$ git add leak.ts && git commit -m "add config"
ERROR: ElevenLabs API key detected in staged changes!
Remove the key and use environment variables instead.
# commit aborted with exit code 1

The hook greps staged changes for the sk_[a-zA-Z0-9]{20,} pattern and blocks the commit, so the key never reaches history.

Example 2: Reject a replayed webhook

A valid-looking request arrives, but its timestamp is 6 minutes old:

const header = "t=1700000000,v1=<computed-hmac>";
const ok = verifyWebhookSignature(rawBody, header, process.env.ELEVENLABS_WEBHOOK_SECRET!);
// age = now - 1700000000 > 300  →  logs "Webhook timestamp too old"  →  returns false
// Express handler responds 401 Invalid signature

Even with a correct HMAC, the 5-minute replay window closes the attack.

Example 3: Rotate a leaked production key with zero downtime

You discover a key was exposed. Follow the Step 5 rotation runbook:

# Validate the replacement BEFORE cutting over
$ curl -s https://api.elevenlabs.io/v1/user \
    -H "xi-api-key: sk_new_key_here" | jq '.subscription.tier'
"creator"

# Push to every environment, deploy, verify prod, THEN revoke the old key
$ fly secrets set ELEVENLABS_API_KEY=sk_new_key_here
$ gh secret set ELEVENLABS_API_KEY --body "sk_new_key_here"

The old key stays live until production is confirmed on the new key — no request fails mid-rotation.

Example 4: Audit a voice-clone operation

Every clone/delete/use is logged as structured JSON for later review:

logVoiceOperation("clone", "voice_9f3a", "user_42");
// {"timestamp":"2026-07-17T12:00:00.000Z","type":"elevenlabs.voice.audit",
//  "operation":"clone","voiceId":"voice_9f3a","userId":"user_42"}

Because cloned voices are biometric PII, this audit trail is what proves who created a voice and whether consent was on file.

Source: SKILL.md on GitHub

skilld matched fixed text patterns in SKILL.md and file names. Patterns miss obfuscated code.

skilld run checks every file with the same patterns. It asks for approval before it loads a Skill with a behavior marked Needs approval.

No alerts2mo3 checks · Risk SAFE
  • Gen Agent Trust Hub2mo

    This skill provides security guidelines and code implementations for securing ElevenLabs API integrations. It covers API key management, webhook signature validation using HMAC-SHA256, and voice data protection. No malicious patterns or vulnerabilities were detected.

  • Socket2mo

    No alerts

  • Snyk2mo

    Risk: LOW · No issues

Signed by skilld at 0d57af8. This ties the file your Agent reads to that commit on GitHub. It does not review the instructions.

Last checked against GitHub yesterday.

Activeupdated 4 months ago
What it can do
Reads files Edits files
version
1.6.0
author
Jeremy Longshore <jeremy@intentsolutions.io>
tags
[
  "saas",
  "voice",
  "ai",
  "elevenlabs",
  "security",
  "webhooks"
]
All 3 allowed tools
ReadWriteGrep
Other metadata
compatibility
Designed for Claude Code

README badge

README badge for jeremylongshore/tons-of-skills-marketplace/elevenlabs-security-basics