Back to skill

Security audit

七牛云对象存储操作

Security checks for vulnerabilities and agentic risk

Overview

This skill is a disclosed Qiniu Kodo storage helper, but users should review its cloud credential use, object deletion capability, and unverified qshell download before installing.

Install only if you intend to let the agent operate Qiniu Kodo with your credentials. Use narrowly scoped AK/SK values, verify the qshell download from an official source when possible, review deletion and bucket-creation requests before allowing them, and rotate any secret keys that were pasted into chat or logs.

Vulnerability Patterns
  • Insecure DependenciesIntroduces malicious components through unsafe dependency sources
  • 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
Findings (1)

T08 · Insecure Dependencies

Warning
Location
SKILL.md:73
Finding

Downloaded qshell Executable Is Run Without Integrity Verification

Content
View full analysis

Vulnerability Details

File Location: SKILL.md, lines 73–81
Vulnerability Type: Unverified third-party executable download
Risk Level: Medium

bash
curl -L \
  -H "Referer: https://developer.qiniu.com/kodo/1302/qshell" \
  -H "User-Agent: Mozilla/5.0" \
  "https://kodo-toolbox-new.qiniu.com/qshell-v2.18.0-linux-amd64.tar.gz?ref=developer.qiniu.com&s_path=%2Fkodo%2F1302%2Fqshell" \
  -o qshell-v2.18.0-linux-amd64.tar.gz

tar -xzf qshell-v2.18.0-linux-amd64.tar.gz
chmod +x qshell
./qshell -v

Technical Analysis

The documented workflow downloads a precompiled executable archive from an external service, extracts it, makes the resulting binary executable, and runs it without first verifying a pinned cryptographic digest or a trusted digital signature.

HTTPS protects the artifact while in transit under normal conditions, but it does not independently establish release integrity if the distribution endpoint, publishing account, certificate trust chain, or hosted artifact is compromised. The extraction step also occurs without validating archive member paths or extracting into an isolated directory.

Attack Path

  1. An attacker compromises the external distribution endpoint, its publishing process, or the hosted release artifact.
  2. The attacker replaces the expected archive with one containing a malicious qshell executable or unsafe archive entries.
  3. The documented curl command downloads the substituted archive successfully because no expected hash or signature is checked.
  4. The archive is extracted into the current working directory without prior archive-path validation.
  5. The downloaded qshell file receives execute permission and is run.
  6. The malicious executable operates with the privileges of the user or Agent running the workflow.

Impact Assessment

Successful exploitation permits arbitrary code execution with the privileges of the invoking user. Depending on that user's access, the malicious executable could rea ...[truncated 440 chars]

Remediation
View remediation

Remediation Suggestions

  1. Obtain an official SHA-256 or stronger digest through a separately trusted channel and pin it in the Skill.
  2. Verify the archive before extraction and terminate on mismatch:
bash
EXPECTED_SHA256="PINNED_OFFICIAL_DIGEST"
printf '%s  %s\n' \
  "$EXPECTED_SHA256" \
  "qshell-v2.18.0-linux-amd64.tar.gz" | sha256sum --check -
  1. Prefer a digitally signed release and verify its signature against a pinned, trusted vendor key.
  2. Download to a newly created private temporary directory rather than the current working directory.
  3. List and validate archive members before extraction; reject absolute paths and entries containing parent-directory traversal components.
  4. Extract only after validation, using restrictive permissions and an isolated destination.
  5. Execute the binary as an unprivileged user with only the filesystem and network access required for the requested Qiniu operation.
  6. Avoid exposing unrelated environment variables or credentials to the downloaded process, and use narrowly scoped, short-lived Qiniu credentials where supported.
  7. Update the pinned version and digest through an explicit review process rather than automatically following an unpinned latest release.
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
  • MCP Tool PoisoningHidden Instructions, Unicode Deception, Parameter Description Injection
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Supply ChainUnpinned Dependencies, External Script Fetching, Obfuscated Code
Findings (9)

Tp4

High
Category
MCP Tool Poisoning
Confidence
97% confidence
Finding

The declared description focuses on operational tasks such as setting up qshell, configuring credentials, listing/querying buckets, and transferring files (upload/download). However, the actual code performs bucket creation via qshell mkbucket, which is a separate resource-provisioning capability not stated in the description. This is a material undeclared capability rather than a minor implementation detail, so the description does not accurately represent the code chunk.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
98% confidence
Finding

The description focuses on setup, bucket querying, and file upload/download scenarios, but the code performs a delete operation on an object in a bucket. Deletion is a materially different storage capability and is not declared in the stated purpose. Therefore the code's actual behavior is not accurately represented by the description.

Content

No source excerpt is available for this finding.

Docker Socket Access

High
Category
Privilege Escalation
Confidence
90% confidence
Finding

Potential security issue detected. Manual review is recommended.

Content

Scanner excerpt · SKILL.md (reported line 414)May include surrounding context.

convert-document-to-markdown 依赖 Docker。若当前会话没有 Docker socket 权限,会报:

text
permission denied while trying to connect to the docker API at unix:///var/run/docker.sock

这通常说明:

Docker Socket Access

High
Category
Privilege Escalation
Confidence
90% confidence
Finding

Potential security issue detected. Manual review is recommended.

Content

Scanner excerpt · SKILL.md (reported line 426)May include surrounding context.

convert-document-to-markdown 依赖 Docker。若当前会话没有 Docker socket 权限,会报:

text
permission denied while trying to connect to the docker API at unix:///var/run/docker.sock

这通常说明:

Description-Behavior Mismatch

Medium
Category
Not specified by scanner
Confidence
96% confidence
Finding

The manifest description limits the skill to downloading qshell, configuring accounts, querying buckets, uploading files, and downloading files. However, the body of the skill also documents creating new buckets and deleting objects as supported use cases, which are write/destructive storage-management operations beyond the manifest's stated scope.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The script performs bucket creation via qshell mkbucket, which exceeds the declared skill scope of upload/download/query operations. This is dangerous because a user invoking what appears to be a storage-transfer skill could be induced to create new cloud resources, causing unauthorized infrastructure changes, policy bypass, or unexpected billing and persistence surfaces.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

Medium
Category
Not specified by scanner
Confidence
96% confidence
Finding

The script performs object deletion even though the skill metadata describes only download, configuration, query, and upload/download workflows. This capability mismatch is dangerous because it expands the skill's effective permissions and can enable unintended or undisclosed destructive actions against user storage, especially if an agent selects the skill based on the safer manifest description.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

Low
Category
Not specified by scanner
Confidence
82% confidence
Finding

The manifest description mentions querying buckets, which implies bucket-level inspection. In the detailed commands, the documented query operation is qshell stat <bucket> <key>, which checks object metadata/existence within a bucket rather than a bucket-level query, indicating a semantic mismatch in described behavior.

Content

No source excerpt is available for this finding.

Missing User Warnings

Low
Category
Not specified by scanner
Confidence
87% confidence
Finding

The script writes the remote object key to a predictable plaintext temporary file under the destination directory and never removes it. While the object key is not necessarily a secret by itself, it can expose internal object names or paths and may persist longer than needed, especially if the destination directory is shared, backed up, or accessible by other users/processes.

Content

No source excerpt is available for this finding.

Static analysis

No suspicious patterns detected.