Back to skill

Security audit

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

Security checks for vulnerabilities and agentic risk

Overview

This skill has a coherent document-generation purpose, but it can broadly upload project files to a cloud service without enough scoping or review controls.

Review exactly which project directory you pass to this skill and assume most readable files under it may be uploaded to the hivulseAI cloud service. Do not run it on repositories containing .env files, private keys, credentials, customer data, or regulated information unless you have reviewed and removed those files first. Prefer a temporary sanitized copy of the project, and avoid storing the API key in the local plaintext config unless you accept that local exposure risk.

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:109
Finding

Unrestricted Recursive Upload May Disclose Credentials and Private Files

Content
View full analysis
Remediation
View remediation

T09 · Insecure Skill Coding Practices

Error
Location
hivulseai_skill.py:139
Finding

Shell Command Injection Through an Unquoted Installation Path

Content
View full analysis
Remediation
View remediation

T09 · Insecure Skill Coding Practices

Warning
Location
config.py:14
Finding

API Key Stored in Plaintext Without Enforced Restrictive Permissions

Content
View full analysis
bool: """Save configuration to 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 ``` ### Technical Analysis The API key is stored as plaintext JSON in `~/.hivulseai/config.json`. The application does not explicitly assign restrictive permissions to either the configuration directory or the file. Their permissions therefore depend on operating-system defaults and the process umask. On a system configured with a permissive umask, other local users or processes may be able to traverse the directory and read the configuration file. Rewriting an existing file also does not correct previously insecure permissions. ### Attack Path 1. A user runs the configuration wizard and enters an API key. 2. The application creates `~/.hivulseai` and writes `config.json` without explicitly enforcing owner-only permissions. 3. The host's umask or pre-existing file permissions permit access by another local account or process. 4. That principal reads the plaintext JSON file and obtains the API key. 5. The stolen key is used to access the associated external service within the key's authorization scope. ### Impact Assessment An attacker who can read the configuration file can impersonate the API-key owner to the extent permitted by the key. Potential effects include unauthorized API requests, access to acc ...[truncated 273 chars]
Remediation
View remediation

T09 · Insecure Skill Coding Practices

Note
Location
hivulseai_openclaw.py:173
Finding

Partial API Key Disclosure in Console and Agent Logs

Content
View full analysis
Remediation
View remediation

T08 · Insecure Dependencies

Note
Location
requirements.txt:1
Finding

Unbounded and Unhashed Third-Party Dependencies

Content
View full analysis
=2.25.0 pathlib2>=2.3.0 ``` ### Technical Analysis Both dependencies use only lower version bounds. Any current or future package version satisfying those constraints may be selected during installation. The requirements file also contains no integrity hashes. This does not establish that either named package is malicious. The risk is that installations are non-reproducible and can silently receive unreviewed future releases. If a package release or package-distribution account is compromised, the documented installation command may retrieve and execute affected package code during installation or runtime. `pathlib2` is also unnecessary on modern Python versions because `pathlib` is available in the standard library, increasing the dependency surface without a demonstrated need. ### Attack Path 1. A user follows the documentation and runs `pip install -r requirements.txt`. 2. The package resolver selects the newest versions satisfying the lower bounds. 3. A newly released, compromised, or incompatible version is selected without any repository change. 4. Package installation or subsequent import executes code from that unreviewed version. 5. The package code operates with the privileges of the installing or invoking user. ### Impact Assessment If dependency infrastructure or an allowed future release is compromised, malicious package code could execute with the privileges of the Python installation process or Skill runtime. Depending on those privileges, it could read project files, access environment variables and API keys, modify user files, or communicate externally. No currently malicious dependency was confirmed during this static audit. ]]>
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 (31)

Tp4

High
Category
MCP Tool Poisoning
Confidence
98% confidence
Finding

The documented purpose is document generation, but the behavior includes uploading files from a user-specified directory to a remote API and accessing local configuration to obtain credentials, without clearly declaring these as sensitive operations. In a developer environment, project directories often contain proprietary source code, secrets, configs, and customer data, so hidden or underexplained exfiltration behavior is highly dangerous.

Content

No source excerpt is available for this finding.

Missing User Warnings

High
Category
Not specified by scanner
Confidence
98% confidence
Finding

The skill describes uploading files from a specified directory to an external API but does not prominently warn users that local code and possibly sensitive files will leave their environment. In the context of software projects, this can expose intellectual property, embedded secrets, internal architecture, and regulated data.

Content

No source excerpt is available for this finding.

Missing User Warnings

High
Category
Not specified by scanner
Confidence
98% confidence
Finding

The tool recursively enumerates files in the supplied directory and uploads them to a cloud API with only minimal extension/dir filtering and no explicit warning, preview, or confirmation of what will be sent. This can expose proprietary source code, secrets, internal documents, and personal data to a third party unintentionally.

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 through a shell using os.system(f"python {interactive_path}"). Even though interactive_path is derived from the local file location rather than direct user input, invoking a shell is unnecessary and unsafe because shell-based execution increases attack surface, can behave unpredictably across environments, and may execute an unexpected interpreter or manipulated command context. In a skill that processes project directories, this becomes more sensitive because users may run it in semi-trusted environments with modified PATH or local files.

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
94% confidence
Finding

The README explicitly states that files from a specified directory are uploaded to an API, but it does not clearly warn users that source code, configuration files, secrets, proprietary materials, or personal data may be transmitted off-host. In a software-development context, this omission is risky because users may run the tool against entire repositories and unknowingly exfiltrate sensitive project data to a third-party service.

Content

No source excerpt is available for this finding.

Undeclared Tool Scope

Medium
Category
MCP Least Privilege
Confidence
95% confidence
Finding

The skill advertises powerful capabilities including environment access, local file access, network use, and shell-like behavior, but does not declare any tool scope or permission boundaries. This removes an important transparency and policy-control layer, making it easier for the skill to read local code and transmit it externally without clear user or platform enforcement.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
90% confidence
Finding

The instructions require an API key but do not clearly emphasize that it is a sensitive credential that must not be exposed, logged, shared, or committed to source control. In developer workflows, insufficient warning around credential handling often results in accidental leakage through shell history, screenshots, configs, or repositories.

Content

No source excerpt is available for this finding.

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
96% confidence
Finding

The trigger phrases are broad and overlap with normal developer conversation, increasing the chance the skill activates unintentionally. Because this skill may read a project directory and upload contents to an external API, accidental invocation materially raises the risk of unintended data disclosure.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
94% confidence
Finding

The documentation instructs users to store the API key in a local JSON config file in plaintext without warning about local disclosure risk. Plaintext credential storage increases exposure to other local users, malware, backups, accidental sharing, and repository inclusion if the file is copied into project space.

Content

No source excerpt is available for this finding.

Context-Inappropriate Capability

Medium
Category
Not specified by scanner
Confidence
80% confidence
Finding

The manifest describes a tool for generating technical documentation from source directories, but this file implements persistent API key management by saving credentials in a user home-directory config file. Credential storage may be an implementation detail for a network-backed service, but the manifest does not state that the skill manages secrets locally, so this capability is broader than the documented purpose.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The API key is persisted to ~/.hivulseai/config.json in plaintext via json.dump without any warning to the user or file-permission hardening. If another local user, backup system, malware, or misconfigured file sync accesses that file, the credential can be stolen and used to impersonate the user against the service.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
93% confidence
Finding

Nearly all prompts, descriptions, and CLI messages are presented only in Chinese, with no option for users to select another language or locale. This creates a natural-language policy issue when language choice is expected rather than a fixed locale being imposed.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
88% confidence
Finding

The constructor silently attempts to obtain API keys from multiple local configuration sources without informing the user. Even though the key is intended for service authentication, undisclosed access to local credential material violates least surprise and can normalize over-broad secret access patterns in agent skills.

Content

No source excerpt is available for this finding.

Context-Inappropriate Capability

Medium
Category
Not specified by scanner
Confidence
94% confidence
Finding

The skill reads an API key from a hard-coded external file path in the user's home directory that is unrelated to the requested project directory. This expands data access beyond stated functionality and causes implicit credential harvesting behavior, especially because the key is then used to upload repository contents to a remote service.

Content

No source excerpt is available for this finding.

Cloud Storage Exfiltration

Medium
Category
Data Exfiltration
Confidence
98% confidence
Finding

This call uploads the first local file to a cloud endpoint as part of a recursive project upload workflow. In this skill's context, that behavior is core functionality, but it is still dangerous because users are not given informed consent, file-by-file visibility, or strong filtering for secrets before source code leaves the machine.

Content

Scanner excerpt · hivulseAI.py (reported line 178)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
98% confidence
Finding

This call continues uploading all remaining files in the target directory to cloud storage using the created branch identifier. Because the upload is recursive and broad, any overlooked sensitive files within the directory can be exfiltrated at scale to a third-party service.

Content

Scanner excerpt · hivulseAI.py (reported line 184)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 203)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
94% confidence
Finding

The module description states behavior in Chinese, and all user-facing messages throughout the script are hard-coded in Chinese. This imposes a specific language/locale on users without offering a choice or documenting that the skill is intended only for a Chinese-language environment.

Content

No source excerpt is available for this finding.

Context-Inappropriate Capability

Medium
Category
Not specified by scanner
Confidence
92% confidence
Finding

The manifest describes a code-to-document generation tool, but this wrapper also implements credential discovery by directly reading ~/.openclaw/openclaw.json and falling back to the HIVULSE_API_KEY environment variable. Accessing host configuration files and environment secrets is a broader capability than the stated documentation purpose and is not mentioned in the manifest.

Content

No source excerpt is available for this finding.

Context-Inappropriate Capability

Medium
Category
Not specified by scanner
Confidence
83% confidence
Finding

The code launches hivulseai_skill.py via subprocess.run instead of performing generation directly in-process. For a skill described simply as an automated documentation generator, arbitrary process execution is an additional capability that increases operational scope and is not disclosed in the manifest.

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
97% confidence
Finding

The module docstring and all user-facing CLI messages are written exclusively in Chinese, which imposes a specific language on users. The file does not offer an opt-in, alternate locale, or a documented justification that this skill is intended only for a Chinese-speaking or region-specific context.

Content

No source excerpt is available for this finding.

Context-Inappropriate Capability

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The skill exposes the ability to spawn a separate Python process in interactive mode, which is broader execution capability than is strictly necessary for document generation. While this appears intended for UX convenience rather than abuse, delegating execution to another script via a shell introduces avoidable process-execution behavior that can be abused in compromised environments or make security review harder. The context makes it somewhat less dangerous than arbitrary command execution because the target script is fixed, but it still expands the trusted code and execution surface.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
96% confidence
Finding

This code presents its title, prompts, status messages, and confirmations entirely in Chinese, which constitutes a language/locale constraint in natural-language content. The file does not offer opt-in, selection, or any documented justification that the skill is intentionally region-specific.

Content

No source excerpt is available for this finding.