We actively support the following versions with security updates:
| Version | Supported | End of Life |
|---|---|---|
| 0.2.x | ✅ | TBD |
| 0.1.x | ✅ | 2026-06-01 |
| < 0.1 | ❌ | - |
We take security seriously. If you discover a security vulnerability, please follow these steps:
Important: Do not open a public GitHub issue for security vulnerabilities.
Email security details to: [email protected]
Include:
- Description of the vulnerability
- Steps to reproduce
- Potential impact
- Suggested fix (if any)
- Your contact information
For sensitive reports, you may encrypt your message using our PGP key:
-----BEGIN PGP PUBLIC KEY BLOCK-----
[PGP key would be here in production]
-----END PGP PUBLIC KEY BLOCK-----
- Initial Response: Within 48 hours
- Triage: Within 5 business days
- Fix Timeline: Depends on severity
- Critical: 1-3 days
- High: 1-2 weeks
- Medium: 2-4 weeks
- Low: Next release cycle
- We will work with you to understand and validate the issue
- A fix will be developed and tested
- A security advisory will be published
- Credit will be given to the reporter (unless anonymity is requested)
Smilodon is fully compatible with strict Content Security Policy:
<meta http-equiv="Content-Security-Policy"
content="default-src 'self';
script-src 'self';
style-src 'self';
img-src 'self' data:;
font-src 'self';">Features:
- ✅ No
eval()orFunction()constructors - ✅ No inline scripts or styles
- ✅ No unsafe dynamic code execution
- ✅ Shadow DOM isolation
- ✅ Nonce support for inline styles (if needed)
Built-in Protections:
-
Default Safe Rendering
// Safe by default - uses textContent option.textContent = userInput;
-
Optional HTML Sanitization
import { setHTMLSanitizer } from '@smilodon/core'; import DOMPurify from 'dompurify'; setHTMLSanitizer({ sanitize: (html) => DOMPurify.sanitize(html) });
-
Input Validation
// All user inputs are validated const safeValue = validateInput(userInput);
Security Benefits:
- Styles cannot leak in or out
- DOM structure is encapsulated
- Event handling is isolated
- Reduces attack surface
class EnhancedSelect extends HTMLElement {
private shadow: ShadowRoot;
constructor() {
super();
// Mode 'open' for debugging, 'closed' for production (if needed)
this.shadow = this.attachShadow({ mode: 'open' });
}
}Practices:
- Regular dependency audits with
npm audit - Automated Dependabot updates
- Minimal dependencies (zero runtime dependencies)
- All dev dependencies vetted
Run Security Audit:
# Check for vulnerabilities
npm audit
# Fix automatically (if possible)
npm audit fix
# Force fix (may introduce breaking changes)
npm audit fix --forceAll inputs are validated:
interface SelectItem {
value: string | number; // Validated type
label: string; // Sanitized before rendering
disabled?: boolean; // Type-safe boolean
}
function validateItem(item: unknown): SelectItem {
if (!item || typeof item !== 'object') {
throw new Error('Invalid item');
}
const { value, label, disabled } = item as any;
if (value === undefined || value === null) {
throw new Error('Item value is required');
}
if (typeof label !== 'string') {
throw new Error('Item label must be a string');
}
return {
value,
label: sanitizeString(label),
disabled: Boolean(disabled)
};
}Last security audit: 2025-12-10 Next scheduled audit: 2026-01-10
No security vulnerabilities have been reported or discovered to date.
-
Keep Dependencies Updated
npm update @smilodon/core
-
Use Subresource Integrity (SRI)
<script src="https://cdn.example.com/smilodon.js" integrity="sha384-..." crossorigin="anonymous"> </script>
-
Enable CSP Headers
Content-Security-Policy: default-src 'self'; script-src 'self' -
Sanitize User Content
import DOMPurify from 'dompurify'; const sanitized = DOMPurify.sanitize(userContent);
-
Validate Input Data
// Always validate items from untrusted sources const items = untrustedData.map(validateItem);
-
Never Commit Secrets
- No API keys, passwords, or tokens in code
- Use environment variables
- Add sensitive patterns to
.gitignore
-
Review Third-Party Code
- Audit all new dependencies
- Check for known vulnerabilities
- Prefer well-maintained packages
-
Follow Secure Coding Practices
- Validate all inputs
- Sanitize all outputs
- Use parameterized queries (if applicable)
- Avoid dangerous functions (
eval,innerHTML)
-
Test Security
# Run CSP compliance tests npm run test:csp # Run security audit npm audit # Run all security tests npm run test:security
- OWASP Top 10: Protection against common web vulnerabilities
- CWE/SANS Top 25: Mitigation of most dangerous software weaknesses
- CSP Level 3: Full Content Security Policy compliance
- WCAG 2.1 AAA: Accessibility standards (reduces social engineering)
Currently pursuing:
- SOC 2 Type II compliance
- ISO 27001 certification
See SOC2-COMPLIANCE.md for details.
GitHub Security:
- Dependabot alerts enabled
- Secret scanning enabled
- Code scanning (CodeQL) enabled
CI/CD Pipeline:
# .github/workflows/security.yml
name: Security Scan
on: [push, pull_request]
jobs:
security:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Run npm audit
run: npm audit --audit-level=moderate
- name: Run Snyk scan
uses: snyk/actions/node@master
env:
SNYK_TOKEN: ${{ secrets.SNYK_TOKEN }}Recommended Tools:
- OWASP ZAP - Web application security scanner
- Burp Suite - Security testing platform
- npm audit - Dependency vulnerability scanner
- Snyk - Open source security platform
- SonarQube - Code quality and security
-
Detection
- Automated alerts
- User reports
- Security researchers
-
Assessment
- Severity classification
- Impact analysis
- Exploit verification
-
Containment
- Patch development
- Temporary mitigations
- Communication plan
-
Resolution
- Deploy fixes
- Update documentation
- Publish security advisory
-
Post-Mortem
- Root cause analysis
- Process improvements
- Prevention measures
| Level | Description | Response Time |
|---|---|---|
| Critical | Remote code execution, data breach | 24-48 hours |
| High | Privilege escalation, authentication bypass | 1-2 weeks |
| Medium | XSS, CSRF, DoS | 2-4 weeks |
| Low | Information disclosure, minor issues | Next release |
- Email: [email protected]
- Response Time: 48 hours
- PGP Key: Available upon request
We recognize security researchers who responsibly disclose vulnerabilities:
No vulnerabilities reported yet
Last Updated: December 10, 2025 Next Review: January 10, 2026