Back to skill

Security audit

Agentic Beehive MCP Server

Security checks for vulnerabilities and agentic risk

Overview

The skill mostly matches its stated MCP coordination purpose, but it lets callers make the server contact arbitrary registered URLs, which needs review before installation.

Install only if you are comfortable running an MCP server that can store local coordination state and make outbound HTTP requests to endpoints registered through its tools. Run it in a restricted environment or network sandbox, and review or constrain allowed colony endpoints before exposing it to agents or users.

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

T09 · Insecure Skill Coding Practices

Error
Location
server.py:248
Finding
Unrestricted Colony Endpoint Polling Enables Blind SSRF## Vulnerability Details **File Location**: `server.py:248-313` **Vulnerability Type**: Server-Side Request Forgery (SSRF) **Risk Level**: High The server accepts an arbitrary colony endpoint, stores it without validation, and later issues an HTTP GET request to that endpoint from the server's network context. ```python @mcp.tool() def colony_register(name: str, colony_type: str, endpoint: str = "", metadata: str = "{}") -> dict: """Register a new external colony. Args: name: Colony name colony_type: Colony type endpoint: Connection address metadata: Additional JSON metadata """ TYPE_MAP = { "hive": "Another hive", "flower_field": "Data source", "manuka_grove": "Specialist knowledge", "river": "Streaming information", } if colony_type not in TYPE_MAP: return {"error": f"Invalid type {colony_type}"} db = get_db() now = datetime.now(timezone.utc).isoformat() try: meta = json.loads(metadata) except json.JSONDecodeError: meta = {} db.execute( "INSERT OR REPLACE INTO colonies " "(name, type, endpoint, status, last_poll, metadata) " "VALUES (?, ?, ?, 'registered', ?, ?)", (name, colony_type, endpoint, now, json.dumps(meta, ensure_ascii=False)) ) db.execute( "INSERT INTO evolution_log " "(action, target, detail, created_at) VALUES (?, ?, ?, ?)", ( "colony_register", name, json.dumps( {"type": colony_type, "endpoint": endpoint}, ensure_ascii=False ), now ) ) db.commit() db.close() return { "registered": name, "type": colony_type, "display": TYPE_MAP[colony_type], "endpoint": endpoint, } @mcp.tool() def colony_poll(name: str) -> dict: """Probe the status of an external colony.""" db = get_db() row = db.execu ...[truncated 3306 chars]
Remediation
## Remediation Suggestions 1. Permit only explicitly required URL schemes, preferably `https`. 2. Maintain an explicit allowlist of approved destination hostnames and ports. 3. Resolve destination hostnames before making requests and reject every address that is loopback, private, link-local, reserved, multicast, or unspecified. 4. Explicitly block known cloud metadata destinations, including link-local metadata addresses. 5. Disable redirects unless necessary. If redirects are required, resolve and validate every redirect target before following it. 6. Protect against DNS rebinding by connecting only to the validated resolved address while preserving the intended TLS hostname. 7. Apply outbound firewall or proxy rules so the process cannot reach loopback, private networks, or metadata services unless explicitly required. 8. Require authorization for colony registration and polling operations. 9. Return a generic failure status rather than exception-type and HTTP-status distinctions that improve the network-scanning oracle. 10. Add tests covering encoded IP addresses, IPv6, redirects, user-info URL syntax, alternate ports, mixed-case schemes, and DNS rebinding scenarios.

T08 · Insecure Dependencies

Warning
Location
SKILL.md:22
Finding
Unpinned Third-Party Dependency Installation## Vulnerability Details **File Location**: `SKILL.md:22` **Vulnerability Type**: Unpinned Supply-Chain Dependency **Risk Level**: Medium The documented installation process installs the latest available `fastmcp` package without an exact version or integrity hash. ```bash # Create a Python virtual environment cd ~/.openclaw/workspace/skills/skills/agentic-beehive-mcp python3 -m venv .venv source .venv/bin/activate pip install fastmcp ``` ### Technical Analysis The command `pip install fastmcp` performs mutable dependency resolution. The version of `fastmcp`, its transitive dependencies, and potentially their build-time behavior can change without any modification to this project. No lock file, exact version constraint, package hash, or explicitly trusted package index is provided. This prevents reproducible installation and means that code not reviewed during this audit may later be installed and executed. This finding does not establish that the current `fastmcp` package is malicious. The risk arises from trusting an unpinned and mutable dependency graph. ### Attack Path 1. A user follows the installation instructions in `SKILL.md`. 2. `pip` queries the configured package index and resolves the versions available at installation time. 3. A compromised upstream release, compromised transitive dependency, maliciously configured package index, or unsafe future release is selected. 4. Package build or installation logic may execute in the user's environment. 5. The installed dependency subsequently runs whenever `server.py` starts, with the permissions and network access of the MCP server process. ### Impact Assessment The resulting privileges are those of the user running `pip` and the MCP server. A malicious dependency could potentially: - Read or modify files accessible to that user. - Access environment variables and locally available credentials. - Make network requests using the host's connectivity. - Alter MCP server behavior or tool results. - ...[truncated 207 chars]
Remediation
## Remediation Suggestions 1. Create a reviewed dependency lock file containing exact versions for `fastmcp` and all transitive dependencies. 2. Include cryptographic hashes and install with a command such as: ```bash python -m pip install --require-hashes -r requirements.txt ``` 3. Specify and document the trusted Python package index rather than relying on an unspecified environment configuration. 4. Review package provenance, release history, maintainers, and transitive dependencies before updating the lock file. 5. Use automated dependency scanning and regularly review security advisories. 6. Perform dependency updates through controlled pull requests with tests and security review. 7. Run installation and the MCP server under a dedicated, least-privileged account or sandbox with restricted filesystem and network access.
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Supply ChainUnpinned Dependencies, External Script Fetching, Obfuscated Code
  • Excessive AgencyUnrestricted Tool Access, Autonomous Decision Making, Scope Creep
  • MCP Least PrivilegeUnderdeclared Capability, Wildcard Permission, Missing Permission Declaration
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
Findings (8)

Natural-Language Policy Violations

Medium
Confidence
91% confidence
Finding
The README content after the title is written entirely in Chinese, with no indication that alternative languages are available or that the locale restriction is intentional for a region-specific tool. This can constitute a language-policy violation when the skill imposes a specific language without user opt-in.

Missing User Warnings

Medium
Confidence
86% confidence
Finding
The README advertises `skill_evolve` as a self-evolution capability that can add new abilities, but provides no warning, authorization model, or boundary on what system state may be modified. In an agentic MCP context, undocumented self-modifying behavior increases the risk of unsafe autonomous changes, capability creep, and accidental persistence of harmful logic.

Lp3

Medium
Category
MCP Least Privilege
Confidence
93% confidence
Finding
The skill documents installation and registration of an MCP server that can make network requests and access environment-derived execution context, but it does not declare any explicit tool scope or permissions boundaries. In an agent ecosystem, missing scope declarations increases the chance the skill is invoked with broader capabilities than intended, making misuse, unintended data access, or unreviewed outbound communication more likely.

Natural-Language Policy Violations

Medium
Confidence
97% confidence
Finding
The file’s natural-language description, headings, and usage instructions are presented only in Chinese, which effectively forces a specific language on users. The policy allows locale constraints only when users are given a choice or when the restriction is clearly documented and justified, neither of which appears here.

Natural-Language Policy Violations

Medium
Confidence
96% confidence
Finding
This codebase presents core server identity and behavior descriptions in Chinese only, which can impose a specific language/locale on users without opt-in. The policy allows locale constraints only when explicitly justified or when users are offered a language choice, neither of which is present here.

Natural-Language Policy Violations

Medium
Confidence
98% confidence
Finding
The MCP server's `instructions` field is natural-language guidance that downstream users or agents will rely on, but it is supplied only in Chinese. Because no alternative language option or documented region-specific justification is provided, this is a language-policy violation.

Missing User Warnings

Low
Confidence
78% confidence
Finding
The README describes `colony_forage` as collecting data from external colonies but gives no privacy, provenance, or data-handling guidance. In a system designed for external aggregation, this can lead to agents pulling sensitive, untrusted, or policy-restricted data without user awareness or validation.

Rp1

Low
Category
MCP Rug Pull
Confidence
90% confidence
Finding
Using `pip install fastmcp` without a pinned version makes the installation non-reproducible and exposes users to supply-chain risk from a malicious, compromised, or breaking upstream release. Because this is an MCP server component integrated into an agent runtime, a bad dependency version could directly affect execution behavior or introduce code execution at install/runtime.

Static analysis

No suspicious patterns detected.