Alpine.js Security
Identifies and mitigates client-side injection vulnerabilities, XSS risks, and unsafe server data interpolation in Alpine.js applications.
Alpine.js Security provides comprehensive vulnerability analysis and secure coding patterns for Alpine.js v3 and server-rendered templates like Laravel Blade. It addresses the critical distinction between directive values and attribute expressions compiled via new Function, demonstrating why standard HTML-escaping fails inside x-data or x-on attributes. The skill offers actionable guidance on safe data passing with @js() and data-* attributes, HTML sanitization strategies using DOMPurify with Alpine's MutationObserver, CSP build trade-offs, and state trust boundaries.
主な機能
01Evaluates HTML sanitizers against Alpine document-wide MutationObserver attribute compilation
029 GitHub stars
03Identifies critical expression injection seams across Alpine directives including x-data, x-on, and x-init
04Guides integration of Alpine CSP builds and automated security template scanning tools
05Explains HTML-decoding pitfalls in JavaScript contexts and provides verified fixes using @js and data-* attributes
06Highlights client-side trust boundaries covering Alpine.store, $persist localStorage, and x-model.number
ユースケース
01Safely interpolating server-side variables and user input into dynamic Alpine component state
02Sanitizing user-generated rich text and HTML without exposing unescaped Alpine directive sinks
03Auditing Blade and Alpine.js templates for XSS and attribute expression injection vulnerabilities