T09 · Insecure Skill Coding Practices
- Location
references/required-confirmation-model.md:5- Finding
Confirmation Flag Can Be Added Without Explicit User Approval
- Content
View full analysis
- Remediation
View remediation
Security audit
Security checks for vulnerabilities and agentic risk
The skill mostly matches its Alibaba Cloud Flink purpose, but it gives an agent weak control over paid create operations and includes broader cloud setup guidance than the Flink-only scope needs.
Install only if you are comfortable letting the agent create Alibaba Cloud Flink resources. Use a RAM identity limited to the listed stream actions, require the agent to show the exact final command, region, resource size, and billing impact before any create operation, and avoid the unrelated ECS/plugin examples. Prefer a pinned and verified Aliyun CLI installation or skip the optional CLI setup if it is not needed.
references/required-confirmation-model.md:5Confirmation Flag Can Be Added Without Explicit User Approval
scripts/instance_ops.py:178Conflicting and Non-Positive Resource Specifications Are Accepted
references/cli-installation-guide.md:33Aliyun CLI Installation Uses Mutable Unverified Binaries
The declared behavior says the skill is limited to Alibaba Cloud Flink create/query operations, but the detected behavior indicates local file generation and overwrite capability unrelated to that purpose. This mismatch is dangerous because it defeats operator expectations and can be abused to write or replace local artifacts, enabling data tampering, persistence, or staging of further malicious actions under the cover of a benign cloud-management skill.
The documentation uses ECS verification commands even though the skill manifest explicitly rejects unrelated cloud services such as ECS. Including runnable ECS operations normalizes out-of-scope service access and may cause an agent or user to validate credentials using broader permissions than the Flink-only skill should require.
The skill is narrowly scoped to create/query-only Alibaba Cloud Flink VVP instances and namespaces, but this reference guide explicitly teaches generic plugin installation and exploration of unrelated services such as ECS and Function Compute. In an agent skill context, broad operational instructions can expand the effective capability surface beyond the declared policy boundary, making prompt misuse or accidental cross-service actions more likely.
The skill does not declare any explicit tool scope such as allowed-tools or permissions, yet the surrounding package reportedly includes file read/write capabilities. In an agentic environment, missing tool scoping can let the skill access local files beyond what users expect, increasing the chance of unauthorized data exposure or unintended file modification if the wrapper or referenced assets are invoked.
Commands invoke sudo or root privileges. Verify this elevated access is necessary and justified.
tar -xzf aliyun-cli-macosx-latest-amd64.tgz
# Move to PATH
sudo mv aliyun /usr/local/bin/
# Verify
aliyun version
Commands invoke sudo or root privileges. Verify this elevated access is necessary and justified.
tar -xzf aliyun-cli-macosx-latest-amd64.tgz
# Move to PATH
sudo mv aliyun /usr/local/bin/
# Verify
aliyun version
Commands invoke sudo or root privileges. Verify this elevated access is necessary and justified.
tar -xzf aliyun-cli-macosx-latest-amd64.tgz
# Move to PATH
sudo mv aliyun /usr/local/bin/
# Verify
aliyun version
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.
1. Log in to Aliyun Console: https://ram.console.aliyun.com/
2. Navigate to: AccessKey Management
3. Create a new AccessKey pair
4. Save the secret immediately — it's only shown once
### Configuration Modes
The guide documents six generic Alibaba Cloud authentication modes, including role assumption and cross-account access, which materially exceeds the narrow create/query-only Flink use case. In a constrained agent skill, broad credential onboarding increases the chance of over-privileged setup, cross-account reach, and misuse of credentials outside the intended scope.
Commands invoke sudo or root privileges. Verify this elevated access is necessary and justified.
# Restrict permissions
chmod 600 ~/.aliyun/config.json
Skill enables autonomous high-impact decisions without human-in-the-loop verification. Critical operations (destructive commands, financial transactions, data deletion) should require explicit user confirmation.
---
## Pattern 6: Claiming Success Without Verification
**Scenario**: Reporting success after create response only
Skill enables autonomous high-impact decisions without human-in-the-loop verification. Critical operations (destructive commands, financial transactions, data deletion) should require explicit user confirmation.
❌ Wrong:
# Create instance without checking if it exists
python scripts/instance_ops.py create \
--name my-instance \
...
Commands invoke sudo or root privileges. Verify this elevated access is necessary and justified.
sudo apt-get install python3 python3-pip
Commands invoke sudo or root privileges. Verify this elevated access is necessary and justified.
sudo apt-get install python3 python3-pip
Commands invoke sudo or root privileges. Verify this elevated access is necessary and justified.
sudo apt-get install python3 python3-pip
Commands invoke sudo or root privileges. Verify this elevated access is necessary and justified.
sudo apt-get install python3 python3-pip
Commands invoke sudo or root privileges. Verify this elevated access is necessary and justified.
sudo apt-get install python3 python3-pip
The description says the skill should be used when the user asks in Chinese or English, which imposes a language constraint in the natural-language policy without presenting it as a user choice or justified locale-specific limitation. This is a policy-style language restriction rather than a technical requirement.
The sample configuration sets "language": "en", which is a natural-language locale choice embedded in the guide. Because the document does not present this as optional or offer alternatives, it can be read as prescribing English by default, which conflicts with the policy against forcing a specific language without user opt-in.
Dynamic getattr() with a non-literal attribute name can access arbitrary object attributes, potentially bypassing access controls.
"""Call API with timeout runtime options when available."""
method_with_options = None
for candidate in (f"{method_name}_with_options", f"{method_name}with_options"):
method_with_options = getattr(self.client, candidate, None)
if method_with_options:
break
Dynamic getattr() with a non-literal attribute name can access arbitrary object attributes, potentially bypassing access controls.
return method_with_options(self.runtime_options)
return method_with_options(request, self.runtime_options)
method = getattr(self.client, method_name)
if request is None:
return method()
return method(request)
No suspicious patterns detected.