Back to skill

Security audit

Alibaba Cloud AI Recommend AIRec

Security checks for vulnerabilities and agentic risk

Overview

This skill is a coherent Alibaba Cloud AIRec operations helper; it uses disclosed cloud credentials and public Alibaba metadata endpoints for its stated purpose, with no evidence of hidden exfiltration or persistence.

Install only if you intend to let an agent operate on Alibaba Cloud AIRec. Use a least-privilege AccessKey scoped to the needed AIRec resources, confirm region and resource IDs before mutations, and review any generated files under output/alicloud-ai-recommend-airec/.

Vulnerability Patterns
  • 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
  • Embedded Malicious CodeShips malicious scripts inside the skill and executes them locally
  • Unauthorized Access and Privilege EscalationObtains permissions beyond the task's legitimate needs
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Trigger AbuseOverly Broad Trigger, Shadow Command Trigger, Keyword Baiting Trigger
  • Taint TrackingDirect Taint Flow, Variable-Mediated Taint Flow, Credential Exfiltration Chain
  • MCP Least PrivilegeUnderdeclared Capability, Wildcard Permission, Missing Permission Declaration
  • MCP Tool PoisoningHidden Instructions, Unicode Deception, Parameter Description Injection
Findings (8)

Tainted flow: 'timeout' from os.getenv (line 34, credential/environment) → urllib.request.urlopen (network output)

Critical
Category
Data Flow
Content
def fetch_json(url: str, timeout: int) -> dict:
    req = urllib.request.Request(url, headers={"User-Agent": "codex-skill"})
    with urllib.request.urlopen(req, timeout=timeout) as resp:
        return json.loads(resp.read().decode("utf-8"))
Confidence
90% confidence
Finding
Credentials or environment variables flow to a network sink. This is a high-confidence indicator of credential exfiltration.

Tp4

High
Category
MCP Tool Poisoning
Confidence
96% confidence
Finding
The skill claims to manage AIRec resources, but the described executable quickstart focuses on OpenAPI metadata discovery and local artifact generation rather than actual AIRec resource operations. This mismatch is dangerous because users or orchestrators may grant sensitive cloud credentials and broad execution trust under the assumption that the skill performs service management, while it actually performs different network and file-writing actions that expand the attack surface and can mislead auditing or approval flows.

Lp3

Medium
Category
MCP Least Privilege
Confidence
91% confidence
Finding
The skill advertises operational use against Alibaba Cloud and includes behaviors that rely on environment access, file writes, and network access, but it does not declare any explicit tool scope or permission boundaries. In an agent environment, this omission can cause overbroad execution authority, making it harder to enforce least privilege and increasing the chance of unintended credential exposure, unauthorized API calls, or uncontrolled artifact writes.

Vague Triggers

Medium
Confidence
93% confidence
Finding
The invocation description is broad enough to match many generic resource-management or troubleshooting requests, which increases the likelihood that the skill will be invoked in contexts beyond its safe, intended scope. In combination with network access, credential use, and file-writing behavior, overbroad routing can lead to unnecessary exposure of cloud credentials, accidental mutation attempts, or execution of the wrong operational workflow.

External Transmission

Medium
Category
Data Exfiltration
Content
output_dir.mkdir(parents=True, exist_ok=True)

    url = (
        f"https://api.aliyun.com/meta/v1/products/{args.product_code}"
        f"/versions/{args.version}/api-docs.json"
    )
    payload = fetch_json(url, timeout)
Confidence
60% confidence
Finding
Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.

External Transmission

Medium
Category
Data Exfiltration
Content
output_dir.mkdir(parents=True, exist_ok=True)

    url = (
        f"https://api.aliyun.com/meta/v1/products/{args.product_code}"
        f"/versions/{args.version}/api-docs.json"
    )
    payload = fetch_json(url, timeout)
Confidence
60% confidence
Finding
Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.

External Transmission

Medium
Category
Data Exfiltration
Content
output_dir.mkdir(parents=True, exist_ok=True)

    url = (
        f"https://api.aliyun.com/meta/v1/products/{args.product_code}"
        f"/versions/{args.version}/api-docs.json"
    )
    payload = fetch_json(url, timeout)
Confidence
60% confidence
Finding
Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.

External Transmission

Medium
Category
Data Exfiltration
Content
output_dir.mkdir(parents=True, exist_ok=True)

    url = (
        f"https://api.aliyun.com/meta/v1/products/{args.product_code}"
        f"/versions/{args.version}/api-docs.json"
    )
    payload = fetch_json(url, timeout)
Confidence
60% confidence
Finding
Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.

Static analysis

No suspicious patterns detected.