Back to skill

Security audit

qwencloud-observe

Security checks for vulnerabilities and agentic risk

Overview

This observability skill mostly fits its purpose, but it asks for powerful cloud access that can run commands and install monitoring software on servers without enough scoping or consent.

Review this before installing if you expect a strictly read-only observer. Use a tightly scoped, temporary Alibaba Cloud RAM role if possible, remove or separate cms:InstallMonitoringAgent and broad ecs:RunCommand access, verify the Aliyun CLI from an official pinned source, and do not run it against projects whose .qwencloud-deploy file you do not trust.

Vulnerability Patterns
  • Unauthorized Access and Privilege EscalationObtains permissions beyond the task's legitimate needs
  • 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
Findings (5)

T09 · Insecure Skill Coding Practices

Error
Location
references/observe_application.md:24
Finding

Remote Command Injection Through Unvalidated Deployment State Fields

Content
View full analysis
--Type RunShellScript --InstanceId.1 \ --ContentEncoding Base64 \ --CommandContent "$(printf '%s' 'systemctl is-active ; systemctl is-active nginx; ss -ltnp | grep -E ":80|:" || true' | base64)" ``` The values used in this command are obtained from the project-controlled deployment state: ```text 2. Parse the JSON state file. Extract: - `region_id`, `stack_id`, `topology`, `app_type`, `nginx_mode`, `app_port` - `service_name` (service name, used for service/log checks; falls back to `qwencloud-app` when missing) - `outputs.public_ip`, `outputs.ecs_instance_ids[]`, `outputs.security_group_id`, `outputs.eip_allocation_id` ... 4. Validate region and resource IDs are non-empty. Missing critical IDs → mark the affected layer `unknown` with the reason. ``` The same untrusted service name is also inserted into log commands: ```bash journalctl -u --since '1 hour ago' --no-pager | tail -n 200 tail -n 200 /var/log/nginx/error.log ``` ### Technical Analysis The instructions require values such as `service_name` and `app_port` to be read from `.qwencloud-deploy` and substituted directly into shell source code. The documented validation only checks whether region and resource identifiers are non-empty. It does not require `service_name` to follow systemd unit-name syntax or `app_port` to be a numeric TCP port. An attacker-controlled value containing shell metacharacters, command substitutions, quotes, semicolons, or newlines could terminate the intended argument and add arbitrary shell commands. Encoding the resulting script with Base64 only prepares it for transport throug ...[truncated 1509 chars]
Remediation
View remediation

T05 · Unauthorized Access and Privilege Escalation

Error
Location
references/ram_policies.md:31
Finding

Overprivileged RAM Policy Grants Account-Wide Remote Execution and Billing Access

Content
View full analysis
Remediation
View remediation

T05 · Unauthorized Access and Privilege Escalation

Warning
Location
references/observe_ecs.md:29
Finding

CloudMonitor Agent Is Installed Without an Explicit State-Change Confirmation

Content
View full analysis
# When not running, install via API (region = ), then poll DescribeMonitoringAgentStatuses until running: aliyun cms InstallMonitoringAgent --RegionId --Force true --InstanceIds.1 aliyun cms DescribeMetricList --Namespace acs_ecs_dashboard --MetricName memory_usedutilization \ --Dimensions '[{"instanceId":""}]' --StartTime --EndTime --Period 60 ``` The general interaction rule states: ```text - **State-changing actions** (entering operate, exporting a report): use AskUserQuestion whose prompt answers **what it does** · **impact** · **how to verify**; do nothing before the user confirms. ``` ### Technical Analysis The Skill describes itself as read-only, but its preferred memory-observation path installs monitoring software on the ECS instance with `--Force true`. Installation is a persistent state change and can modify packages, services, files, resource consumption, and outbound communication behavior on the remote system. The instructions require confirmation for some state-changing actions, but do not apply that confirmation requirement to CloudMonitor installation. Instead, installation occurs automatically whenever the agent is not running. This makes a routine observation requ ...[truncated 1164 chars]
Remediation
View remediation

T08 · Insecure Dependencies

Warning
Location
references/cli_installation_guide.md:5
Finding

Aliyun CLI Is Installed from an Unpinned and Unverified Latest Archive

Content
View full analysis
Remediation
View remediation

other

Note
Location
references/workflow.md:103
Finding

Observation Automatically Modifies the Project Timeline Despite Read-Only Claims

Content
View full analysis
Remediation
View remediation
Vulnerability Patterns
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
  • Excessive AgencyUnrestricted Tool Access, Autonomous Decision Making, Scope Creep
  • Tool MisuseTool Parameter Abuse, Chaining Abuse, Unsafe Defaults
  • MCP Least PrivilegeUnderdeclared Capability, Wildcard Permission, Missing Permission Declaration
  • MCP Tool PoisoningHidden Instructions, Unicode Deception, Parameter Description Injection
Findings (24)

Tp4

High
Category
MCP Tool Poisoning
Confidence
99% confidence
Finding

The manifest claims a read-only cloud observability skill, but the documented behavior is incomplete and internally inconsistent about what is actually implemented. This mismatch can mislead users and orchestration layers into granting trust or permissions to a skill that may not deliver the promised checks, causing false assurance during incident handling or cost review.

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 18)May include surrounding context.

md
- Python >= 3.8 (only if you render a report file with scripts/render_report.py)

Ae1

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

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

md
- Python >= 3.8 (only if you render a report file with scripts/render_report.py)

Ae1

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

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

md
- Python >= 3.8 (only if you render a report file with scripts/render_report.py)

Ae1

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

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

md
- Python >= 3.8 (only if you render a report file with scripts/render_report.py)

Ae1

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

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

md
- Python >= 3.8 (only if you render a report file with scripts/render_report.py)

Intent-Code Divergence

High
Category
Not specified by scanner
Confidence
97% confidence
Finding

The skill repeatedly claims read-only behavior, but the required permissions include cms:InstallMonitoringAgent, which is a state-changing action. This widens the trust boundary and could lead to unauthorized software installation on cloud instances under the guise of observation.

Content

No source excerpt is available for this finding.

Chaining Abuse

High
Category
Tool Misuse
Confidence
75% confidence
Finding

Tool calls are chained to bypass individual safety checks or escalate capabilities beyond what any single tool call would allow.

Content

Scanner excerpt · references/cli_installation_guide.md (reported line 12)May include surrounding context.

brew install aliyun-cli && brew upgrade aliyun-cli

Linux

wget https://aliyuncli.alicdn.com/aliyun-cli-linux-latest-amd64.tgz tar -xzf aliyun-cli-linux-latest-amd64.tgz && sudo mv aliyun /usr/local/bin/

aliyun version # verify 3.x

text

Description-Behavior Mismatch

High
Category
Not specified by scanner
Confidence
98% confidence
Finding

The documentation explicitly instructs the skill to install a CloudMonitor agent when memory metrics are absent, which is a write/action operation rather than the claimed read-only observation behavior. This creates a dangerous mismatch between the skill's stated scope and its actual capability, allowing an observability request to trigger remote software changes on production infrastructure.

Content

No source excerpt is available for this finding.

Context-Inappropriate Capability

High
Category
Not specified by scanner
Confidence
96% confidence
Finding

Including remote software installation capability in a reporting skill unnecessarily expands the attack surface and operational blast radius. Even if intended to improve observability, the ability to push an agent to cloud instances can alter system state, introduce compatibility or stability issues, and be abused under the guise of a harmless health check.

Content

No source excerpt is available for this finding.

Undeclared Tool Scope

Medium
Category
MCP Least Privilege
Confidence
92% confidence
Finding

The skill describes reading and writing local files but does not declare tool scope or permissions boundaries. In an agent environment, missing explicit scoping increases the chance of unintended file access or file creation beyond what users expect, especially because the skill also writes handoff and report artifacts.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The skill says cost output must be actual billed cost only, yet also permits optional month-end projection. For financial reporting and operational decisions, mixing actuals with estimates can mislead users into treating speculative values as authoritative billing data.

Content

No source excerpt is available for this finding.

Intent-Code Divergence

Medium
Category
Not specified by scanner
Confidence
97% confidence
Finding

The documentation contradicts itself on whether estimates are allowed, which creates ambiguous agent behavior and inconsistent outputs. In security-sensitive and billing-sensitive workflows, ambiguity increases the risk of incorrect downstream automation or user decisions based on mislabeled data.

Content

No source excerpt is available for this finding.

Sudo/Root Execution

Medium
Category
Privilege Escalation
Confidence
70% confidence
Finding

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

Content

Scanner excerpt · references/cli_installation_guide.md (reported line 12)May include surrounding context.

brew install aliyun-cli && brew upgrade aliyun-cli

Linux

wget https://aliyuncli.alicdn.com/aliyun-cli-linux-latest-amd64.tgz tar -xzf aliyun-cli-linux-latest-amd64.tgz && sudo mv aliyun /usr/local/bin/

aliyun version # verify 3.x

text

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
97% confidence
Finding

The skill instructs automatic monitoring-agent installation without warning or confirmation, so a user asking for status could unknowingly authorize a state-changing operation on live infrastructure. This violates user expectations for an observe-only workflow and removes an important consent checkpoint before modifying servers.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

Medium
Category
Not specified by scanner
Confidence
96% confidence
Finding

The skill is presented as an observational, mostly read-only capability, but it explicitly requests cms:InstallMonitoringAgent, which can modify the target ECS instance by installing software. That creates a privilege/behavior mismatch: a user or operator may grant the role assuming passive observation, while the skill can make system changes on production hosts.

Content

No source excerpt is available for this finding.

Intent-Code Divergence

Medium
Category
Not specified by scanner
Confidence
94% confidence
Finding

The documentation downplays risk by stating permissions are read-only except one and implying Cloud Assistant usage is only for harmless checks, yet the included permission set still authorizes a non-read-only operation. This kind of misleading framing can cause reviewers to miss that the skill is capable of changing monitored systems, weakening informed consent and least-privilege review.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
94% confidence
Finding

Installing a CloudMonitor agent is not a purely observational act; it changes the host and may affect package state, processes, network behavior, or compliance posture. Because the documentation does not clearly warn users at the point of capability description, an operator could authorize or run the skill without realizing it may alter production infrastructure.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

Listing cms:InstallMonitoringAgent among required permissions without an adjacent warning normalizes a write-capable permission inside what users expect to be a read-only observer. In this skill context, that mismatch is more dangerous because the skill targets live cloud workloads where silent agent deployment may violate change-control expectations or operational policy.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The workflow directs the skill to append an observe event to app_timeline.jsonl, which is a local state mutation. That contradicts the stated read-only behavior in the skill metadata and expands the skill from observation into persistence, creating integrity and trust-boundary issues because a reporting skill can silently alter project records on disk.

Content

No source excerpt is available for this finding.

Missing User Warnings

Low
Category
Not specified by scanner
Confidence
78% confidence
Finding

The skill description presents reporting as read-only observation, but later instructs the agent to write observe_handoff.json into the project directory when handing off to operate. Although entering operate is gated by user choice, the file-write side effect itself is not prominently disclosed in the top-level description or output summary, which could surprise users expecting no local changes from an observability skill.

Content

No source excerpt is available for this finding.

Missing User Warnings

Low
Category
Not specified by scanner
Confidence
89% confidence
Finding

The markdown explains that the skill can export Markdown or HTML reports and render them to files such as report.md, but this filesystem write behavior is only described deep in the document. For a skill whose headline behavior is observational and read-only, local file creation should be explicitly disclosed as a user-impacting action.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
81% confidence
Finding

The document states that the skill uses Alibaba Cloud International and that prices are in USD, which imposes a specific regional/commercial context. It does not indicate that users may choose a different locale or regional cloud environment, so this can be read as a locale policy constraint without explicit opt-in.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
93% confidence
Finding

This code emits HTML with a fixed English language declaration regardless of the user's locale or the report content. The policy specifically calls out forced language or locale choices without opt-in as a natural-language policy violation.

Content

No source excerpt is available for this finding.

Static analysis

No suspicious patterns detected.