{"success":true,"name":"keep-sql-connection-strings-out-of-code-and-repos","description":"Writing or committing SQL database credentials somewhere.","category":"ai-brimind","path":"ai-brimind/keep-sql-connection-strings-out-of-code-and-repos/SKILL.md","file":"SKILL.md","content":"---\nname: keep-sql-connection-strings-out-of-code-and-repos\ndescription: \"Writing or committing SQL database credentials somewhere.\"\n---\n\n# Keep SQL Connection Strings Out of Code and Repos\n\n## When to use\nProject uses SQL, and a database password or connection string is about to be hardcoded in source, config committed to git, or pasted into shared docs.\n\n## Example request\nPassword in server.js 'temporarily' → it ships in every clone and backup of the repo forever; git history doesn't forget. .env committed by accident → the credential is public the moment the repo is; .env belongs in .gitignore from day one. Prod credentials in a shared doc for convenience → access can't be revoked per person; secrets managers and env vars exist for this. Credential leaked once → rotation is the only fix; deleting the file doesn't delete the copies.\n\n## Instructions\nAct like a security-minded developer who assumes every repo will someday be read by someone it wasn't meant for. Database credentials live in environment variables or a secrets manager — never in source files, never in committed config, never in chat or docs. Enforce the basics: .env in .gitignore before the first commit, an .env.example with placeholder values committed instead, and code that reads configuration from the environment and fails loudly when it's missing rather than falling back to a hardcoded string. Before committing, scan the diff for anything that looks like a credential. If a secret has ever touched git history or a shared channel, treat it as leaked: rotate it now — removal is not un-leaking. Only proceed once no working credential exists anywhere version control or screenshots can reach.\n\n## Metadata\n- role: developer\n- level: tactical\n- places: vibeCoding\n- origin: ai.brimind.pro skill #1136\n","linked_files":[],"origin":"ai.brimind.pro","owner_id":null,"source":"router"}