Initial commit

This commit is contained in:
Michael-A-Sloan committed 2026-07-28 18:03:09 -04:00
commit d9516fa359
50 files changed
+3211

No files matched your search

+17
View File
@@ -0,0 +1,17 @@
---
description: Security basics — secrets, auth, injection, and safe defaults
alwaysApply: true
---
# Security Basics
- Never commit secrets, API keys, tokens, or passwords. Use environment variables.
- Never log passwords, tokens, session IDs, or full credit card numbers.
- Parameterize all database queries. Never concatenate user input into SQL.
- Escape or sanitize user-generated content before rendering in HTML.
- Validate and whitelist file uploads: type, size, and storage path.
- Use HTTPS for all external API calls in production code paths.
- Apply least-privilege: services and DB users get only the permissions they need.
- Check authorization on every mutating endpoint — authentication alone is not enough.
- Set secure cookie flags (`HttpOnly`, `Secure`, `SameSite`) for session cookies.
- Do not disable TLS certificate verification in production code.