database-security
/database-security
Enforce database security for schema design, access control, encryption, and operational hardening. Use when building, reviewing, or auditing database schemas, connection handling, credential management, or database deployment configuration.
- Author
- redhatproductsecurity ↗
- Repository
- prodsec-skills ↗
- Licence
- Apache-2.0
- Last repository change
- 15.07.2026
Assessment and security
- Files in this package
- 1
- Scripts
- 0
- HTML comments
- 0
- URLs in SKILL.md
- 5
No signals detected. Repository changed on 15.07.2026, without references to retired models or APIs.
Apache-2.0, otwarta: można używać i zmieniać, z zachowaniem licencji i informacji o zmianach.
What it does and when to use it
Enforce database security for schema design, access control, encryption, and operational hardening. Use when building, reviewing, or auditing database schemas, connection handling, credential management, or database deployment configuration.
Original author description
Enforce database security for schema design, access control, encryption, and operational hardening. Use when building, reviewing, or auditing database schemas, connection handling, credential management, or database deployment configuration.
How it works
- Design
- Implementation
- Configuration
- Implementation Checklist
- References
SKILL.md preview
--- name: database-security description: > Enforce database security for schema design, access control, encryption, and operational hardening. Use when building, reviewing, or auditing database schemas, connection handling, credential management, or database deployment configuration. category: "secure_development" subcategory: "cloud-infrastructure" --- # Database Security ## Design ### Encryption - Encrypt all communication with the database (TLS in transit) - Encrypt the database at rest (filesystem, tablespace, or application-level encryption) ### Auditing - Enable database auditing to log accesses and configuration changes - Audit logs should capture authentication events, privilege changes, and data access patterns ### Data Integrity - Separate test databases from production databases; never share credentials between environments - Back up data regularly and document the backup and restore process - Use [polyinstantiation](https://cyberhoot.com/cybrary/polyinstantiation/) to provide multiple views of the same object, preventing unauthorized users from inferring sensitive data - Apply [database normalization](https://www.geeksforgeeks.org/normal-forms-in-dbms/) to reduce data redundancy and improve integrity - Implement triggers to enforce referential integrity, prevent invalid operations, and apply complex security rules ## Implementation ### Least-Privilege Access - Applications MUST connect with the **lowest possible level of privilege** - Use different credentials for every trust level (regular user, read-only user, guest, administrator) - Users and applications MUST use separate accounts; never share authentication between them ### Credential Management - Use secure credentials for all database access - **Never hardcode connection strings** in application code; store them in a separate configuration file on a trusted system, encrypted - Rotate credentials regularly ## Configuration ### Default Hardening - Remove or change **all default administrative passwords**; use strong passphrases or MFA - Turn off all unnecessary database functionality (stored procedures, utility packages, unnecessary services) - Remove default vendor content (sample schemas, example databases) - Install only the minimum set of features and options required (surface area reduction) ### Backend Isolation - 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 remote access is not required - 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 - Use TLS 1.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 ### 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 ## Implementation Checklist - [ ] All database connections use TLS encryption - [ ] Database storage is encrypted at rest - [ ] Auditing is enabled for access and configuration changes - [ ] Test and production databases are separated with distinct credentials - [ ] Backups are performed regularly with a documented restore process - [ ] Applications use the lowest-privilege database account - [ ] Different credentials are used per trust level (user, admin, readonly) - [ ] Connection strings are not hardcoded; they are stored encrypted on a trusted system - [ ] Default administrative passwords are changed - [ ] Unnecessary features, stored procedures, and sample schemas are removed - [ ] User accounts and application accounts are separate - [ ] Database isolated in separate network segment; no direct thick-client connections - [ ] Platform-specific hardening applied (see above) - [ ] Transaction logs stored on separate disk from main database files - [ ] Encrypted backups with tested restore procedures ## References - [Polyinstantiation](https://cyberhoot.com/cybrary/polyinstantiation/) - [Solutions to the polyinstantiation problem](https://www.comp.nus.edu.sg/~tankl/cs5322/readings/poly.pdf) - [Database normalization](https://www.geeksforgeeks.org/normal-forms-in-dbms/)
Versions
| Repository | Score | Licence |
|---|---|---|
| This page · redhatproductsecurity/prodsec-skills | 100 | Apache-2.0 |
| IbrahimCodeur/saas-blind-security | 90 | MIT |
| jeremymorgan/code-review-skills | 90 | CC0-1.0 |
Database snapshot: 13.11.2026 · package version 0a95c437fe6c (SHA-256 digest of the entire package)
Downloads in the last 30 days: 0 · ranking
Report a problem with this skill: harmful content, incorrect descriptions or an author’s removal request.
Similar skills
- 100maintainx-security-basics
Configure MaintainX API security, credential management, and access control. Use when securing API keys, implementing access controls, or hardening your MaintainX integration. Trigger with phrases like "maintainx security", "maintainx api key security", "secure maintainx",… - 90database-design
Database design principles and decision-making covering schema design, indexing strategy, ORM selection, and serverless databases. Use when designing or evaluating database schemas. - 100common-security-standards
Enforce universal security protocols for safe, resilient software. Use when implementing authentication, encryption, authorization, input validation, secret management, or any security-sensitive feature across any language or framework. - 100network-acls
Enforce network ACLs for external data source access in AI systems. Use when designing, configuring, or reviewing network security for connections between AI components and external databases or data services. - 90implementing-pam-for-database-access
Deploy privileged access management for database systems including Oracle, SQL Server, PostgreSQL, and MySQL, covering session proxy configuration, credential vaulting, query auditing, dynamic credential generation, and least-privilege database roles. Use when securing DBA… - 100designing-database-schemas
Process use when you need to work with database schema design. This skill provides schema design and migrations with comprehensive guidance and automation. Trigger with phrases like "design schema", "create migration", or "model database".