AgentsConfigHelper / rules
Cursor rule2 starsChanged 3 months agoMITView on GitHub
Data & storage security (DB isolation, TLS, least privilege, RLS/CLS, backups, auditing)
We split this codeguard-0-data-storage.mdc into the rules it gives an agent
17 rules. About 0 are common, 17 are distinctive, and 0 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈17
Distinctive · estimate
This author's own choices. Worth a look.
0
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 18
Place database server in separate DMZ isolated from application server.
- Distinctive: line 19
Never allow direct connections from thick clients to backend database.
- Distinctive: line 24
Use TLSv1.2+ with modern ciphers (AES-GCM, ChaCha20) for client connections.
- Distinctive: line 25
Verify digital certificate validity in client applications.
- Distinctive: line 26
Ensure all database traffic is encrypted, not just initial authentication.
- Distinctive: line 29
Always require authentication, including from local server connections.
- Distinctive: line 31
Use dedicated accounts per application or service.
- Distinctive: line 34
Remove accounts when applications are decommissioned.
- Distinctive: line 38
Never store credentials in application source code.
- Distinctive: line 41
Never check credential files into source code repositories.
- Distinctive: line 43
Use environment variables or secrets management solutions.
- Distinctive: line 47
Do not use built-in root, sa, or SYS accounts.
- Distinctive: line 48
Do not grant administrative rights to application accounts.
- Distinctive: line 50
Use separate databases and accounts for Development, UAT, and Production.
- Distinctive: line 52
Avoid making accounts database owners to prevent privilege escalation.
- Distinctive: line 57
Run database services under low-privileged user accounts.
- Distinctive: line 58
Remove default accounts and sample databases.
≈ “Common” is an estimate: at least 1 in 5 of the 6,350 Cursor rule files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
--- description: Data & storage security (DB isolation, TLS, least privilege, RLS/CLS, backups, auditing) globs: **/*.c,**/*.ddl,**/*.dml,**/*.h,**/*.js,**/*.jsx,**/*.mjs,**/*.sql,**/*.yaml,**/*.yml version: 1.0.1 --- rule_id: codeguard-0-data-storage ## Database Security Guidelines This rule advises on securely configuring SQL and NoSQL databases to protect against data breaches and unauthorized access: - Backend Database Protection - Isolate database servers from other systems and limit host connections. - Disable network (TCP) access when possible; use local socket files or named pipes. - Configure database to bind only on localhost when appropriate. - Restrict network port access to specific hosts with firewall rules. - Place database server in separate DMZ isolated from application server. - Never allow direct connections from thick clients to backend database. - Transport Layer Security - Configure database to only allow encrypted connections. - Install trusted digital certificates on database servers. - Use TLSv1.2+ with modern ciphers (AES-GCM, ChaCha20) for client connections. - Verify digital certificate validity in client applications. - Ensure all database traffic is encrypted, not just initial authentication. - Secure Authentication Configuration - Always require authentication, including from local server connections. - Protect accounts with strong, unique passwords. - Use dedicated accounts per application or service. - Configure minimum required permissions only. - Regularly review accounts and permissions. - Remove accounts when applications are decommissioned. - Change passwords when staff leave or compromise is suspected. - Database Credential Storage - Never store credentials in application source code. - Store credentials in configuration files outside web root. - Set appropriate file permissions for credential access. - Never check credential files into source code repositories. - Encrypt credential storage using built-in functionality when available. - Use environment variables or secrets management solutions. - Secure Permission Management - Apply principle of least privilege to all database accounts. - Do not use built-in root, sa, or SYS accounts. - Do not grant administrative rights to application accounts. - Restrict account connections to allowed hosts only. - Use separate databases and accounts for Development, UAT, and Production. - Grant only required permissions (SELECT, UPDATE, DELETE as needed). - Avoid making accounts database owners to prevent privilege escalation. - Implement table-level, column-level, and row-level permissions when needed. - Database Configuration and Hardening - Install required security updates and patches regularly. - Run database services under low-privileged user accounts. - Remove default accounts and sample databases. - Store transaction logs on separate disk from main database files. - Configure regular encrypted database backups with proper permissions. - Disable unnecessary stored procedures and dangerous features. - Implement database activity monitoring and alerting. - Platform-Specific Hardening - SQL Server: Disable xp_cmdshell, CLR execution, SQL Browser service, Mixed Mode Authentication (unless required). - MySQL/MariaDB: Run mysql_secure_installation, disable FILE privilege for users. - PostgreSQL: Follow PostgreSQL security documentation guidelines. - MongoDB: Implement MongoDB security checklist requirements. - Redis: Follow Redis security guide recommendations. Summary: Isolate database systems, enforce encrypted connections, implement strong authentication, store credentials securely using secrets management, apply least privilege permissions, harden database configurations, and maintain regular security updates and monitoring.
Where files are headingNew Cursor rule files have more rules about planning and tracking tasks, and fewer about code style.
Of the Cursor rule files we read, the 3,978 first seen in the last six months, against the older ones: the kind of rule that gained most share, and the kind that lost most. About files like this in general, not this one, and an estimate, since a kind is a pattern in the words.
In this repository24 other files it gives its agents.
- AGENTS.mdAGENTS.md
- CLAUDE.mdCLAUDE.md
- .github/copilot-instructions.mdCopilot instructions
- .cursor/rules/codeguard-0-additional-cryptography.mdcCursor rule
- .cursor/rules/codeguard-0-api-web-services.mdcCursor rule
- .cursor/rules/codeguard-0-authentication-mfa.mdcCursor rule
- .cursor/rules/codeguard-0-authorization-access-control.mdcCursor rule
- .cursor/rules/codeguard-0-client-side-web-security.mdcCursor rule
- .cursor/rules/codeguard-0-cloud-orchestration-kubernetes.mdcCursor rule
- .cursor/rules/codeguard-0-devops-ci-cd-containers.mdcCursor rule
- .cursor/rules/codeguard-0-file-handling-and-uploads.mdcCursor rule
- .cursor/rules/codeguard-0-framework-and-languages.mdcCursor rule
- .cursor/rules/codeguard-0-iac-security.mdcCursor rule
- .cursor/rules/codeguard-0-input-validation-injection.mdcCursor rule
- .cursor/rules/codeguard-0-logging.mdcCursor rule
- .cursor/rules/codeguard-0-mobile-apps.mdcCursor rule
- .cursor/rules/codeguard-0-privacy-data-protection.mdcCursor rule
- .cursor/rules/codeguard-0-safe-c-functions.mdcCursor rule
- .cursor/rules/codeguard-0-session-management-and-cookies.mdcCursor rule
- .cursor/rules/codeguard-0-supply-chain-security.mdcCursor rule
- .cursor/rules/codeguard-0-xml-and-serialization.mdcCursor rule
- .cursor/rules/codeguard-1-crypto-algorithms.mdcCursor rule
- .cursor/rules/codeguard-1-digital-certificates.mdcCursor rule
- .cursor/rules/codeguard-1-hardcoded-credentials.mdcCursor rule
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

