T05 · Unauthorized Access and Privilege Escalation
- Location
hivulseAI.py:109- Finding
Unrestricted Recursive Upload May Disclose Credentials and Private Files
- Content
View full analysis
- Remediation
View remediation
Security audit
Security checks for vulnerabilities and agentic risk
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.
hivulseAI.py:109Unrestricted Recursive Upload May Disclose Credentials and Private Files
hivulseai_skill.py:139Shell Command Injection Through an Unquoted Installation Path
config.py:14API Key Stored in Plaintext Without Enforced Restrictive Permissions
hivulseai_openclaw.py:173Partial API Key Disclosure in Console and Agent Logs
requirements.txt:1Unbounded and Unhashed Third-Party Dependencies
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.
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.
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.
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.
interactive_path = skill_dir / "interactive.py"
if interactive_path.exists():
os.system(f"python {interactive_path}")
else:
print("❌ 交互式模块不存在")
return
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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}")
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.
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:
Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.
data = {"uuid": self.default_branch_id}
try:
response = requests.post(url, json=data, headers=self.headers)
response.raise_for_status()
result = response.json()
Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.
data = {"uuid": self.default_branch_id}
try:
response = requests.post(url, json=data, headers=self.headers)
response.raise_for_status()
result = response.json()
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.
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.
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.
subprocess module calls execute external commands. Without careful input validation, this enables command injection.
'--task-name', task_name
]
result = subprocess.run(cmd, cwd=skill_dir)
sys.exit(result.returncode)
else:
print("❌ 主技能脚本不存在")
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.
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.
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.