Back to skill

Security audit

Alibaba Cloud Security CloudFW

Security checks for vulnerabilities and agentic risk

Overview

This is a disclosed Alibaba Cloud Firewall management skill with expected credential, API, and local-output behavior, but users should treat mutating firewall changes carefully.

Install only where Alibaba Cloud credentials are already intended for Cloud Firewall administration. Prefer least-privilege credentials, review any proposed Create/Update/Modify/Set action before execution, and keep generated outputs in the documented output directory.

Vulnerability Patterns
  • 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
  • Embedded Malicious CodeShips malicious scripts inside the skill and executes them locally
Findings (1)

T09 · Insecure Skill Coding Practices

Note
Location
scripts/list_openapi_meta_apis.py:29
Finding

Unsanitized API Identifiers Can Escape the Intended Output Directory

Content
View full analysis
Remediation
View remediation
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 (10)

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

Critical
Category
Data Flow
Confidence
90% confidence
Finding

Credentials or environment variables flow to a network sink. This is a high-confidence indicator of credential exfiltration.

Content

Scanner excerpt · scripts/list_openapi_meta_apis.py (reported line 23)May include surrounding context.

python
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"))

Tp4

High
Category
MCP Tool Poisoning
Confidence
97% confidence
Finding

The declared purpose describes an operational management skill for Alibaba Cloud Cloud Firewall using OpenAPI/SDK—implying actions like resource operations, policy changes, status checks, or troubleshooting API workflows. The supplied code does not perform Cloud Firewall management or invoke Cloud Firewall operational APIs. Instead, it downloads API documentation metadata from api.aliyun.com for a product/version, parses the API list, and saves JSON/Markdown reference files locally. While this is related to Cloudfw in a documentation/discovery sense, its primary purpose is metadata retrieval and documentation generation, which is materially different from the declared management-oriented behavior.

Content

No source excerpt is available for this finding.

Undeclared Tool Scope

Medium
Category
MCP Least Privilege
Confidence
92% confidence
Finding

The skill uses sensitive capabilities including environment-variable credential access, filesystem writes, and network/API interaction, but declares no explicit tool scope or permission boundaries. In an agent setting, this weakens governance and can allow broader-than-expected execution with cloud credentials and outbound requests, increasing the chance of accidental or unauthorized actions.

Content

No source excerpt is available for this finding.

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
92% confidence
Finding

The trigger description is broad enough to activate on many general firewall-related requests without clear boundaries, which can cause the agent to invoke a cloud-management skill inappropriately. In this context, over-triggering is risky because the skill is positioned to use credentials and potentially perform firewall-affecting operations, raising the chance of unintended cloud actions.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The skill explicitly covers mutating firewall operations such as Create, Update, Modify, and Set without an embedded safety warning or mandatory confirmation step. Because firewall changes can immediately alter network exposure, block production traffic, or reduce protections, executing such actions without a clear warning and approval gate is operationally and security-sensitive.

Content

No source excerpt is available for this finding.

External Transmission

Medium
Category
Data Exfiltration
Confidence
60% confidence
Finding

Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.

Content

Scanner excerpt · references/sources.md (reported line 3)May include surrounding context.

md
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)

External Transmission

Medium
Category
Data Exfiltration
Confidence
60% confidence
Finding

Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.

Content

Scanner excerpt · references/sources.md (reported line 4)May include surrounding context.

md
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)

External Transmission

Medium
Category
Data Exfiltration
Confidence
60% confidence
Finding

Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.

Content

Scanner excerpt · references/sources.md (reported line 5)May include surrounding context.

md
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)

External Transmission

Medium
Category
Data Exfiltration
Confidence
60% confidence
Finding

Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.

Content

Scanner excerpt · scripts/list_openapi_meta_apis.py (reported line 39)May include surrounding context.

python
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)

Missing User Warnings

Low
Category
Not specified by scanner
Confidence
83% confidence
Finding

This Python code performs an HTTP request to an external service and writes the fetched payload and derived markdown to disk. While the module docstring mentions saving to output/, there is no runtime confirmation or explicit user-facing warning about the outbound network access and resulting file creation.

Content

No source excerpt is available for this finding.