Database Security logo

Database Security

Community
Omar-Obando
database-security

Use when implementing database security controls, encryption, access control, audit logging, compliance, and database hardening. Includes data masking, row-level security, encryption at rest and in transit, and database security best practices. Based on CISSP, CDP certifications.

Overview

PublisherOmar-Obando
Repositoryqwen-orchestrator
Skill namedatabase-security
Stars
53
Forks
13
Bundled files
Instructions only
LicenseMIT
Links
  • Markdown instructions

    A SKILL.md file the model loads on demand, so it only costs tokens when a request actually matches.

  • Works with any LLM

    AI skills are plain Markdown, not provider-specific code, so this works with GPT, Claude, Gemini, Grok, or a local model.

  • Self-contained

    Everything the model needs lives in the instructions — no extra files to sync.

  • Open source

    Published by Omar-Obando on GitHub. Read the source before you install it.

Installation

Install the Database Security AI skill in TypingMind to use it with any LLM, or drop it into another agent that reads SKILL.md.

1

Install in TypingMind

TypingMind installs a skill straight from its GitHub folder — it reads SKILL.md, bundles the resource files, and stores the result locally.

  1. Open the app and go to Plugins → Skills.
  2. Choose "Install from GitHub".
  3. Paste the skill folder URL below and confirm.
    https://github.com/Omar-Obando/qwen-orchestrator/tree/main/skills/database-security
  4. Enable the skill in any chat where you want it available.
Plugins → Skills → Add skill → From GitHub URL, then paste the folder URL and press Continue.
2

Install in another agent

Any agent that reads the Agent Skills format can use this skill — copy the folder into that agent's skills directory.

Claude Code — .claude/skills
git clone --depth 1 https://github.com/Omar-Obando/qwen-orchestrator.git /tmp/qwen-orchestrator
mkdir -p .claude/skills
cp -r /tmp/qwen-orchestrator/skills/database-security .claude/skills/database-security
Restart Claude Code after copying so it picks up the new skill.

Use it in TypingMind

Enable Database Security in any TypingMind chat and the model takes it from there. Its name and description sit in the system prompt, and the moment a request matches, the model loads the full instructions itself — you never invoke it by hand, and it costs no tokens until it is actually used.

The model loads Database Security on its own as soon as a request matches it.

Works with any AI model

AI skills are plain Markdown instructions rather than provider-specific code, so Database Security is not tied to the model it was written for. Install it once in TypingMind and use it with GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama, or a local model you run yourself — all on your own API keys.

  • Loaded only when it is needed

    The system prompt carries just the name and description. The instructions are fetched on the first matching request, so an idle skill costs nothing.

  • Switch models mid-chat

    Because the skill is instructions rather than code, changing model does not break it — the next model reads the same SKILL.md.

Skill instructions

This is the SKILL.md content the model loads. Read it before installing — a skill is instructions your model will follow.

Database Security Skill — Database Architect

Overview

This skill provides comprehensive guidance for implementing database security controls. It covers encryption, access control, audit logging, compliance, data masking, row-level security, and database hardening following CISSP and CDP certifications.

When to Use

Use this skill when:

  • Implementing database encryption
  • Setting up access control and RBAC
  • Creating audit logging for databases
  • Ensuring compliance (GDPR, HIPAA, PCI-DSS)
  • Implementing data masking
  • Setting up row-level security
  • Encrypting data at rest
  • Encrypting data in transit
  • Implementing database hardening
  • Setting up database monitoring
  • Creating database security policies
  • Implementing database firewalls
  • Setting up database activity monitoring
  • Implementing secret management
  • Setting up database backups securely
  • Implementing database patch management
  • Creating database security documentation
  • Implementing database vulnerability scanning
  • Setting up database security alerts
  • Implementing database access review
  • Creating database security training
  • Implementing database security testing
  • Setting up database security governance
  • Implementing database security architecture

Do NOT use this skill when:

  • Writing application business logic (use domain-driven skill)
  • Designing database schemas (use database-design skill)
  • Writing API endpoint specifications (use api-design skill)
  • Performing security audits (use security-auditor skill)
  • Writing SQL queries (use sql-best-practices skill)
  • Designing multi-page website layouts (use design-system skill)
  • Analyzing deployment configurations (use deployment skill)
  • Writing documentation (use documentation-best-practices skill)

Database Security Controls

Encryption

┌─────────────────────────────────────────────────────────────┐
│              Database Encryption                            │
├─────────────────────────────────────────────────────────────┤
│  Encryption at Rest:                                        │
│  - Database-level encryption                                │
│  - Table-level encryption                                   │
│  - Column-level encryption                                  │
│  - Filesystem-level encryption                              │
│                                                              │
│  Encryption in Transit:                                     │
│  - TLS for database connections                             │
│  - SSL certificates                                         │
│  - Certificate validation                                   │
│  - Certificate pinning                                      │
│                                                              │
│  Encryption Keys:                                           │
│  - Key management service                                   │
│  - Key rotation                                             │
│  - Key access control                                       │
│  - Key audit logging                                        │
└─────────────────────────────────────────────────────────────┘

Access Control

┌─────────────────────────────────────────────────────────────┐
│              Access Control Models                          │
├─────────────────────────────────────────────────────────────┤
│  Role-Based Access Control (RBAC):                          │
│  - Roles: admin, developer, readonly, auditor              │
│  - Permissions: CRUD, DDL, DCL                              │
│  - Role hierarchy                                           │
│                                                              │
│  Row-Level Security (RLS):                                  │
│  - Per-row access control                                   │
│  - Tenant isolation                                         │
│  - Data segmentation                                        │
│                                                              │
│  Column-Level Security:                                     │
│  - Column masking                                           │
│  - Column encryption                                        │
│  - Column access control                                    │
└─────────────────────────────────────────────────────────────┘

Audit Logging

Audit Log Schema

sql
-- Audit log table
CREATE TABLE audit_log (
    id SERIAL PRIMARY KEY,
    user_id UUID,
    action VARCHAR(50),
    table_name VARCHAR(100),
    record_id UUID,
    old_values JSONB,
    new_values JSONB,
    ip_address INET,
    user_agent TEXT,
    timestamp TIMESTAMPTZ DEFAULT NOW()
);

-- Audit trigger function
CREATE OR REPLACE FUNCTION audit_trigger()
RETURNS TRIGGER AS $$
BEGIN
    IF TG_OP = 'INSERT' THEN
        INSERT INTO audit_log (user_id, action, table_name, record_id, new_values)
        VALUES (current_user_id(), 'INSERT', TG_TABLE_NAME, NEW.id, to_jsonb(NEW));
        RETURN NEW;
    ELSIF TG_OP = 'UPDATE' THEN
        INSERT INTO audit_log (user_id, action, table_name, record_id, old_values, new_values)
        VALUES (current_user_id(), 'UPDATE', TG_TABLE_NAME, NEW.id, to_jsonb(OLD), to_jsonb(NEW));
        RETURN NEW;
    ELSIF TG_OP = 'DELETE' THEN
        INSERT INTO audit_log (user_id, action, table_name, record_id, old_values)
        VALUES (current_user_id(), 'DELETE', TG_TABLE_NAME, OLD.id, to_jsonb(OLD));
        RETURN OLD;
    END IF;
    RETURN NULL;
END;
$$ LANGUAGE plpgsql;

Audit Log Retention

┌─────────────────────────────────────────────────────────────┐
│              Audit Log Retention                            │
├─────────────────────────────────────────────────────────────┤
│  Compliance Requirements:                                   │
│  - GDPR: 1 year                                             │
│  - HIPAA: 6 years                                           │
│  - PCI-DSS: 1 year                                          │
│  - SOX: 7 years                                             │
│                                                              │
│  Retention Strategy:                                        │
│  - Hot storage: 90 days (fast access)                      │
│  - Warm storage: 1 year (compressed)                       │
│  - Cold storage: 7 years (archived)                        │
│  - Destruction: Secure deletion with audit                 │
└─────────────────────────────────────────────────────────────┘

Data Masking

Dynamic Data Masking

sql
-- Mask credit card numbers
ALTER TABLE customers
ALTER COLUMN credit_card ADD MASKED FUNCTION =
    'partial(4,"XXXX-XXXX-XXXX-",4)';

-- Mask email addresses
ALTER TABLE customers
ALTER COLUMN email ADD MASKED FUNCTION =
    'email()';

-- Mask phone numbers
ALTER TABLE customers
ALTER COLUMN phone ADD MASKED FUNCTION =
    'partial(3,"XXX-XXX-",4)';

-- Mask social security numbers
ALTER TABLE customers
ALTER COLUMN ssn ADD MASKED FUNCTION =
    'partial(0,"XXX-XX-",4)';

Static Data Masking

sql
-- Mask data in development environment
UPDATE users
SET email = CONCAT('user', id, '@example.com'),
    phone = CONCAT('555-555-', LPAD(id::text, 4, '0')),
    ssn = CONCAT('XXX-XX-', LPAD(id::text, 4, '0'));

Compliance Frameworks

GDPR Compliance

┌─────────────────────────────────────────────────────────────┐
│              GDPR Compliance                                │
├─────────────────────────────────────────────────────────────┤
│  Data Protection Requirements:                              │
│  - Data minimization                                        │
│  - Purpose limitation                                       │
│  - Data accuracy                                            │
│  - Storage limitation                                       │
│  - Integrity and confidentiality                            │
│  - Accountability                                           │
│                                                              │
│  Rights Implementation:                                     │
│  - Right to access                                          │
│  - Right to rectification                                   │
│  - Right to erasure (right to be forgotten)                │
│  - Right to restriction of processing                       │
│  - Right to data portability                                │
│  - Right to object                                          │
│                                                              │
│  Documentation:                                             │
│  - Data protection impact assessments                       │
│  - Records of processing activities                         │
│  - Data processing agreements                               │
└─────────────────────────────────────────────────────────────┘

PCI-DSS Compliance

┌─────────────────────────────────────────────────────────────┐
│              PCI-DSS Compliance                             │
├─────────────────────────────────────────────────────────────┤
│  Requirement 3: Protect stored cardholder data              │
│  - Encrypt stored cardholder data                           │
│  - Use strong cryptography                                  │
│  - Secure key management                                    │
│                                                              │
│  Requirement 7: Restrict access to cardholder data          │
│  - Role-based access control                                │
│  - Least privilege principle                                │
│  - Access review and certification                          │
│                                                              │
│  Requirement 10: Track and monitor all access             │
│  - Audit logging                                            │
│  - Log management                                           │
│  - Log review and analysis                                  │
└─────────────────────────────────────────────────────────────┘

Database Hardening

Hardening Checklist

┌─────────────────────────────────────────────────────────────┐
│              Database Hardening Checklist                   │
├─────────────────────────────────────────────────────────────┤
│  Configuration:                                             │
│  [ ] Remove default accounts                                │
│  [ ] Change default passwords                               │
│  [ ] Disable unused features                                │
│  [ ] Configure secure settings                              │
│  [ ] Enable logging                                         │
│                                                              │
│  Network:                                                   │
│  [ ] Use firewalls                                          │
│  [ ] Enable TLS                                             │
│  [ ] Restrict IP access                                     │
│  [ ] Use VPN for remote access                              │
│                                                              │
│  Authentication:                                            │
│  [ ] Use strong passwords                                   │
│  [ ] Enable MFA                                             │
│  [ ] Use certificate authentication                         │
│  [ ] Implement account lockout                              │
│                                                              │
│  Monitoring:                                                │
│  [ ] Enable audit logging                                   │
│  [ ] Set up alerts                                          │
│  [ ] Monitor for anomalies                                  │
│  [ ] Regular security reviews                               │
└─────────────────────────────────────────────────────────────┘

Real-World Impact

Before this skill:

  • Unencrypted sensitive data
  • Weak access controls
  • No audit logging
  • Compliance violations
  • Data breaches

After this skill:

  • Encrypted data at rest and in transit
  • Proper access controls
  • Comprehensive audit logging
  • Full compliance
  • Secure database infrastructure

Cross-References

  • database-design - For database schema design
  • security-auditor - For security audits
  • devops-pipeline - For secure database deployments

References

Frequently asked questions

What does the Database Security AI skill do?

Use when implementing database security controls, encryption, access control, audit logging, compliance, and database hardening. Includes data masking, row-level security, encryption at rest and in transit, and database security best practices. Based on CISSP, CDP certifications.

Why use Database Security on TypingMind?

Because you install it once and use it with any model. Database Security is plain Markdown rather than provider-specific code, so the same skill runs on GPT-5, Claude, Gemini, Grok, or a local model — and you can switch model mid-chat without it breaking. TypingMind runs on your own API keys, so you pay providers directly instead of a per-seat subscription, and your skills and chats stay in your own storage.

How do I install Database Security in TypingMind?

Open Plugins → Skills → Install from GitHub in TypingMind and paste https://github.com/Omar-Obando/qwen-orchestrator/tree/main/skills/database-security. TypingMind reads its SKILL.md and installs it as a skill you can enable per chat.

Which AI models can use Database Security?

Any model you connect in TypingMind. AI skills are plain Markdown instructions rather than provider-specific code, so GPT, Claude, Gemini, Grok, and local models can all load this skill when a request matches it.

How many AI models can I use with Database Security?

As many as you like. As long as a model supports skills, you can use Database Security with it — GPT, Claude, Gemini, Grok, DeepSeek, Mistral, Llama and more — all on TypingMind with your own API keys.

Is the Database Security AI skill free?

Yes. It is published on GitHub by Omar-Obando under the MIT license. You only pay your own AI provider for the tokens you use.

What are AI skills?

An AI skill is a reusable instruction bundle that teaches an AI model how to do one specific task. It follows the open Agent Skills format: a SKILL.md file with a name and description, plus any scripts, templates or reference files the model may need. The model reads the instructions only when your request matches the skill, so an installed skill costs nothing until it is used.

How are AI skills different from plugins or MCP servers?

A plugin or MCP server gives a model new tools to call — code that runs somewhere and returns a result. An AI skill gives the model knowledge and process instead: how to approach a task, which steps to follow, what good output looks like. Skills are plain Markdown, so they need no server, no API key and no runtime, and they work with any model.

View all

Set up your own AI workspace now

Get notified about new features and future giveaways by subscribing to our newsletter 👇