Back to skill

Security audit

aliyun-oss

Security checks for vulnerabilities and agentic risk

Overview

This Aliyun OSS skill mostly matches its storage-management purpose, but it persists cloud secrets in shell startup files and has unsafe deletion behavior that users should review before installing.

Review carefully before installing. Use a narrowly scoped Aliyun RAM/STS credential, avoid passing secrets in shell history, remove any generated exports from shell startup files, rotate credentials if already used, and do not rely on the documented delete confirmation unless the implementation is fixed.

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 (4)

T09 · Insecure Skill Coding Practices

Error
Location
scripts/setup.sh:237
Finding

Long-Lived OSS Credentials Exposed Through Command Arguments and Shell Startup Files

Content
View full analysis
/dev/null; then cat >> "$SHELL_RC" <
Remediation
View remediation

T09 · Insecure Skill Coding Practices

Warning
Location
scripts/oss_node.mjs:317
Finding

Object Deletion Proceeds Without the Advertised Confirmation

Content
View full analysis
Remediation
View remediation

T09 · Insecure Skill Coding Practices

Error
Location
docs/EXAMPLES.md:228
Finding

Shell Command Injection in Documented Automation Examples

Content
View full analysis
{ if (filename.endsWith('.jpg') || filename.endsWith('.png') || filename.endsWith('.gif')) { const localPath = path.join(imageDir, filename); const key = `images/${filename}`; try { execSync(`node scripts/oss_node.mjs upload --local "${localPath}" --key "${key}"`); console.log(`✅ ${filename} 上传成功`); uploaded++; } catch (error) { console.error(`❌ ${filename} 上传失败:`, error.message); } } }); ``` ### Technical Analysis `child_process.execSync()` executes its string through a command shell. The examples interpolate OSS object keys and local filenames directly into that shell command. In the cleanup example, `file.key` is not quoted or escaped at all. An object key containing shell separators, substitutions, redirections, or whitespace can alter the command. In the batch-upload example, double quotes do not provide safe parameterization. A filename containing a double quote can terminate the quoted argument and introduce shell syntax. Shell substitutions may also be interpreted dependin ...[truncated 1889 chars]
Remediation
View remediation

T08 · Insecure Dependencies

Warning
Location
package.json:11
Finding

Mutable and Unlocked Dependency Installation

Content
View full analysis
/dev/null 2>&1 fi # 安装 ali-oss SDK if npm install ali-oss --save 2>/dev/null; then log_info "✅ ali-oss Node.js SDK 安装成功" return 0 ``` No package lockfile is present in the audited project structure. ### Technical Analysis The declared dependency uses the mutable semver range `^6.21.0`, allowing future compatible releases to be selected. The setup script is less restrictive and runs `npm install ali-oss --save`, resolving the package and its transitive dependency graph from the active npm registry at installation time. Without a committed lockfile and integrity-pinned dependency graph, two users installing the same audited Skill can receive materially different code. The installation also does not suppress package lifecycle scripts. If a future direct or transitive dependency release is compromised, its installation hooks may execute before the Skill itself runs. This finding does not establish that the current `ali-oss` package is malicious. It identifies a supply-chain weakness that prevents the reviewed source tree from fully determining the code ultimately installed and executed. ### Attack Path 1. A user runs `scripts/setup.sh --install-sdk`, the documented setup flow, or ordinary `npm install`. 2. npm resolves `ali-oss` and transitive packages from the configured registry using mutable version constraints. 3. A future release, compromised maintainer account, regi ...[truncated 1048 chars]
Remediation
View remediation
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
  • Excessive AgencyUnrestricted Tool Access, Autonomous Decision Making, Scope Creep
  • Trigger AbuseOverly Broad Trigger, Shadow Command Trigger, Keyword Baiting Trigger
  • MCP Least PrivilegeUnderdeclared Capability, Wildcard Permission, Missing Permission Declaration
Findings (31)

Tp4

High
Category
MCP Tool Poisoning
Confidence
95% confidence
Finding

The documented purpose focuses on OSS object operations, but the detected behavior includes credential persistence to shell profiles, local storage of AccessKey secrets, and environment/package installation. This mismatch is dangerous because users may grant trust for routine storage actions without realizing the skill also modifies the host environment and persists sensitive credentials.

Content

No source excerpt is available for this finding.

Ae1

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

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

md
node scripts/oss_node.mjs test-connection

Ae1

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

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

md
node scripts/oss_node.mjs test-connection

Ae1

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

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

md
node scripts/oss_node.mjs test-connection

Ae1

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

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

md
node scripts/oss_node.mjs test-connection

Ae1

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

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

md
node scripts/oss_node.mjs test-connection

Ae1

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

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

md
node scripts/oss_node.mjs test-connection

Ae1

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

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

md
node scripts/oss_node.mjs test-connection

Missing User Warnings

High
Category
Not specified by scanner
Confidence
99% confidence
Finding

Appending cloud credentials to the user's shell startup file without explicit consent creates durable plaintext secret exposure and automatically re-loads those credentials into future shells. This broadens the blast radius because many unrelated programs and scripts may inherit the secrets, making accidental leakage and abuse more likely.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
91% confidence
Finding

This markdown file documents object deletion as a feature and includes an example using delete --force, but it does not warn that the action may permanently remove remote data. For markdown files, destructive behaviours that can affect user data should include an explicit warning about impact and caution around use.

Content

No source excerpt is available for this finding.

Undeclared Tool Scope

Medium
Category
MCP Least Privilege
Confidence
93% confidence
Finding

The skill advertises shell-based setup and execution commands but does not declare any tool scope such as permissions or allowed-tools. That omission weakens policy enforcement and makes it harder to constrain what the skill may execute, increasing the chance of unintended command execution during installation or operation.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
92% confidence
Finding

The documentation instructs users to provide AccessKey ID and AccessKey Secret directly in commands and configuration examples without any warning about secret exposure. This is dangerous because command-line arguments may be captured in shell history or process listings, and plaintext config storage can leak long-lived cloud credentials.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
94% confidence
Finding

The skill exposes delete functionality, including a force option, without warning that object removal may be irreversible or cause data loss. In a storage-management context, destructive operations are expected, but the absence of safety guidance increases the risk of accidental deletion by users or agents.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The file includes multiple natural-language placeholder values in Chinese, which imposes a specific language on users without any opt-in or documented locale justification. Per policy, forcing a specific language or locale without user choice is a natural-language policy violation.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
93% confidence
Finding

The examples document includes destructive operations such as forced deletion and batch deletion without prominent warnings about irreversibility, dry-run guidance, or safeguards like confirmation for bulk actions. In a storage-management skill, users may copy-paste these commands directly, increasing the chance of accidental permanent data loss.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The automated backup script performs both local and cloud cleanup automatically, including force deletion of cloud objects based on computed age, without safety checks such as dry-run mode, prefix validation, logging review, or recovery guidance. Because this is automation in a storage skill, a logic error, time calculation mistake, or unexpected file metadata could lead to large-scale unintended deletion.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
96% confidence
Finding

The delete command prints a warning implying an interactive confirmation, but the code performs the deletion immediately regardless of user response because no actual prompt is implemented. This can mislead users and automation into believing there is a safety gate, increasing the risk of accidental irreversible object deletion.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
94% confidence
Finding

Batch deletion enables destructive multi-object removal from a user-supplied file with no warning, preview, or confirmation step. In the context of an OSS management skill, this materially increases the chance of large-scale accidental data loss from malformed input files, operator mistakes, or unsafe automation.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
94% confidence
Finding

The script persists cloud credentials to a local JSON config file on disk without any warning, confirmation, or safer secret-handling option. Even with chmod 600, plaintext secrets at rest are vulnerable to endpoint compromise, insecure backups, accidental inclusion in archives, and later mishandling by other tools.

Content

No source excerpt is available for this finding.

Sudo/Root Execution

Medium
Category
Privilege Escalation
Confidence
80% confidence
Finding

Commands invoke sudo or root privileges. Verify this elevated access is necessary and justified.

Content

Scanner excerpt · scripts/setup.sh (reported line 231)May include surrounding context.

sh
EOF
    
    # 设置权限
    chmod 600 "$CONFIG_FILE"
    
    log_info "✅ 配置文件已创建: $CONFIG_FILE"
}

Context-Inappropriate Capability

Medium
Category
Not specified by scanner
Confidence
98% confidence
Finding

The script writes OSS access credentials directly into the user's shell startup file as exported environment variables, causing long-lived secret persistence in plain text. This increases exposure to local compromise, accidental disclosure via dotfile backups or support bundles, and unintended inheritance by child processes.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
75% confidence
Finding

A language or locale policy issue can arise when a skill effectively forces a specific language without offering user choice or documenting that constraint. This README presents all user-facing instructions in Chinese and does not indicate that the language is optional or region-specific.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
91% confidence
Finding

The natural-language instructions and examples are presented only in Chinese, which may force a specific language on users without opt-in. The policy allows locale constraints when they are explicitly optional or clearly justified, but no such choice or justification is provided here.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
95% confidence
Finding

The manifest description is written only in Chinese ("阿里云 OSS 对象存储技能"), which indicates a language-specific presentation without any indication of user opt-in or multilingual support. Under the stated policy, forcing a specific language without user choice can be a natural-language policy violation unless clearly justified as region-specific.

Content

No source excerpt is available for this finding.

Vague Triggers

Low
Category
Not specified by scanner
Confidence
85% confidence
Finding

This is a manifest/config JSON file, so SQP-1 applies. The example values use natural-language placeholders in Chinese but provide no surrounding description of scope, usage context, or constraints, making the intended audience and activation context of this example unclear.

Content

No source excerpt is available for this finding.

Static analysis

No suspicious patterns detected.