Back to skill

Security audit

MongoDB Skill - 灵活的文档数据库管理

Security checks for vulnerabilities and agentic risk

Overview

This is a coherent MongoDB helper skill, but users should review generated database write, restore, and install commands before running them.

Install only if you want a Chinese-language MongoDB assistant. Review all generated MongoDB commands before running them, especially updateMany, restore, transaction, dropIndex, and backup/restore operations, and prefer least-privilege database credentials plus a tested backup. Consider installing dependencies in an isolated environment and pinning PyMongo yourself if reproducibility matters.

Vulnerability Patterns
  • Insecure DependenciesIntroduces malicious components through unsafe dependency sources
  • 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)

T08 · Insecure Dependencies

Warning
Location
package.json:19
Finding

Unpinned PyMongo Dependency Permits Unreviewed Package Installation

Content
View full analysis
Remediation
View remediation
", "label": "Install PyMongo" } ``` 2. Update the documentation to install the same reviewed version: ```bash python -m pip install "pymongo==" ``` 3. Maintain a locked requirements file containing exact versions for PyMongo and all relevant transitive dependencies. 4. Require artifact hashes during installation, such as through a hash-locked requirements file and `pip install --require-hashes`. 5. Use only trusted package indexes, disable unintended fallback indexes, and review CI or local configuration for attacker-controlled `index-url` or `extra-index-url` settings. 6. Perform dependency updates through a controlled review process that includes vulnerability scanning, changelog review, and regeneration of approved hashes. 7. Install dependencies in an isolated virtual environment under a non-privileged account rather than using administrator or root privileges. ]]>
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
83% confidence
Finding

The use of command chaining (apt update && sudo apt install) encourages users or tooling to execute multiple privileged operations as a single step, reducing opportunities to inspect intermediate results or failures. In skill installation context, this makes accidental or malicious modification of the command more dangerous because it is likely to be copied and run wholesale.

Content

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

json
"kind": "system",
        "label": "Install MongoDB Client",
        "commands": {
          "ubuntu": "sudo apt update && sudo apt install -y mongodb-clients",
          "macos": "brew install mongodb-community-shell"
        }
      },

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The trigger description is broad enough to activate on generic database or NoSQL discussions, which can cause the skill to take over conversations not explicitly requesting MongoDB. In an agent setting, over-broad routing can lead to inappropriate generation of MongoDB-specific commands, including writes or administrative actions, in the wrong context.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
83% confidence
Finding

The natural-language descriptions, examples, and invocation guidance are entirely in Chinese, which signals a fixed language expectation for the skill. There is no statement that the user may choose another language, nor any justification that this is a China-specific or Chinese-only skill.

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 53)May include surrounding context.

Ubuntu/Debian:

bash
sudo apt update
sudo apt install mongodb-clients

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 54)May include surrounding context.

Ubuntu/Debian:

bash
sudo apt update
sudo apt install mongodb-clients

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The skill provides direct examples for update, backup, and restore workflows without prominent warnings that these actions can modify, overwrite, or destroy production data. In an agent workflow, this increases the chance that a user request is translated into irreversible commands without confirmation, dry-run steps, or environment checks.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
94% confidence
Finding

The package description is written entirely in Chinese and presents the skill as operating through natural language, but it does not indicate that language is optional or limited to a specific regional context. This can violate a language/locale policy when users are not given an explicit language choice or opt-in.

Content

No source excerpt is available for this finding.

Sudo/Root Execution

Medium
Category
Privilege Escalation
Confidence
88% confidence
Finding

The install command instructs users to run package installation with sudo, which grants elevated privileges to a network-dependent package management operation. While common for system package installs, embedding privileged commands in skill metadata increases risk if repositories are compromised, commands are modified, or users execute them without review.

Content

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

json
"kind": "system",
        "label": "Install MongoDB Client",
        "commands": {
          "ubuntu": "sudo apt update && sudo apt install -y mongodb-clients",
          "macos": "brew install mongodb-community-shell"
        }
      },

Static analysis

No suspicious patterns detected.