Back to skill

Security audit

Huawei Cloud OBS SDK

Security checks for vulnerabilities and agentic risk

Overview

The skill is a coherent Huawei OBS SDK guide, but some examples can expose or overwrite data without enough guardrails.

Review before installing or copying examples into production. Use least-privilege OBS credentials, pin dependency versions, add confirmations for delete/lifecycle/public-access changes, and do not use the folder download sample against untrusted buckets until it validates normalized paths stay inside the chosen download directory.

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
references/advanced_features.md:115
Finding

OBS Object Keys Can Escape the Intended Download Directory

Content
View full analysis
{local_file_path}") if download_file(obs_client, bucket_name, object_key, local_file_path): ``` ### Technical Analysis The folder-download implementation derives a local destination directly from an OBS object key. Object keys are remote data and may be controlled by any principal with permission to create or rename objects in the selected bucket. Removing leading `/` characters does not remove `..` path components. Consequently, a key such as `shared/../../app/config.py`, when processed with `obs_prefix='shared/'`, produces the relative path `../../app/config.py`. Passing that value to `os.path.join()` allows the resulting path to resolve outside `local_folder_path`. The implementation then creates the destination's parent directories and calls the download function without verifying that the canonical destination remains inside the intended download root. It also does not require confirmation before overwriting an existing destination. ### Attack Path 1. An attacker obtains permission to upload or rename objects under a bucket or prefix processed by the victim. 2. The attacker creates an object with a traversal key, such as `shared/../../.ssh/authorized_keys`. 3. The victim calls `download_folder()` with `obs_prefix='shared/'` and a local download directory. 4. Prefix removal produces `../../.ssh/authorized_keys`. 5. `os.path.join() ...[truncated 829 chars]
Remediation
View remediation

T08 · Insecure Dependencies

Warning
Location
requirements.txt:1
Finding

Open-Ended Dependency Constraints Allow Unreviewed Future Releases

Content
View full analysis
= 3.22.12 python-dotenv >= 1.0.0 ``` Related installation instruction in `SKILL.md`: ```bash pip install huaweicloud-sdk-python-obs ``` ### Technical Analysis Both dependencies use open-ended lower bounds, while the documented installation command has no version constraint. The installation process can therefore select any future release satisfying the constraints without prior review. Python packages execute imported code in the Skill's process, and package installation may also involve build-time code depending on the selected distribution. If a dependency publisher account or distribution channel is compromised, a malicious future release could be selected automatically. No evidence was found that the current package names are typosquatted, that the configured package source is malicious, or that the reviewed minimum versions are compromised. The risk arises from trusting unknown future releases and from the absence of integrity verification. ### Attack Path 1. A dependency publisher account, package release process, or distribution channel is compromised. 2. An attacker publishes a newer release under one of the accepted package names. 3. A user installs the project using `requirements.txt` or follows the unconstrained command in `SKILL.md`. 4. The package resolver selects the malicious newer version because it satisfies the open-ended constraint. 5. Malicious code runs during package installation, package import, or subsequent OBS operations under the user's privileges. ### Impact Assessment A compromised dependency could execute arbitrary code with the privileges of the user or service installing and running the Skill. This coul ...[truncated 428 chars]
Remediation
View remediation
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Supply ChainUnpinned Dependencies, External Script Fetching, Obfuscated Code
  • MCP Least PrivilegeUnderdeclared Capability, Wildcard Permission, Missing Permission Declaration
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
Findings (12)

Undeclared Tool Scope

Medium
Category
MCP Least Privilege
Confidence
70% confidence
Finding

Without declared permissions the skill's intent is opaque and cannot be validated.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
89% confidence
Finding

This markdown file includes an example lifecycle configuration that automatically deletes objects after 365 days. Although the code comments describe the behavior, the surrounding documentation does not clearly warn users that applying this example can irreversibly remove stored data and affect retention obligations.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
96% confidence
Finding

The example explicitly provides a helper that grants Group.ALL_USERS read access to a bucket, effectively making bucket contents publicly readable. In an object storage SDK guide, this is security-relevant because users may copy the snippet into production without understanding the privacy, data exposure, and compliance implications, and the document does not prominently warn about those risks.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
84% confidence
Finding

The document shows operations that upload local files to OBS, download remote data locally, enumerate object metadata, and generate temporary access URLs, all of which can affect privacy or data exposure. The markdown description explains functionality but does not warn users that these examples interact with remote storage and may transfer or expose data.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
94% confidence
Finding

This markdown file documents delete_object and delete_objects, which remove stored objects, but it provides no warning that these actions are destructive and may permanently affect user data. Under the markdown-specific SQP-2 criteria, skills should disclose behaviors that can affect user data or system integrity.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
89% confidence
Finding

This code performs safety-relevant remote operations: uploading local files to cloud storage, downloading objects to a local path, and deleting remote objects. The functions contain no confirmation prompt, warning print/log, or inline disclosure about these effects, so callers may invoke data-modifying actions without any user-visible notice from this skill file.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
84% confidence
Finding

Natural-language content throughout the skill forces a specific language presentation without offering an opt-in or explaining a region-specific requirement. Under the stated policy, language constraints should either be optional for the user or clearly justified.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
91% confidence
Finding

All headings, descriptions, and inline messages in the file are Chinese-only, which effectively forces a specific language for users consuming this skill documentation. SQP-3 calls for flagging language-policy issues when a skill imposes a language or locale without user opt-in or explicit justification.

Content

No source excerpt is available for this finding.

Unpinned Dependencies

Low
Category
Supply Chain
Confidence
94% confidence
Finding

The dependency is specified with a lower-bound only (>= 3.22.12), which allows future unreviewed versions to be installed. This creates a supply-chain and reproducibility risk because builds may pull in unexpected releases, including ones with regressions or newly introduced vulnerabilities.

Content

Scanner excerpt · requirements.txt (reported line 1)May include surrounding context.

text
huaweicloud-sdk-python-obs >= 3.22.12
python-dotenv >= 1.0.0

Unpinned Dependencies

Low
Category
Supply Chain
Confidence
97% confidence
Finding

The python-dotenv dependency is also unpinned and may resolve to different versions over time. Because this package has known advisories in some releases, leaving it unpinned increases uncertainty and the chance of installing an affected or otherwise unsafe version.

Content

Scanner excerpt · requirements.txt (reported line 2)May include surrounding context.

text
huaweicloud-sdk-python-obs >= 3.22.12
python-dotenv >= 1.0.0

Unverifiable Dependency: python-dotenv has 2 known advisory(ies) (CVE-2026-28684 (python-dotenv: Symlink following in set_key allows arbitrary file overwrite via ); CVE-2026-28684 (python-dotenv reads key-value pairs from a .env file and can set them as environ)), but the manifest does not pin a version, so it is unknown whether the installed release is affected

Low
Category
Supply Chain
Confidence
91% confidence
Finding

The manifest includes python-dotenv without a fixed version, and the package has known advisories affecting some releases. Since the installed version cannot be verified from this manifest, there is a real risk that an affected version could be pulled in, especially in fresh or automated environments.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
94% confidence
Finding

The module docstrings, comments, and user-facing print messages are written in Chinese only, which imposes a specific language on users without any opt-in or alternative. This can violate language/locale policy when a skill should not force one language by default.

Content

No source excerpt is available for this finding.