Back to skill

Security audit

huawei-cloud-obs-security-audit

Security checks for vulnerabilities and agentic risk

Overview

ClawScan rates this skill suspicious because scanners report automatic installation of an unrelated CLI, unrequested telemetry, a command argument risk, and audit checks that may produce unreliable results.

Consider the verdict's recommendation and review the reported issues before installing. In particular, consider whether you accept automatic telemetry with unspecified contents, remote installation of an unauthenticated CLI, and audit results that scanners say may misrepresent replication or logging settings. The scan is marked partial because three local references could not be resolved, so the evidence is incomplete.

Vulnerability Patterns
  • 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
  • Embedded Malicious CodeShips malicious scripts inside the skill and executes them locally
  • Unauthorized Access and Privilege EscalationObtains permissions beyond the task's legitimate needs
Vulnerability Patterns
  • Supply ChainUnpinned Dependencies, External Script Fetching, Obfuscated Code
  • Excessive AgencyUnrestricted Tool Access, Autonomous Decision Making, Scope Creep
  • Rogue AgentSelf-Modification, Session Persistence
  • Behavioral ASTexec() Call, eval() Call, Dynamic Import
  • MCP Least PrivilegeUnderdeclared Capability, Wildcard Permission, Missing Permission Declaration
Findings (17)

Description-Behavior Mismatch

High
Category
MCP Tool Poisoning
Confidence
99% confidence
Finding

The document makes an automatically installed telemetry wrapper mandatory for cloud commands, extending a read-only bucket audit into local software installation and third-party code execution. Although this dependency is disclosed in the body, automatically introducing it without a separate approval boundary exposes the user's credential-bearing environment to an unnecessary additional dependency.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

High
Category
MCP Tool Poisoning
Confidence
97% confidence
Finding

The mandatory quality CLI adds a persistent executable dependency unrelated to evaluating bucket configuration. Its presence is documented, so it is not wholly undeclared, but automatic installation and mandatory wrapping still expand the trust boundary beyond the requested read-only assessment.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

High
Category
MCP Tool Poisoning
Confidence
96% confidence
Finding

The supplied command contains no OBS auditing behavior and instead requests an upgrade using skill-quality-cli. Although dependency setup can be a supporting implementation detail, the supplied content establishes no connection between this tool upgrade and the declared OBS audit functionality. The command's internal effects cannot be determined from this snippet.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

High
Category
MCP Tool Poisoning
Confidence
87% confidence
Finding

The command appears intended to disable skill quality reporting, a behavior not disclosed in the description and not evidently required to audit OBS buckets. The code only establishes the environment variable; whether reporting is actually disabled depends on other software consuming it. The mismatch concerns this unrelated configuration change, not merely the absence of audit logic in a small code chunk.

Content

No source excerpt is available for this finding.

External Script Fetching

High
Category
Supply Chain
Confidence
97% confidence
Finding

The matched pipeline parses remote JSON with fixed Python code; it does not directly execute the response as Python. Nevertheless, the retrieved version selects an executable archive that this same script downloads, extracts, and installs without signature or trusted-digest verification, creating a genuine supply-chain exposure.

Content

Scanner excerpt · scripts/ensure_cli.sh (reported line 16)May include surrounding context.

sh
API_URL="https://skillsapi.developer.myhuaweicloud.com/api/quality/cli/latest"
OBS_BASE="https://obs-skills-repository.obs.cn-north-4.myhuaweicloud.com/skill-quality-cli"

V=$(curl -s "${API_URL}" | python3 -c 'import sys,json;print(json.load(sys.stdin)["version"])' 2>/dev/null)
if [ -z "$V" ]; then
    echo "警告: 无法获取 skill-quality-cli 最新版本,跳过安装" >&2
    exit 0

External Script Fetching

High
Category
Supply Chain
Confidence
97% confidence
Finding

The curl-to-Python pipeline only parses JSON and is not itself remote-code evaluation. However, the script subsequently downloads, extracts, and installs the selected executable package without authenticating its contents, allowing a compromised release source to supply code that will run under the user's account.

Content

Scanner excerpt · scripts/install_cli.sh (reported line 12)May include surrounding context.

sh
API_URL="https://skillsapi.developer.myhuaweicloud.com/api/quality/cli/latest"
OBS_BASE="https://obs-skills-repository.obs.cn-north-4.myhuaweicloud.com/skill-quality-cli"

V=$(curl -s "${API_URL}" | python3 -c 'import sys,json;print(json.load(sys.stdin)["version"])' 2>/dev/null || true)
if [ -z "$V" ]; then
    echo "警告: 无法获取 skill-quality-cli 最新版本(API 可能需要认证),跳过安装" >&2
    echo "提示: 请使用 ensure_cli.sh 或手动安装 skill-quality-cli" >&2

Session Persistence

Medium
Category
Rogue Agent
Confidence
60% confidence
Finding

Skill establishes unauthorized persistence across sessions via cron jobs, startup scripts, or state files. Session persistence allows an attacker to maintain access beyond the current interaction.

Content

Scanner excerpt · CHANGELOG.md (reported line 92)May include surrounding context.

md
| 类别 | 数量 | 问题 | 修复方案 |
|------|------|------|---------|
| SC2 ERROR | 2 | `curl\|python3` 管道(供应链风险) | 拆分为独立 fetch + parse 步骤;添加 SHA256 校验 |
| RA2 WARN | 2 | `mkdir -p ~/.local/bin/`(会话持久化) | 改用 `XDG_DATA_HOME` 环境变量 + `install -d -m 0755` |
| MP2 WARN | 8 | `# ===...` 分隔线注释(上下文填充) | 移除所有长分隔线注释 |
| AST4 WARN | 1 | `subprocess.run()`(危险代码执行) | 添加安全文档注释,说明输入验证和受信任来源 |

Skill declares no tool scope ('permissions' or 'allowed-tools') but code capabilities were detected: file_write, network, shell.

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.

The audit workflow automatically reports telemetry beyond the manifest's bucket-security assessment scope.

Medium
Category
Excessive Agency
Confidence
91% confidence
Finding

The workflow automatically reports telemetry and requires a reporting wrapper around cloud operations without first obtaining affirmative consent. This introduces an external reporting boundary into a security audit that handles bucket identifiers and configuration; the provided source does not establish which fields are transmitted, so credential or configuration exfiltration cannot be asserted.

Content

No source excerpt is available for this finding.

The guide enables automatic quality telemetry unrelated to auditing OBS bucket security.

Medium
Category
Excessive Agency
Confidence
92% confidence
Finding

The guide explicitly establishes automatic, opt-out telemetry but provides no payload specification or affirmative consent step. For tooling used with cloud credentials and security configuration, this creates an insufficiently bounded disclosure risk, although this guide alone does not demonstrate that secrets are actually transmitted.

Content

No source excerpt is available for this finding.

The OBS security audit skill installs an unrelated skill-quality CLI into the user's executable directory.

Medium
Category
Excessive Agency
Confidence
98% confidence
Finding

When invoked with the CLI absent, this script retrieves the latest remote package and installs executable code into the user's persistent binary directory without an approval prompt or artifact authentication. A compromised distribution endpoint or release could therefore introduce code that later runs with the auditing user's privileges and access to cloud credentials.

Content

No source excerpt is available for this finding.

Session Persistence

Medium
Category
Rogue Agent
Confidence
60% confidence
Finding

Skill establishes unauthorized persistence across sessions via cron jobs, startup scripts, or state files. Session persistence allows an attacker to maintain access beyond the current interaction.

Content

Scanner excerpt · scripts/ensure_cli.sh (reported line 35)May include surrounding context.

sh
tar xzf "${TMPDIR}/sqc.tar.gz" -C "${TMPDIR}"

mkdir -p ~/.local/bin/skill-quality-cli.d
cp "${TMPDIR}/skill-quality-cli" ~/.local/bin/ 2>/dev/null
cp "${TMPDIR}/skill-quality-cli.bin" ~/.local/bin/ 2>/dev/null
cp "${TMPDIR}/skill-quality-cli.d/cli_entry.py" ~/.local/bin/skill-quality-cli.d/ 2>/dev/null

Installs an unrelated skill-quality CLI outside the OBS security audit scope.

Medium
Category
Excessive Agency
Confidence
96% confidence
Finding

The script downloads and extracts skill-quality-cli, then installs executable files and supporting Python modules into ~/.local/bin. Installing skill-quality tooling is not an obvious requirement of auditing OBS bucket security configuration and is not declared in the manifest; manual invocation does not establish its relevance to that purpose.

Content

No source excerpt is available for this finding.

Session Persistence

Medium
Category
Rogue Agent
Confidence
60% confidence
Finding

Skill establishes unauthorized persistence across sessions via cron jobs, startup scripts, or state files. Session persistence allows an attacker to maintain access beyond the current interaction.

Content

Scanner excerpt · scripts/install_cli.sh (reported line 26)May include surrounding context.

sh
curl -fsSL -o "${TMPDIR}/sqc.tar.gz" "${OBS_BASE}/v${V}/skill-quality-cli-v${V}-linux-${ARCH}.tar.gz"
tar xzf "${TMPDIR}/sqc.tar.gz" -C "${TMPDIR}"

mkdir -p ~/.local/bin/skill-quality-cli.d
cp "${TMPDIR}/skill-quality-cli" ~/.local/bin/ 2>/dev/null
cp "${TMPDIR}/skill-quality-cli.bin" ~/.local/bin/ 2>/dev/null
cp "${TMPDIR}/skill-quality-cli.d/cli_entry.py" ~/.local/bin/skill-quality-cli.d/ 2>/dev/null

subprocess module call

Medium
Category
Dangerous Code Execution
Confidence
95% confidence
Finding

Although shell=False prevents shell metacharacter execution, hcloud_obs interpolates unvalidated bucket and endpoint values into a string that shlex.split subsequently turns into arguments. Crafted values containing whitespace can introduce additional CLI options, potentially changing the destination or behavior of authenticated audit requests; the security-auditing context makes the misleading validation claim particularly concerning.

Content

Scanner excerpt · scripts/obs_security_auditor.py (reported line 69)May include surrounding context.

python
"""
    import shlex
    try:
        result = subprocess.run(
            shlex.split(cmd), shell=False, capture_output=True, text=True, timeout=timeout
        )
        return result.returncode, result.stdout, result.stderr

The promised cross-region replication audit inspects bucket policy instead of replication configuration.

Medium
Category
Excessive Agency
Confidence
99% confidence
Finding

The replication check retrieves an access policy, not the bucket's replication configuration, so it cannot establish whether cross-region replication is enabled or functioning. It can misclassify configured buckets and even award a PASS on unparseable output containing the word replication, undermining the disaster-recovery assurances users expect from this audit.

Content

No source excerpt is available for this finding.

The promised bucket logging audit never retrieves the bucket logging configuration.

Medium
Category
Excessive Agency
Confidence
99% confidence
Finding

The logging check never retrieves the bucket logging configuration and instead treats policy text containing targetbucket or loggingenabled as proof that logging is enabled. Such strings can appear in unrelated policy fields, allowing a false PASS and inflated security score even when access logging is disabled, which can conceal an incident-detection gap.

Content

No source excerpt is available for this finding.