Back to skill

Security audit

Hivulse蜂巢AI-Gen-Tech Docs 自动生成技术文档

Security checks for vulnerabilities and agentic risk

Overview

This appears to be a real documentation generator, but it uploads broad project contents to a cloud API and handles API keys and file selection unsafely enough to require user review before installation.

Install only if you are comfortable sending the selected project directory to Hivulse's cloud service. Before use, remove secrets and private configuration files, avoid repositories containing symlinks to files outside the project, prefer a dedicated low-privilege API key, and check local logs/config files for exposed or plaintext key material.

Vulnerability Patterns
  • Unauthorized Access and Privilege EscalationObtains permissions beyond the task's legitimate needs
  • 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
Findings (5)

T05 · Unauthorized Access and Privilege Escalation

Error
Location
hivulseAI.py:106
Finding

Unrestricted Sensitive-File Upload and Symlink Boundary Escape

Content
View full analysis
List[str]: """Get all files under a directory while filtering selected directories.""" file_paths = [] for root, dirs, files in os.walk(directory): dirs[:] = [d for d in dirs if d not in self.exclude_dirs] for file in files: if any(file.endswith(ext) for ext in self.exclude_extensions): continue file_path = os.path.join(root, file) file_paths.append(file_path) return file_paths ``` ```python def upload_file(self, file_path: str, directory: str, branch_id: Optional[str] = None, unified_file_path: str = None) -> Dict: """Upload one file to the API.""" url = f"{self.base_url}/api/v1/claw/upload/file/" project_name = unified_file_path relative_path = os.path.relpath(file_path, directory) api_file_path = f"{project_name}/{relative_path}" with open(file_path, 'rb') as f: files = {'file': (os.path.basename(file_path), f)} data = {'file_path': api_file_path} if branch_id: data['branch_id'] = branch_id response = requests.post( url, files=files, data=data, headers=self.headers ) ``` ### Technical Analysis The uploader uses a small denylist instead of defining which files are safe to transmit. It does not exclude common sensitive material such as: - `.env` files - SSH private keys - Cloud-provider credentials - Package registry credentials - Signing keys and certificates - Database du ...[truncated 1945 chars]
Remediation
View remediation

T09 · Insecure Skill Coding Practices

Warning
Location
config.py:14
Finding

API Key Stored in Plaintext Without Enforced File Permissions

Content
View full analysis
bool: """Save configuration to a file.""" try: with open(self.config_path, 'w', encoding='utf-8') as f: json.dump(self.config, f, indent=2, ensure_ascii=False) return True except IOError: return False def get_api_key(self) -> str: """Get the API key.""" return self.config.get("api_key", "") def set_api_key(self, api_key: str): """Set the API key.""" self.config["api_key"] = api_key self.save_config() ``` ### Technical Analysis The configuration wizard stores the API key as plaintext JSON in `~/.hivulseai/config.json`. The directory is created without an explicit `0700` mode, and the file is written without enforcing `0600`. Actual permissions therefore depend on the process umask and any pre-existing file or directory permissions. The code also does not verify that the configuration file is owned by the current user, is a regular file, or is not a symbolic link. Plaintext storage is especially sensitive because the API key is subsequently accepted as an authentication credential in the `X-API-KEY` HTTP header. ### Attack Path 1. The victim runs `python3 config.py` and enters an API key. 2. `set_api_key()` places the key in the in-memory configuration. 3. `save_config()` writes the key to `~/.hivulseai/config.json` without explicitly restricting permissions. 4. Under a permissive umask or pre-e ...[truncated 924 chars]
Remediation
View remediation

T09 · Insecure Skill Coding Practices

Warning
Location
hivulseai_skill.py:138
Finding

Shell Command Injection in Interactive Mode Launcher

Content
View full analysis
Remediation
View remediation

T09 · Insecure Skill Coding Practices

Note
Location
hivulseai_openclaw.py:176
Finding

API Key Prefix Disclosed in Process Output

Content
View full analysis
Remediation
View remediation

T08 · Insecure Dependencies

Note
Location
requirements.txt:1
Finding

Unbounded Third-Party Dependency Versions

Content
View full analysis
=2.25.0 pathlib2>=2.3.0 ``` ### Technical Analysis Both dependencies specify only minimum versions and have no reviewed upper bounds or cryptographic hashes. A future installation may therefore resolve materially different package code from the package index. This prevents reproducible builds and expands exposure to future compromised or incompatible releases. The risk is particularly relevant because Python package installation and imports execute third-party code with the installer or application user's privileges. `pathlib2` also appears unnecessary because the project imports `Path` from Python 3's standard-library `pathlib`, increasing the dependency surface without demonstrated need. No evidence was found that the currently named packages are typosquatted or malicious. The issue is unsafe version-resolution policy rather than a confirmed malicious dependency. ### Attack Path 1. A user follows the documented command: ```bash pip install -r requirements.txt ``` 2. The package index resolves the latest versions satisfying the minimum constraints. 3. A future release is compromised, malicious, or incompatible but still satisfies the constraints. 4. Package installation, import, or runtime behavior executes that release's code. 5. The dependency code operates with the same permissions as the installer or Skill process. This path depends on a future supply-chain compromise, malicious release, or unintended incompatible release. ### Impact Assessment A compromised dependency could execute arbitrary code with the privileges of the account installing or running the Skill. That could expose source files, API keys, environment variables, and local configuration or modify files accessible to that account. Under ordinary con ...[truncated 180 chars]
Remediation
View remediation
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Excessive AgencyUnrestricted Tool Access, Autonomous Decision Making, Scope Creep
  • Trigger AbuseOverly Broad Trigger, Shadow Command Trigger, Keyword Baiting Trigger
  • Behavioral ASTexec() Call, eval() Call, Dynamic Import
  • MCP Least PrivilegeUnderdeclared Capability, Wildcard Permission, Missing Permission Declaration
Findings (32)

Missing User Warnings

High
Category
Not specified by scanner
Confidence
97% confidence
Finding

The skill explicitly states that it uploads files from a specified directory to an API, but it does not prominently warn users about data exfiltration, privacy implications, or the possibility of sending proprietary or secret material off-host. In a software-development context, source trees often contain credentials, internal architecture details, and regulated data, so missing disclosure and consent is a significant security risk.

Content

No source excerpt is available for this finding.

os.system() or os exec-family call

High
Category
Dangerous Code Execution
Confidence
95% confidence
Finding

The skill launches another Python script using os.system with a shell command, which unnecessarily invokes a shell and broadens execution risk. Even though the path is derived from the local skill directory rather than direct user input, shell-based execution is avoidable and can lead to command execution issues if paths contain special characters or if the environment is manipulated.

Content

Scanner excerpt · hivulseai_skill.py (reported line 144)May include surrounding context.

python
interactive_path = skill_dir / "interactive.py"

        if interactive_path.exists():
            os.system(f"python {interactive_path}")
        else:
            print("❌ 交互式模块不存在")
        return

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
93% confidence
Finding

The README states that the tool scans a specified directory and bulk uploads files to an API, but it does not prominently warn that source code, configuration files, embedded secrets, proprietary material, or personal data may be transmitted off-host. In a developer tool, that omission can lead users to upload sensitive project contents without informed consent, increasing the risk of data leakage to the remote service.

Content

No source excerpt is available for this finding.

Undeclared Tool Scope

Medium
Category
MCP Least Privilege
Confidence
92% confidence
Finding

The skill advertises capabilities that imply reading local files, writing files, using environment variables, making network requests, and invoking a shell, but it does not declare any explicit tool scope or permission boundaries. In a skill that uploads project directories to a remote API, missing scope declarations increases the chance of overbroad access, accidental sensitive-file inclusion, or unsafe execution without clear user/admin review.

Content

No source excerpt is available for this finding.

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
89% confidence
Finding

The auto-trigger description lacks clear boundaries about when the skill should run and what user consent is required before acting on local files. In this context, ambiguity is risky because the skill processes codebases and communicates with a remote API, making accidental activation more consequential than for a purely local or read-only skill.

Content

No source excerpt is available for this finding.

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
94% confidence
Finding

Broad trigger phrases such as general requests to create or generate documents can cause the skill to activate unexpectedly in normal conversation. Because this skill's core behavior involves uploading directory contents to an external API, accidental invocation could lead to unintended processing or exfiltration of sensitive source code.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
91% confidence
Finding

The API key is persisted in a JSON file under the user's home directory in plaintext, and the setup flow does not warn the user that credentials will be stored locally. If the workstation is shared, backed up insecurely, or compromised by another local process, the key can be recovered and abused to access the associated service.

Content

No source excerpt is available for this finding.

Context-Inappropriate Capability

Medium
Category
Not specified by scanner
Confidence
93% confidence
Finding

The skill pulls API credentials from multiple local sources, including an unrelated OpenClaw configuration and a local config module, without clear user consent or scope limitation. Secret harvesting from unrelated local configuration exceeds the minimum needed behavior and can expose credentials unexpectedly if the skill is run in a broader host environment.

Content

No source excerpt is available for this finding.

Context-Inappropriate Capability

Medium
Category
Not specified by scanner
Confidence
98% confidence
Finding

The code directly opens a hardcoded user-specific file path under another product's configuration directory and scrapes it with regex to recover an API key. This bypasses normal credential-boundary expectations and creates an unnecessary local secret access path that could be abused to collect credentials from the host.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
97% confidence
Finding

The skill recursively uploads nearly all files in the chosen directory to a remote cloud service, with only minimal exclusions and no strong user-facing confirmation of transmission scope. In a developer environment this can include source code, configuration, secrets, internal docs, and other sensitive artifacts, making the context significantly more dangerous.

Content

No source excerpt is available for this finding.

Cloud Storage Exfiltration

Medium
Category
Data Exfiltration
Confidence
96% confidence
Finding

The first upload call sends local project files to a cloud endpoint as part of creating a remote repository. In the context of a developer documentation tool, this can exfiltrate proprietary code and embedded secrets from a local workspace, especially because enumeration is broad and filtering is weak.

Content

Scanner excerpt · hivulseAI.py (reported line 179)May include surrounding context.

python
if i == 0:
                    # 第一个文件不带branch_id
                    result = self.upload_file(file_path,directory=directory, unified_file_path=unified_file_path)
                    self.repo_id = result.get('data',{}).get('repo_id')
                    self.default_branch_id = result.get('data',{}).get('default_branch_id')
                    print(f"✅ 第一个文件上传成功,repo_id: {self.repo_id}, branch_id: {self.default_branch_id}")

Cloud Storage Exfiltration

Medium
Category
Data Exfiltration
Confidence
96% confidence
Finding

Subsequent upload calls continue transmitting the remaining directory contents to cloud storage using the returned branch identifier. Because this happens automatically across the entire directory tree, the risk compounds and may expose complete repositories, credentials, and internal assets to a third-party service.

Content

Scanner excerpt · hivulseAI.py (reported line 185)May include surrounding context.

python
print(f"✅ 第一个文件上传成功,repo_id: {self.repo_id}, branch_id: {self.default_branch_id}")
                else:
                    # 后续文件带branch_id,使用相同的统一file_path
                    result = self.upload_file(file_path,directory=directory,branch_id= self.default_branch_id, unified_file_path=unified_file_path)
                    print(f"✅ 文件上传成功")

            except Exception as e:

External Transmission

Medium
Category
Data Exfiltration
Confidence
80% confidence
Finding

Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.

Content

Scanner excerpt · hivulseAI.py (reported line 204)May include surrounding context.

python
data = {"uuid": self.default_branch_id}

        try:
            response = requests.post(url, json=data, headers=self.headers)
            response.raise_for_status()

            result = response.json()

External Transmission

Medium
Category
Data Exfiltration
Confidence
80% confidence
Finding

Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.

Content

Scanner excerpt · hivulseAI.py (reported line 235)May include surrounding context.

python
data = {"uuid": self.default_branch_id}

        try:
            response = requests.post(url, json=data, headers=self.headers)
            response.raise_for_status()

            result = response.json()

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
92% confidence
Finding

Natural-language strings and documentation in this file consistently force a specific language for usage and error messages. The file does not offer user opt-in or explain that the skill is intentionally region-specific, which conflicts with the language/locale policy criteria.

Content

No source excerpt is available for this finding.

Context-Inappropriate Capability

Medium
Category
Not specified by scanner
Confidence
89% confidence
Finding

The manifest describes a tool for generating technical documentation from source code directories. In addition to that core function, this file explicitly reads ~/.openclaw/openclaw.json to extract an API key and also falls back to environment-variable access, which is a separate credential-harvesting capability not inherent to document generation itself.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
97% confidence
Finding

The script prints the first 10 characters of the API key to console output, which leaks sensitive credential material into logs, terminal history, and any monitoring systems capturing stdout. Even partial secret disclosure materially weakens the key and may aid correlation, brute-force reduction, or accidental exposure to other users on shared systems.

Content

No source excerpt is available for this finding.

Context-Inappropriate Capability

Medium
Category
Not specified by scanner
Confidence
85% confidence
Finding

The manifest frames the skill as a documentation generator operating on a specified code directory. This wrapper delegates execution by spawning python3 with subprocess.run, which adds a general process-execution capability that is not disclosed in the stated purpose and is not obviously required at the manifest level.

Content

No source excerpt is available for this finding.

subprocess module call

Medium
Category
Dangerous Code Execution
Confidence
70% confidence
Finding

subprocess module calls execute external commands. Without careful input validation, this enables command injection.

Content

Scanner excerpt · hivulseai_openclaw.py (reported line 196)May include surrounding context.

python
'--task-name', task_name
            ]

            result = subprocess.run(cmd, cwd=skill_dir)
            sys.exit(result.returncode)
        else:
            print("❌ 主技能脚本不存在")

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
88% confidence
Finding

All user-facing descriptions, help text, and status/error messages are presented in Chinese, which forces a specific language experience without any apparent user opt-in or alternative. The policy rule applies to natural-language strings in code, and no language selection mechanism or justification is present.

Content

No source excerpt is available for this finding.

Context-Inappropriate Capability

Medium
Category
Not specified by scanner
Confidence
91% confidence
Finding

Interactive mode causes the skill to execute a separate Python file, which expands the skill's runtime behavior beyond simple argument parsing and document submission. In the context of an agent skill, this increases the attack surface because a modified or replaced interactive.py gains execution implicitly when the flag is used.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
85% confidence
Finding

The skill executes an additional script in interactive mode without an explicit user-facing warning that another program will be launched. While this is not code injection by itself, the lack of disclosure reduces transparency and can surprise users or higher-level agents about the scope of execution.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
97% confidence
Finding

This Python file presents its title, prompts, status messages, and errors entirely in Chinese, including all user-facing input/output strings. Because the skill does not offer a language selection or explain that it is intentionally limited to a Chinese-only regional context, it violates the language/locale policy criterion for natural-language content.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
86% confidence
Finding

The natural-language instructions in this file are exclusively in Chinese, which can amount to a language policy issue when no user choice or locale justification is provided. The file does not indicate that the skill is intended only for a Chinese-speaking or region-specific audience.

Content

No source excerpt is available for this finding.

Intent-Code Divergence

Low
Category
Not specified by scanner
Confidence
93% confidence
Finding

The file first declares and repeatedly instructs users to set HIVULSE_API_KEY as an environment variable, including in metadata requirements and troubleshooting, but L077 states the API key is configured via a file and does not require an environment variable. This is an active documentation contradiction about how the skill is intended to authenticate.

Content

No source excerpt is available for this finding.