Back to skill

Security audit

The Hive Swarm Governance

Security checks for vulnerabilities and agentic risk

Overview

The skill is coherent but asks agents to participate in a remote governance system that can automatically execute approved code changes and handles private-key backups with weakly scoped safeguards.

Review this skill carefully before installing. Use it only if you trust the hosted Hive service and the participating swarm identities, and do not allow approved proposals to execute on a sensitive host without a separate human approval step and real isolation such as a disposable container or VM. Treat .hive backups as private-key material, avoid command-line passwords, and never restore backups from untrusted sources.

Vulnerability Patterns
  • Remote Payload Retrieval and ExecutionFetches external code whose behavior can change after review
  • 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
  • Embedded Malicious CodeShips malicious scripts inside the skill and executes them locally
Findings (2)

T03 · Remote Payload Retrieval and Execution

Error
Location
SKILL.md:170
Finding
Remote Swarm Governance Can Trigger Autonomous Execution of Untrusted Code Diffs<![CDATA[ ## Vulnerability Details **File Location**: `SKILL.md`, lines 170-178; related sandbox limitation at line 350 **Vulnerability Type**: Remote payload retrieval and autonomous code execution **Risk Level**: Critical ### Vulnerable Code Snippet ```markdown python cli.py vote --proposal-id=abc123 --voter=my_agent --vote=approve --reason="Improves system resilience" --signature="base64-signature" ``` **Vote options:** `approve`, `reject`, `abstain` The proposal executes automatically if: - ✅ Total approve trust ≥ 60% of swarm total trust - ✅ ≥ 3 distinct voters participated - ✅ Voting period not expired (7 days) ``` The documented limitation confirms that the execution environment does not provide a genuine security boundary: ```markdown - ⚠️ **AutonomousExecutor uses regex sandbox:** not true Docker isolation ``` ### Technical Analysis The skill delegates approval of executable code changes to participants in an externally hosted swarm. Once the trust-weighted voting conditions are met, an approved code diff is executed automatically. Cryptographic signatures establish which swarm identities submitted actions, but they do not establish that the submitted code is safe. Likewise, quorum requirements are governance controls rather than code-execution security controls. An attacker who compromises trusted identities, colludes with sufficiently trusted participants, or otherwise obtains enough voting influence could authorize a malicious proposal. The documented regex-based sandbox is not adequate for arbitrary code isolation. Pattern matching cannot comprehensively prevent indirect operating-system access, unsafe imports, dynamic evaluation, reflection, encoding-based bypasses, resource exhaustion, or exploitation of permitted runtime functionality. Because the audited project contains only `SKILL.md`, the implementation of the dry run, signature verification, diff validation, and executor cannot be independently verified. ### Attack Path 1. An att ...[truncated 1402 chars]
Remediation
<![CDATA[ ## Remediation Suggestions 1. Remove automatic execution of remotely proposed code changes. 2. Require explicit local approval by an authorized human or independently trusted administrator before any proposal is applied. 3. Separate proposal approval from deployment authority; swarm consensus should never directly confer operating-system execution rights. 4. Display the complete diff, affected files, artifact digest, proposer identity, and security-analysis results during approval. 5. Permit changes only to an explicit allowlist of files and reject modifications to executors, authentication code, governance thresholds, startup configuration, dependency manifests, and secret-handling logic without elevated review. 6. Replace the regex sandbox with a disposable VM or strongly isolated container that has: - No host filesystem mounts. - No inherited credentials or environment secrets. - No network access by default. - A read-only base image. - A non-root user and dropped Linux capabilities. - Seccomp, AppArmor, or SELinux confinement. - Strict CPU, memory, process, storage, and execution-time limits. 7. Require reproducible builds and cryptographically pin the reviewed proposal digest to the executed artifact. 8. Run static analysis, dependency scanning, tests, and policy checks before execution, but do not treat these checks as substitutes for isolation. 9. Add rate limits, resource quotas, immutable audit logs, emergency shutdown controls, and rollback support. 10. Document and test the behavior for compromised voters, malicious proposals, race conditions, and sandbox escapes. ]]>

T09 · Insecure Skill Coding Practices

Warning
Location
SKILL.md:185
Finding
Identity Backup Passwords Are Passed Through Command-Line Arguments<![CDATA[ ## Vulnerability Details **File Location**: `SKILL.md`, lines 185-195 **Vulnerability Type**: Sensitive information exposure through process arguments and shell history **Risk Level**: Medium ### Vulnerable Code Snippet ```markdown python cli.py backup --agent-id=my_agent --password=MySecretPass123 --output=my_agent_backup.hive ``` This creates an encrypted file containing: - Your Ed25519 private key (AES-128 encrypted) - Your DID document - Your current trust score and vouch history **Restore:** ```bash python cli.py restore --input=my_agent_backup.hive --password=MySecretPass123 ``` ``` The CLI reference repeats the insecure interface at lines 311 and 318: ```markdown python cli.py backup --agent-id=<id> --password=<pass> --output=<file.hive> ``` ```markdown python cli.py restore --input=<file.hive> --password=<pass> ``` ### Technical Analysis The documented backup and restoration commands place the encryption password directly in the process argument list. Command-line arguments can be exposed through shell history, terminal recording, process inspection utilities, process-accounting systems, diagnostic telemetry, job logs, and automation configuration. The affected backup is documented as containing the agent's Ed25519 private key. Consequently, disclosure of the password is security-sensitive even when the encrypted backup itself is handled separately. The literal `MySecretPass123` appears to be an example rather than a confirmed production credential, but the documented interface encourages users to expose real passwords through the same insecure mechanism. The documentation also identifies the backup encryption as AES-128 but does not specify the authenticated encryption mode, password-based key derivation function, salt, work factor, nonce handling, or integrity protection. Those implementation properties could not be verified because no backup code is included in the audited artifact. ### Attack Path 1. A user follows the document ...[truncated 1201 chars]
Remediation
<![CDATA[ ## Remediation Suggestions 1. Remove the `--password` command-line option from both backup and restore workflows. 2. Read passwords through a hidden interactive prompt using an appropriate mechanism such as Python's `getpass`. 3. For noninteractive operation, accept the secret through a protected file descriptor or operating-system secret manager rather than an environment variable or ordinary file. 4. Require password confirmation when creating a backup and reject weak passwords. 5. Ensure passwords are never written to logs, exception messages, telemetry, or shell history. 6. Use an authenticated encryption construction, such as AES-GCM or ChaCha20-Poly1305. 7. Derive encryption keys with a modern password-based KDF such as Argon2id or scrypt, using a unique random salt and appropriately tuned cost parameters. 8. Store backup files with restrictive permissions and create them atomically without insecure temporary files. 9. Zero or release sensitive plaintext buffers as soon as practical. 10. Update all examples and CLI reference sections to demonstrate the secure prompt-based workflow. ]]>
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Excessive AgencyUnrestricted Tool Access, Autonomous Decision Making, Scope Creep
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
  • Supply ChainUnpinned Dependencies, External Script Fetching, Obfuscated Code
Findings (2)

Missing User Warnings

Medium
Confidence
91% confidence
Finding
The skill explicitly promotes autonomous execution of approved code changes and identity backup/restore involving private keys, but it does not place prominent, concrete warnings around host compromise, key theft, or the danger of restoring untrusted backups. In this context, autonomous execution and handling of private key material are high-risk operations; presenting them as routine workflow steps can lead users or agents to perform dangerous actions without adequate safeguards.

External Transmission

Medium
Category
Data Exfiltration
Content
python cli.py onboard --agent-id=my_agent --name="My Agent"

# OR via API
curl -X POST https://the-hive-o6y8.onrender.com/agents/onboard \
  -H "Content-Type: application/json" \
  -d '{
    "agent_id": "my_agent",
Confidence
87% confidence
Finding
The skill instructs users to transmit agent identity and metadata to an external service endpoint, which is a real data egress behavior. While expected for a networked governance service, it still creates security and privacy risk because agent identifiers, descriptions, public keys, signatures, voting activity, and possibly governance metadata are sent to a third-party host outside the local trust boundary.

Static analysis

No suspicious patterns detected.