Back to skill

Security audit

DBA多AI协作系统

Security checks for vulnerabilities and agentic risk

Overview

This DBA assistant is mostly purpose-aligned, but it automatically stores database environment details and task history in local memory files without clear consent, retention, or sensitive-data limits.

Review before installing. Use this skill only in workspaces where persisted DBA context is acceptable, and avoid sharing passwords, connection strings, hostnames, incident details, production topology, query results, or other confidential data unless the memory behavior is disabled or tightly controlled.

Vulnerability Patterns
  • Insecure Skill Coding PracticesFinds exploitable flaws such as hardcoded secrets or command injection
  • Skill Instruction HijackingAlters the agent's session goals or safety constraints when the skill loads
  • Agent Memory PoisoningWrites attacker-controlled rules into memory that affect later sessions
  • Remote Payload Retrieval and ExecutionFetches external code whose behavior can change after review
  • Embedded Malicious CodeShips malicious scripts inside the skill and executes them locally
Findings (1)

T09 · Insecure Skill Coding Practices

Warning
Location
SKILL.md:51
Finding
Automatic Plaintext Persistence of Sensitive Database Context## Vulnerability Details **File Location**: `SKILL.md`, lines 51–71 **Vulnerability Type**: Automatic storage of potentially sensitive operational information in plaintext files **Risk Level**: Medium ### Vulnerable Code Snippet The following is an English translation of the relevant source instructions: ```markdown ## Memory Mechanism **Automatic memory is enabled** - **Environment information**: Automatically save database environment details when first provided by the user - **Historical tasks**: Automatically record every completed task - **User preferences**: Remember the user's preferences ### Memory Storage Location memory/ ├── env.json # User environment information ├── history.json # Historical task records └── preferences.json # User preference settings ### Automatic Memory Rules 1. **At session start**: Read the memory directory and obtain user history 2. **When a new database is mentioned**: Automatically add it to env.json 3. **After completing a task**: Automatically record it in history.json 4. **When user preferences change**: Automatically update preferences.json ``` ### Technical Analysis The Skill instructs the agent to collect database environment information, completed-task history, and user preferences automatically and persist them in JSON files. DBA conversations commonly include sensitive operational information such as production database versions, host identifiers, topology, replication configuration, incident details, backup arrangements, and security settings. The instructions do not define: - Explicit user consent before persistence - A data-minimization or allowlist policy - Redaction of credentials, connection strings, tokens, query contents, or personal data - File permission requirements - Per-user or per-tenant storage isolation - Retention limits or expiration - Secure deletion procedures - Encryption at rest - Controls governing which later sessions may reload the information Although the files d ...[truncated 2101 chars]
Remediation
## Remediation Suggestions 1. Disable automatic persistence by default and require explicit, informed user opt-in. 2. Define a strict allowlist of fields that may be retained, such as database product and major version only. 3. Explicitly prohibit storing passwords, tokens, private keys, connection strings, personal data, raw queries, query results, host addresses, and confidential incident evidence. 4. Display the exact information proposed for storage and obtain confirmation before writing it. 5. Store each user's data in an isolated location and prevent memory from being shared across users or tenants. 6. Apply restrictive filesystem permissions, such as owner-only read and write access, when creating memory files. 7. Encrypt sensitive persisted data at rest using runtime-managed keys rather than keys stored in the project. 8. Introduce configurable retention periods, automatic expiration, and a user-accessible command for reviewing and deleting retained data. 9. Sanitize stored values and treat reloaded memory as untrusted data rather than executable instructions. 10. Record only minimal structured metadata in task history instead of complete prompts, outputs, SQL statements, or operational logs. 11. Gracefully handle the currently absent `memory/` directory and ensure files are created securely without unsafe permissions or symbolic-link traversal.
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Trigger AbuseOverly Broad Trigger, Shadow Command Trigger, Keyword Baiting Trigger
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
  • Supply ChainUnpinned Dependencies, External Script Fetching, Obfuscated Code
Findings (3)

Vague Triggers

Medium
Confidence
96% confidence
Finding
The skill is defined to trigger on essentially any database-related request, which is overly broad for a powerful multi-agent DBA workflow. Broad activation increases the chance the skill handles sensitive operational tasks unnecessarily, causing unintended persistence, delegation, or disclosure of database details in contexts where a narrower tool should have been used.

Missing User Warnings

Medium
Confidence
96% confidence
Finding
The skill states that user environment data, task history, and preferences are automatically stored, but it does not provide explicit notice, consent, retention limits, or guidance on sensitive data handling. In a DBA context, these records may contain production architecture, versioning, incident history, and operational preferences that materially increase privacy and security exposure if retained or surfaced later.

Ssd 3

Medium
Confidence
97% confidence
Finding
The automatic memory rules instruct the agent to persist user-provided environment information and historical tasks across sessions, creating a real cross-session data retention and leakage risk. Because this is a DBA skill, the retained data is likely to include highly sensitive operational metadata about production databases, making accidental reuse, overexposure in later conversations, or unauthorized access more damaging.

Static analysis

No suspicious patterns detected.