Back to skill

Security audit

PostgreSQL Skill - 高级数据库管理

Security checks for vulnerabilities and agentic risk

Overview

This is a disclosed PostgreSQL helper skill with expected database-administration examples, but users should treat restore and mutation commands carefully.

Install only if you want a Chinese-language PostgreSQL administration helper. Review any sudo package-install command before running it, avoid putting real passwords into shared prompts or logs, and verify database name, environment, backup provenance, and rollback plan before running UPDATE, CREATE INDEX, pg_restore, or other production-impacting commands.

Vulnerability Patterns
  • 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
  • Unauthorized Access and Privilege EscalationObtains permissions beyond the task's legitimate needs
Vulnerability Patterns
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
  • Tool MisuseTool Parameter Abuse, Chaining Abuse, Unsafe Defaults
  • Trigger AbuseOverly Broad Trigger, Shadow Command Trigger, Keyword Baiting Trigger
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
Findings (8)

Chaining Abuse

High
Category
Tool Misuse
Confidence
86% confidence
Finding

The command chains multiple privileged operations with '&&', causing sequential execution under a single copy-paste action. This increases the chance that users execute a broad privileged command bundle without review, and makes it easier to hide or append unsafe behavior in agent-managed installation flows.

Content

Scanner excerpt · package.json (reported line 28)May include surrounding context.

json
"kind": "system",
        "label": "Install PostgreSQL Client",
        "commands": {
          "ubuntu": "sudo apt update && sudo apt install -y postgresql-client",
          "macos": "brew install libpq"
        }
      }

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
92% confidence
Finding

The activation description is broad enough to trigger on generic database or query-related requests, which can route users into a powerful PostgreSQL administration skill unnecessarily. In context, this increases the chance of the agent generating or suggesting database-admin actions, including destructive SQL or operational commands, when the user did not explicitly request PostgreSQL-specific help.

Content

No source excerpt is available for this finding.

Sudo/Root Execution

Medium
Category
Privilege Escalation
Confidence
70% confidence
Finding

Commands invoke sudo or root privileges. Verify this elevated access is necessary and justified.

Content

Scanner excerpt · SKILL.md (reported line 49)May include surrounding context.

Ubuntu/Debian:

bash
sudo apt update
sudo apt install postgresql-client

Sudo/Root Execution

Medium
Category
Privilege Escalation
Confidence
70% confidence
Finding

Commands invoke sudo or root privileges. Verify this elevated access is necessary and justified.

Content

Scanner excerpt · SKILL.md (reported line 50)May include surrounding context.

Ubuntu/Debian:

bash
sudo apt update
sudo apt install postgresql-client

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
91% confidence
Finding

The skill provides backup and especially restore commands without clearly warning that restore operations can overwrite data, alter target databases, or cause service disruption. In a database administration skill, omission of impact warnings is dangerous because users may run destructive recovery commands against production systems without understanding the consequences.

Content

No source excerpt is available for this finding.

Sudo/Root Execution

Medium
Category
Privilege Escalation
Confidence
89% confidence
Finding

The install command explicitly invokes sudo to perform system package installation, which requires elevated privileges and modifies the host environment. In an agent/skill ecosystem, privileged install steps increase risk because users may run them without fully understanding the trust implications, and any compromise of the package source or install flow would execute with root permissions.

Content

Scanner excerpt · package.json (reported line 28)May include surrounding context.

json
"kind": "system",
        "label": "Install PostgreSQL Client",
        "commands": {
          "ubuntu": "sudo apt update && sudo apt install -y postgresql-client",
          "macos": "brew install libpq"
        }
      }

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
77% confidence
Finding

The skill description and all usage guidance are presented only in Chinese, and examples such as the full-text search section are tailored to Chinese without any opt-in or language-selection note. This can violate language or locale policy when a skill effectively forces a specific language for all users.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
94% confidence
Finding

The package description is written entirely in Chinese, which indicates a language-specific skill presentation without any indication that users can choose another language or opt in to that locale. The stated policy flags language or locale constraints when they are imposed without user choice or clear justification.

Content

No source excerpt is available for this finding.

Static analysis

No suspicious patterns detected.