twilio-security-hardening

Secures Twilio applications through credential management, webhook validation, and fraud prevention.

5.3k|765|Updated Mar 4, 2026
One-click install
npx skills add https://github.com/openai/plugins --skill twilio-security-hardening
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: twilio-security-hardening
Source: https://github.com/openai/plugins/tree/main/plugins/twilio-developer-kit/skills/twilio-security-hardening
Command: npx skills add https://github.com/openai/plugins --skill twilio-security-hardening

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Twilio applications face credential leaks, spoofed webhook requests, SMS pumping fraud, and compliance violations (PCI DSS, HIPAA) that can result in account compromise and tens of thousands of dollars in toll fraud charges.

Core Features & Use Cases

  • Credential Management: Guidance on API keys vs auth tokens, zero-downtime rotation workflows, and secrets manager integration to prevent credential leaks.
  • Webhook Security: X-Twilio-Signature request validation using SDK validators to block spoofed webhook requests.
  • Compliance & Fraud Prevention: PCI DSS sub-account isolation, HIPAA BAA requirements, SMS pumping defenses via Fraud Guard, Lookup pre-checks, and geo-permissions.
  • Use Case: Before deploying a Twilio OTP verification flow, apply layered SMS pumping defenses by enabling Verify Fraud Guard, restricting geo-permissions to served countries, and rate-limiting verification attempts.

Quick Start

Review my Twilio application for security issues and recommend how to protect it against SMS pumping and webhook spoofing.

Frequently Asked Questions about twilio-security-hardening

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I validate Twilio webhook requests?

Validate Twilio webhooks using the SDK's validateRequest function with your auth token, the X-Twilio-Signature header, the exact request URL, and request body. The URL must match exactly, including HTTPS scheme and query string parameters.

Should I use Twilio API keys or auth tokens in production?

Use API keys in production because they are scoped and individually revocable. Rotating the auth token invalidates all existing API keys simultaneously, which can break every integration at once.

How do I prevent SMS pumping fraud on Twilio?

Prevent SMS pumping with layered defenses: enable Verify Fraud Guard, run Lookup line-type and risk-score checks before sending, restrict geo-permissions to countries you serve, and rate-limit verification attempts per IP and phone number.

Can PCI DSS mode be disabled on a Twilio account?

No, PCI Mode is irreversible and account-wide once enabled. The recommended approach is creating a separate sub-account dedicated to payment-related calls so the main account remains unaffected.

What is required for HIPAA compliance on Twilio?

HIPAA compliance requires executing a Business Associate Agreement with Twilio, encrypting all recordings containing PHI, minimizing PHI in text-to-speech, rotating API keys regularly, and restricting access to recordings and transcripts.