Back to skill

Security audit

Alibabacloud Cloudfw Vpc Firewall Diagnosis

Security checks for vulnerabilities and agentic risk

Overview

The skill is mostly a read-only Alibaba Cloud diagnostic helper, but it needs review because its command gate can misclassify unsafe local commands and its workflow requires an unpinned CLI plugin update.

Install only after reviewing the command hook and setup workflow. Use a minimally privileged read-only Alibaba Cloud profile, avoid approving unpinned plugin updates unless you trust the update source, and require explicit firewall or CEN targeting before running closure prechecks.

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 (3)

T09 · Insecure Skill Coding Practices

Error
Location
scripts/check-write-operation.sh:51
Finding

Bash Authorization Hook Allows Arbitrary or Destructive Commands Through Unsafe Allowlist Matching

Content
View full analysis
Remediation
View remediation

T08 · Insecure Dependencies

Warning
Location
SKILL.md:81
Finding

Mandatory Unpinned CLI Plugin Update Introduces Executable Supply-Chain Risk

Content
View full analysis
Remediation
View remediation

T05 · Unauthorized Access and Privilege Escalation

Warning
Location
scripts/closure_precheck.py:40
Finding

Closure Pre-Check Enumerates Regional Firewalls and Selects the First Result Without Resource Validation

Content
View full analysis
") print("Example: python3 closure_precheck.py default cn-hangzhou") sys.exit(1) profile = sys.argv[1] region = sys.argv[2] firewall = get_vpc_firewall_info(profile, region) system_table, cfw_policy_table = get_route_tables(profile, region, firewall["TransitRouterId"]) ``` ### Technical Analysis The Skill's declared required inputs include a CEN instance ID, but `closure_precheck.py` accepts only a profile and region. It queries the regional firewall list without a user-authorized firewall or CEN identifier and then selects the first returned object: ```python firewall = data["VpcTrFirewalls"][0] ``` There is no validation that the selected firewall: - Belongs to the ...[truncated 1772 chars]
Remediation
View remediation
Vulnerability Patterns
  • Excessive AgencyUnrestricted Tool Access, Autonomous Decision Making, Scope Creep
  • System Prompt LeakageDirect Leakage, Indirect Extraction, Tool-Based Exfiltration
  • Behavioral ASTexec() Call, eval() Call, Dynamic Import
  • MCP Least PrivilegeUnderdeclared Capability, Wildcard Permission, Missing Permission Declaration
  • MCP Tool PoisoningHidden Instructions, Unicode Deception, Parameter Description Injection
Findings (8)

Ae1

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

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

md
1. Read this complete `SKILL.md`.

Direct Prompt Extraction

High
Category
System Prompt Leakage
Confidence
85% confidence
Finding

Skill contains instructions that could directly expose system prompts, internal rules, or hidden instructions to users or external parties.

Content

Scanner excerpt · references/execution_standards.md (reported line 66)May include surrounding context.

md
- Use OpenAPI read-only queries for current state.
- Treat `ErrorDetail` and recent ActionTrail evidence as stronger than precheck-only results.

## Output Rules

- Put the conclusion first.
- Keep evidence concise.

Lp1

High
Category
MCP Least Privilege
Confidence
75% confidence
Finding

The skill uses 'file_read' capability that is not listed in its permissions. This may indicate deceptive intent or missing permission declarations.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

Medium
Category
Not specified by scanner
Confidence
94% confidence
Finding

The skill is presented as a read-only diagnostic assistant, but it mandates local CLI state changes (ai-mode enable/disable) and a plugin update. These operations modify the operator's environment and can introduce supply-chain or session-scope risk that is outside the declared diagnostic purpose, especially because plugin updates fetch and install new code locally.

Content

No source excerpt is available for this finding.

Context-Inappropriate Capability

Medium
Category
Not specified by scanner
Confidence
91% confidence
Finding

These standards authorize execution of local/system commands that are not themselves read-only cloud API queries, including plugin management and CLI configuration changes. Even if not directly destructive, this expands the skill's operational scope from diagnosis into host-environment modification, increasing the chance of unintended side effects or abuse if the workflow is followed blindly.

Content

No source excerpt is available for this finding.

subprocess module call

Medium
Category
Dangerous Code Execution
Confidence
70% confidence
Finding

subprocess module calls execute external commands. Without careful input validation, this enables command injection.

Content

Scanner excerpt · scripts/closure_precheck.py (reported line 21)May include surrounding context.

python
print(f"Error: run_cli only accepts a list[str], got {type(argv).__name__}")
        sys.exit(1)
    try:
        result = subprocess.run(argv, shell=False, capture_output=True, text=True, timeout=30)
        if result.returncode != 0:
            print(f"Error: command failed: {result.stderr}")
            sys.exit(1)

Context-Inappropriate Capability

Low
Category
Not specified by scanner
Confidence
85% confidence
Finding

The manifest frames the skill as using read-only Alibaba Cloud APIs for diagnosis, but the standards mandate running scripts/analyze_routes.py for route comparison. Executing a local script is an additional capability beyond direct API-based diagnosis and is not explicitly disclosed in the stated purpose.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
88% confidence
Finding

Line L32 states that the default language should be en for portable diagnostic output, which is a natural-language locale recommendation. Under the policy, forcing or prescribing a specific language without user opt-in can be a locale-policy issue, and the guide does not explicitly offer alternatives or frame this as optional user choice.

Content

No source excerpt is available for this finding.