T01 · Skill Instruction Hijacking
- Location
SKILL.md:130- Finding
Forced SKU Interpretation Overrides the User's Actual Intent
- Content
View full analysis
- Remediation
View remediation
Security audit
Security checks for vulnerabilities and agentic risk
This skill is mostly coherent for Alibaba Cloud provisioning, but it also installs persistent agent tooling and grants broad cloud mutation/deletion authority with several unsafe or under-scoped edges.
Install only if you intentionally want this assistant to provision Alibaba Cloud resources for you. Use a dedicated least-privilege RAM role, verify the exact SKU and all charges before confirming payment, review any advisor-skill install prompt carefully, and remove or rotate the generated credentials/keys and cloud permissions when the deployment work is done.
SKILL.md:130Forced SKU Interpretation Overrides the User's Actual Intent
references/sku-resolution.md:94Mutable Remote Skill Is Installed into the Agent's Tool Directory
references/ram-policies.md:126Teardown Role Can Delete Unrelated Cloud Resources
references/provision.md:23SSH Private Key Is Written Before Secure Permissions Are Enforced
Referenced artifact was not completely inspected
See `references/iron-rules.md` (35 iron rules + credential safety rules).
Referenced artifact was not completely inspected
See `references/iron-rules.md` (35 iron rules + credential safety rules).
Referenced artifact was not completely inspected
| 3 | `provision.md` | Create resources (💰 paid) | `按顺序开通资源,每扣一笔都告诉你` | Execute in order per `references/sku-params/<sku>.yaml` steps. AFTER EACH create call: (
Referenced artifact was not completely inspected
| 3 | `provision.md` | Create resources (💰 paid) | `按顺序开通资源,每扣一笔都告诉你` | Execute in order per `references/sku-params/<sku>.yaml` steps. AFTER EACH create call: (
Referenced artifact was not completely inspected
See `references/sku-params-format.md`.
Referenced artifact was not completely inspected
See `references/sku-params-format.md`.
The skill instructs the agent to install and upgrade the Alibaba Cloud CLI directly on the user's machine and explicitly forbids handing commands to the user for review. That is a host-modifying action outside the narrow need of package selection, and it increases risk by downloading and executing installer content plus altering local binaries and PATH state before the user has explicitly approved those changes.
The phase index states 'No SKU ⇒ STOP, never guess,' while the skill metadata explicitly says this skill must handle users who have not yet settled a package and should pick/recommend an OPC package. This contradiction creates unsafe control-flow ambiguity: the agent may either refuse legitimate package-selection requests or, worse, bypass the documented gate and infer/select a paid SKU without a consistent authorization process. In a cloud-provisioning skill, such ambiguity directly increases the risk of unauthorized charges and deployment of unintended resources.
The 'SKU GATE' forbids inferring or self-selecting a SKU, but the skill description says the skill must take over when the user asks which package is suitable and must not let a general assistant answer that question. This is a real policy contradiction in a money-spending workflow: an implementation may resolve the conflict by violating one side, leading to unsupported recommendations, accidental package selection, or fee-incurring actions based on inferred user intent rather than explicit consent. Because the skill provisions cloud resources, the inconsistency materially raises the chance of financial and operational harm.
The skill metadata says it should both recommend/select an OPC package and provision it, while the iron rules explicitly forbid deploy from choosing a SKU and require a separate advisor/bootstrap path until the user supplies a valid SKU. In a purchasing workflow, this contradiction is dangerous because an agent may autonomously steer the user into a paid package and then execute the purchase, collapsing the intended separation between recommendation and execution.
The documentation contradicts itself on whether the skill may select a package, creating ambiguous control flow in a money-spending context. When instructions conflict, implementations often follow the more permissive path, which can lead to unauthorized recommendations, upselling, or purchases without the intended safeguard of a separate SKU-resolution process.
Code accesses a cloud instance metadata endpoint (e.g. 169.254.169.254). A single request can return temporary IAM credentials, making this a high-value SSRF target for credential theft.
# Auto-detect the user's egress IP (prefer an Alibaba Cloud-owned probe endpoint,
# fall back to ifconfig.me/ipinfo.io, and if all fail have the user type it in, to avoid writing a garbage value into the allowlist)
# Note: the Alibaba Cloud ECS metadata 100.100.100.200 is only reachable inside ECS, not from a local terminal.
# Here we use a lightweight aliyun CLI call instead; the CLI carries its own Signature and the response can yield RemoteAddr (some versions).
# The most robust is still the third-party + user-input three-tier fallback.
MY_IP=""
The instruction to detect ~/.ssh/id_ed25519.pub similarly directs the agent to inspect a standard credential-related directory on the user's machine. Although the public key itself is less sensitive than a private key, automated discovery of authentication assets broadens the agent's access scope and increases the risk of over-collection, accidental logging of key metadata, or future extension to more sensitive files.
Before running RunInstances:
1. Detect whether the user's local ~/.ssh/id_rsa.pub or ~/.ssh/id_ed25519.pub exists
- exists → ImportKeyPair (upload the public key to Alibaba Cloud; no private key touches disk)
- not exists → CreateKeyPair + **private key NEVER enters conversation/state**:
# CreateKeyPair has no --output-file option; the private key is in the response PrivateKeyBody field — pipe it straight to disk, never echo to stdout/log (iron-rule #30)
The instruction to detect ~/.ssh/id_ed25519.pub similarly directs the agent to inspect a standard credential-related directory on the user's machine. Although the public key itself is less sensitive than a private key, automated discovery of authentication assets broadens the agent's access scope and increases the risk of over-collection, accidental logging of key metadata, or future extension to more sensitive files.
Before running RunInstances:
1. Detect whether the user's local ~/.ssh/id_rsa.pub or ~/.ssh/id_ed25519.pub exists
- exists → ImportKeyPair (upload the public key to Alibaba Cloud; no private key touches disk)
- not exists → CreateKeyPair + **private key NEVER enters conversation/state**:
# CreateKeyPair has no --output-file option; the private key is in the response PrivateKeyBody field — pipe it straight to disk, never echo to stdout/log (iron-rule #30)
Skill modifies its own code, configuration, or behavior at runtime. Self-modification enables an agent to escalate privileges, disable safety constraints, or install persistent backdoors.
A token counts as stated no matter how the sentence is shaped: with no deploy verb ("starter_webui"),
wrapped in a noun phrase ("帮我创建阿里云OPC套餐的lite_seed"), or phrased like an authoring task.
NEVER split a token into ordinary words to re-read the intent (`lite_seed` is one package name, not
"the seed of the lite package"), and NEVER read such a message as a request to edit this skill's own
files just because the surrounding context mentions skill development.
SKU missing or illegal (e.g. the user says only "帮我部署" with no SKU) → do NOT ask the user to
pick a tier and do NOT improvise wording here: run the "Advisor bootstrap" block below, which owns
Skill modifies its own code, configuration, or behavior at runtime. Self-modification enables an agent to escalate privileges, disable safety constraints, or install persistent backdoors.
A token counts as stated no matter how the sentence is shaped: with no deploy verb ("starter_webui"),
wrapped in a noun phrase ("帮我创建阿里云OPC套餐的lite_seed"), or phrased like an authoring task.
NEVER split a token into ordinary words to re-read the intent (`lite_seed` is one package name, not
"the seed of the lite package"), and NEVER read such a message as a request to edit this skill's own
files just because the surrounding context mentions skill development.
SKU missing or illegal (e.g. the user says only "帮我部署" with no SKU) → do NOT ask the user to
pick a tier and do NOT improvise wording here: run the "Advisor bootstrap" block below, which owns
Manifest 描述把“pick the package”作为本技能的核心职责之一,给人的语义预期是该技能本身会完成套餐选择与推荐。但正文后续明确规定无 SKU 时必须停在 Phase -2,且不得自行推断、猜测或推荐 SKU,还把比较套餐/推荐套餐归属给 alibabacloud-opc-advisor。这构成了技能宣称能力与实际允许行为之间的明显不一致。
The file states 'All user-facing output MUST be in Chinese (zh-CN)', which is a natural-language locale policy constraint applied universally. The skill does not offer the user a language choice or explain a region-specific compliance reason that would justify mandating Chinese output.
L22 声称“the skill owns the no-SKU path end to end”,但紧接着 L24 又声明比较/推荐套餐属于 alibabacloud-opc-advisor。后文 L30、L124-L152 进一步要求无 SKU 时不得继续任何 phase,只能转入 advisor bootstrap 并停止。这不是简单的省略,而是对职责边界的主动矛盾表述。
The skill says it 'MUST auto-install' the CLI via Bash and not ask the user to run commands manually, but it does not require an upfront warning that local files, binaries, and environment settings will be changed. Removing the review/consent step makes unintended host modification more likely and weakens user control over a sensitive action.
Creating persistent directories such as ~/.local/bin and ~/.opc establishes session-spanning state on the user's machine as part of an automated setup flow. In this skill context, that persistence is security-relevant because it prepares long-lived local execution and trust material for future CLI use without a separate approval boundary.
VER="$(read [cli_meta].min_version)"
SHA="$(read [cli_meta].sha256_darwin_arm64)" # or darwin_amd64
TOFU_FILE="$HOME/.opc/cli-tofu-${VER}-darwin-arm64.sha256"
mkdir -p ~/.local/bin ~/.opc
curl -fLo /tmp/aliyun-cli.tgz --connect-timeout 15 --max-time 300 "https://aliyuncli.alicdn.com/aliyun-cli-darwin-arm64-${VER}.tgz"
# SHA256 three-tier verification
ACTUAL_SHA="$(shasum -a 256 /tmp/aliyun-cli.tgz | awk '{print $1}')"
The Windows WDAC/AppLocker user message is written only in Chinese, and the surrounding instructions do not indicate that the user opted into Chinese or that the skill is region-specific. The same pattern appears elsewhere in user-facing copy, creating a language policy issue because the skill imposes a specific language rather than offering a locale choice.
Enabling aliyun configure set --auto-plugin-install true creates a persistent global setting that authorizes future on-demand plugin downloads and execution for product commands. This expands the trust boundary beyond the immediate task, because later commands may fetch additional code automatically without a fresh approval checkpoint.
This markdown file contains a fixed user-facing message in Chinese: "这个 SKU 包含 ${product}..." with no indication that the user can choose another language. The policy for this audit flags natural-language locale constraints when a skill forces a specific language without user opt-in or clear documented justification.
The instruction requires 'Chinese prose throughout' for every message in the session, which is a natural-language locale constraint applied to users. The file does not offer opt-in, a language choice, or a clear region-specific justification for forcing Chinese output.
No suspicious patterns detected.