Back to skill

Security audit

AES EMR YARN Analyzer

Security checks for vulnerabilities and agentic risk

Overview

The skill’s YARN analysis purpose is understandable, but it ships real-looking cloud and root SSH credentials and uses them in unsafe ways.

Do not install or run this skill as-is. Treat the included cloud key and root SSH password as exposed, rotate them, remove hard-coded secrets, require a non-root read-only account, enable SSH host-key verification, and replace the custom cloud authentication with the official provider SDK or signed requests.

Vulnerability Patterns
  • Unauthorized Access and Privilege EscalationObtains permissions beyond the task's legitimate needs
  • 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
config/config.yaml:5
Finding

Hard-coded cloud API and privileged SSH credentials

Content
View full analysis
Remediation
View remediation

T09 · Insecure Skill Coding Practices

Error
Location
scripts/analyze_yarn.py:105
Finding

Raw cloud secret transmitted through a nonstandard authorization header

Content
View full analysis
Remediation
View remediation

T09 · Insecure Skill Coding Practices

Error
Location
scripts/analyze_yarn.py:150
Finding

SSH host identity verification is disabled

Content
View full analysis
Remediation
View remediation

T05 · Unauthorized Access and Privilege Escalation

Warning
Location
scripts/analyze_yarn.py:229
Finding

SSH collection exceeds the minimum privileges required for YARN analysis

Content
View full analysis
/dev/null || echo 'N/A'", "yarn_nodes": "yarn node -list -all 2>/dev/null || echo 'N/A'", "yarn_apps": "yarn application -list -appStates ALL 2>/dev/null | head -200", "system_mem": "free -h", "system_cpu": "lscpu | grep -E 'CPU\\(s\\)|Model name'", "system_load": "uptime", "hdfs_report": "hdfs dfsadmin -report 2>/dev/null | grep -E 'Configured|Present|DFS Remaining|DFS Used' | head -10" } ``` ### Technical Analysis The declared purpose is analysis of YARN resource consumption. The command set additionally gathers host CPU details, host memory and load, and HDFS capacity information. Some host memory and load data appears in the report, but CPU-model data is collected and not used. The HDFS report is also collected but is not consumed by `generate_report`. These unused commands are not necessary for the stated output and expand the information available to the process. Running this collection through a root SSH account makes the privilege boundary substantially broader than required. Although these specific commands are primarily read-only, the credentials and execution mechanism can support unrestricted root commands if the code or runtime is later altered. ### Attack Path 1. The Skill authenticates to the configured public host with root credentials. 2. It executes YARN commands alongside host-inventory and HDFS-capacity commands. 3. The process obtains infrastructure information outside the minimum data required for YARN utilization reporting. 4. Anyone who compromises the Skill process, configuration, dependency chain, or credentials can reuse the unrestricted root channel for broader discovery or arbitrary administration. 5. The collected to ...[truncated 478 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 (13)

Tp4

High
Category
MCP Tool Poisoning
Confidence
97% confidence
Finding

The documented purpose is YARN resource analysis, but the skill behavior includes sensitive remote access via SSH, use of cloud access keys for direct API calls, local cookie/log persistence, and host-level/HDFS data collection beyond the stated scope. This mismatch is dangerous because operators may authorize the skill for a narrow diagnostic task while it actually performs broader privileged actions and handles secrets, creating risk of credential leakage, excessive collection, and trust bypass.

Content

No source excerpt is available for this finding.

Undeclared Tool Scope

Medium
Category
MCP Least Privilege
Confidence
90% confidence
Finding

The skill documents capabilities that require file access, local persistence, SSH, and external API/network use, but it declares no explicit tool scope or permission boundaries. This is dangerous because an agent/runtime may grant broader access than users expect, increasing the chance of over-privileged execution and unintended data exposure.

Content

No source excerpt is available for this finding.

Intent-Code Divergence

Medium
Category
Not specified by scanner
Confidence
91% confidence
Finding

L023 明确写明“禁止读取外部文件或依赖外部脚本”,属于对实现边界的主动声明。但后文 L080 和 L090 使用 ~/.openclaw/workspace/... 的外部绝对路径来执行脚本和读取日志,且 L062/L083 也表明脚本会读取配置文件,因此该文档表述与实际预期运行方式相矛盾。

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 · SKILL.md (reported line 153)May include surrounding context.

md
## 安全注意事项

1. **配置文件安全** - `config.yaml` 包含敏感信息,建议设置权限 `chmod 600 config/config.yaml`
2. **Cookie 存储** - `data/cookies.json` 仅 Skill 自身可读写
3. **日志脱敏** - 不记录完整的 AccessKey Secret
4. **最小权限** - 使用只读账号进行分析

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
93% confidence
Finding

The natural-language comments in this file are entirely in Chinese, which imposes a specific language expectation on users without offering an alternative or documenting why the locale is required. This can violate language or locale policy when no user opt-in or region-specific justification is provided in the file.

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’s user-facing natural-language content, including the module description and all logs/comments, is written exclusively in Chinese, which imposes a specific language/locale choice. There is no indication that the user can select a language or that the skill is intended only for a Chinese-specific compliance or regional context.

Content

No source excerpt is available for this finding.

Context-Inappropriate Capability

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The script stores and reloads cookie data locally despite the stated YARN analysis workflow not requiring browser/session cookies. Unnecessary persistence of authentication artifacts increases the chance of credential leakage from disk, log correlation, or reuse by other local processes, especially because the file is kept for 24 hours and there is no protection, encryption, or scope validation.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
92% confidence
Finding

The script sends sensitive cloud credentials and SSH credentials over the network without any user-facing disclosure, and the EMR API authentication is implemented as a custom Authorization header carrying access key ID and secret together. This is dangerous because it mishandles secrets, increases the blast radius of interception or logging, and deviates from standard cloud SDK signing practices that provide stronger request authentication controls.

Content

No source excerpt is available for this finding.

External Transmission

Medium
Category
Data Exfiltration
Confidence
83% confidence
Finding

The external HTTP POST sends cluster identifiers and credentials-derived authentication material to a remote endpoint. External transmission is expected for an EMR-integrated skill, but it still represents a real data-exposure surface, especially here because the request construction appears custom and may send more sensitive material than necessary.

Content

Scanner excerpt · scripts/analyze_yarn.py (reported line 127)May include surrounding context.

python
try:
        logger.info(f"调用 API: {endpoint}")
        response = requests.post(
            url,
            json=payload,
            headers=headers,

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
94% confidence
Finding

The skill performs remote shell command execution over SSH, including as root by default, without explicit warning or consent flow. Even if the current commands are read-oriented, this grants powerful remote access and materially increases risk if configuration is altered, the host is malicious, or command content later becomes user-influenced.

Content

No source excerpt is available for this finding.

Context-Inappropriate Capability

Medium
Category
Not specified by scanner
Confidence
89% confidence
Finding

The data collection goes beyond YARN resource analysis and also gathers host memory, CPU, load, and HDFS report data. This violates least-privilege and data-minimization expectations for the advertised skill, potentially exposing unrelated system inventory and storage details that could aid reconnaissance if the output, logs, or downstream consumers are compromised.

Content

No source excerpt is available for this finding.

Intent-Code Divergence

Low
Category
Not specified by scanner
Confidence
97% confidence
Finding

L136 将“本地存储”效果描述为“无网络依赖”,但技能描述 L003、L008 以及错误处理 L145-L146 都明确说明其通过 SSH 和 EMR API 工作,并会因网络问题失败。这不是简单遗漏,而是对技能依赖条件的直接反向表述。

Content

No source excerpt is available for this finding.

Vague Triggers

Low
Category
Not specified by scanner
Confidence
77% confidence
Finding

This YAML manifest says 'all parameters can be modified here' without clarifying which changes are safe, required, or out of scope. In a manifest file, this kind of broad instruction can create ambiguous trigger/scope expectations for how the skill should be configured and when particular settings should be changed.

Content

No source excerpt is available for this finding.