What problem does it solve?
Web applications are constantly targeted by security vulnerabilities like XSS, insecure dependencies, and data leaks. This Skill provides a comprehensive framework for auditing application security, ensuring compliance with OWASP standards and best practices to protect users and data.
Core Features & Use Cases
- XSS Prevention: Enforces the use of
security-utils.js for all dynamic HTML manipulation, preventing Cross-Site Scripting attacks and protecting user data.
- Content Security Policy (CSP): Guides on configuring a restrictive CSP in
index.html to mitigate various injection attacks and control resource loading.
- Dependency Vulnerability Scanning: Utilizes
npm audit to identify and fix critical security flaws in third-party packages, keeping your codebase secure.
- Secrets Management: Emphasizes never committing sensitive data and proper handling of credentials and user data in
localStorage, preventing exposure.
- Use Case: Before any production release, activate this Skill to perform a full security audit. It will check for XSS risks, review your CSP, scan dependencies for vulnerabilities, and ensure no secrets are exposed, giving you confidence in your application's security posture.
Quick Start
1. Run ESLint security rules:
npm run lint
2. Scan for dependency vulnerabilities:
npm audit
3. For dynamic HTML, always use security-utils:
import { appendSanitizedHTML } from './security-utils.js';
appendSanitizedHTML(document.getElementById('container'), '<span>Safe content</span>');
4. Review index.html for CSP configuration.