Security policy and practices for Spec-Driven Steroids.
| Version | Supported |
|---|---|
| 0.7.x | ✅ |
| < 0.7.0 | ❌ |
Do NOT open a public issue for security vulnerabilities.
Instead, report vulnerabilities privately:
- Email: lindoelio@gmail.com
- Subject:
[SECURITY] Spec-Driven Steroids Vulnerability - Include:
- Description of the vulnerability
- Steps to reproduce
- Potential impact
- Suggested fix (if any)
| Stage | Timeline |
|---|---|
| Acknowledgment | Within 48 hours |
| Initial Assessment | Within 7 days |
| Fix Development | Varies by severity |
| Release | Within 30 days (critical) |
Never commit:
- API keys
- Tokens
- Passwords
- Private keys
- Database credentials
// ❌ WRONG
const apiKey = 'sk-abc123...';
// ✅ CORRECT
const apiKey = process.env.API_KEY;All user inputs must be validated before processing:
function validateSlug(slug: string): boolean {
if (!slug || typeof slug !== 'string') return false;
if (slug.length > 100) return false;
return /^[a-z0-9-]+$/.test(slug);
}Validate and sanitize file paths:
import path from 'path';
function safePath(baseDir: string, userPath: string): string {
const resolved = path.resolve(baseDir, userPath);
if (!resolved.startsWith(baseDir)) {
throw new Error('Path traversal attempt detected');
}
return resolved;
}MCP tools must:
- Validate all input parameters
- Sanitize file paths before filesystem operations
- Return safe error messages (no stack traces in production)
- Use structured error formatting
async function verifySpecStructure(slug: string, targetDir?: string) {
// Validate inputs
if (!validateSlug(slug)) {
throw new Error('Invalid slug format');
}
const baseDir = targetDir || process.cwd();
const specDir = safePath(baseDir, `specs/changes/${slug}`);
// Safe filesystem operations
// ...
}The CLI performs these security-sensitive operations:
| Operation | Risk | Mitigation |
|---|---|---|
| File system writes | Data loss | User confirmation, overwrite flags |
| MCP config modification | Credential exposure | Configurable paths, user consent |
| Template injection | Code injection | Template validation, no executable code |
The MCP server operates with filesystem access:
| Operation | Risk | Mitigation |
|---|---|---|
| Read spec files | Information disclosure | Path validation, sandboxed to spec directories |
| Validate content | DoS | Input size limits, timeout handling |
Regular security audits:
# Check for known vulnerabilities
pnpm audit
# Update dependencies
pnpm update- Use minimal dependencies
- Prefer well-maintained packages
- Review dependency updates before merging
- Pin dependency versions in production
- Never expose internal errors to end users
- Always validate inputs at function boundaries
- Use TypeScript strict mode to catch type errors
- Run
pnpm auditbefore submitting PRs - Review file operations for path traversal risks
- Review injected files before committing to repositories
- Understand MCP server permissions in your AI tool
- Keep the package updated for security fixes
- Report suspicious behavior promptly
| Role | Contact |
|---|---|
| Maintainer | Lindoélio Lázaro |
| Security Issues | lindoelio@gmail.com |
| Date | Issue | Resolution |
|---|---|---|
| Initial | Security policy established | N/A |
- AGENTS.md - Build and test commands
- CONTRIBUTING.md - Contribution guidelines
- ARCHITECTURE.md - System architecture
- TESTING.md - Testing patterns