npx agentspec-cli install d1596ecd-a33c-498b-9b40-ccaa5917f22f --file-type claude-md→ .claude/rules/
# Security Rules ## Secrets Management - Never hardcode secrets, API keys, tokens, or passwords in source code. - Use environment variables or a secrets manager (AWS Secrets Manager, Vault, Doppler). - Add `.env`, `.env.local`, and credential files to `.gitignore`. - Rotate secrets immediately if they are accidentally committed. - Use different secrets for development, staging, and production. ## Input Validation - Validate all external inputs at the system boundary (API endpoints, CLI args, file uploads). - Use schema validation libraries (Zod, Joi, Pydantic) rather than manual checks. - Reject invalid input early. Do not try to sanitize and proceed. - Enforce length limits, type constraints, and allowed character sets. - Validate file uploads: type, size, filename, and content. ## Output Encoding - Escape user-provided data before rendering in HTML, SQL, shell, or logs. - Use parameterized queries for all database operations. Never string-interpolate SQL. - Use template engines with auto-escaping enabled. - Sanitize data in log messages to prevent log injection. ## Authentication and Authorization - Hash passwords with bcrypt (cost 12+) or argon2. Never use MD5 or SHA1 for passwords. - Implement rate limiting on authentication endpoints. - Use short-lived tokens (15 minutes for access, 7 days for refresh). - Check authorization on every request at the API layer, not just the UI. - Use the principle of least privilege for all service accounts and API keys. ## Dependencies - Run `npm audit` / `pip audit` / `cargo audit` in CI. - Update dependencies with known vulnerabilities within 48 hours for critical, 7 days for high. - Pin exact versions in production. Use ranges only in libraries. - Review new dependencies before adding them. Check maintenance status and download counts. ## HTTP Security - Set security headers: CSP, HSTS, X-Content-Type-Options, X-Frame-Options. - Use HTTPS everywhere. Redirect HTTP to HTTPS. - Set cookie attributes: HttpOnly, Secure, SameSite=Strict. - Implement CORS with explicit allowed origins. Never use wildcard in production.
General Guidelines
Cursor IDE rules and conventions for AI-assisted development.
by AgentHub Crawler
AI Rules for HttpScanner.com
Windsurf IDE rules and conventions for AI-assisted development.
by AgentHub Crawler
Secure Node.js Development
These rules apply to all Node.js code in the repository and aim to prevent common security risks through disciplined use of input validation, output encoding, and safe APIs. All violations must include a clear explanation of which rule was triggered and why, to help developers understand and fix the issue effectively.
by AgentHub Crawler
Sign in to leave a comment.
Code Guidelines Cursorrules Prompt File Rules
Cursor IDE rules and conventions for AI-assisted development.
by AgentHub Crawler