Back to skill

Security audit

alibabacloud-sas-multiaccount-manage

Security checks for vulnerabilities and agentic risk

Overview

The skill matches its advertised purpose of exporting Alibaba Cloud security reports, with disclosed credential use and local storage.

Use narrowly authorized Alibaba Cloud credentials, review enabled accounts before exporting, and store sensitive reports in a dedicated private directory. Setup updates CLI plugins and persists AI-mode settings; exports use Chinese and can replace same-day output files. All bundled files were reviewed, but installed dependencies, plugins, and live cloud responses were not exercised. The inspected artifacts do not substantiate the pre-scan malicious signal.

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
  • Supply ChainUnpinned Dependencies, External Script Fetching, Obfuscated Code
  • Output HandlingUnvalidated Output Injection, Cross-Context Output, Unbounded Output
  • Behavioral ASTexec() Call, eval() Call, Dynamic Import
  • Taint TrackingDirect Taint Flow, Variable-Mediated Taint Flow, Credential Exfiltration Chain
  • MCP Least PrivilegeUnderdeclared Capability, Wildcard Permission, Missing Permission Declaration
Findings (9)

Skill declares no tool scope ('permissions' or 'allowed-tools') but code capabilities were detected: env, file_read, file_write, network, shell.

Medium
Category
MCP Least Privilege
Confidence
70% confidence
Finding

Without declared permissions the skill's intent is opaque and cannot be validated.

Content

No source excerpt is available for this finding.

Tainted flow: 'accounts' from pathlib.Path.read_text (line 151, file read) → pathlib.Path.write_text (file write)

Medium
Category
Data Flow
Confidence
65% confidence
Finding

Data from a source is assigned to a variable that is later passed to a sink, creating a variable-mediated taint flow.

Content

Scanner excerpt · scripts/accounts.py (reported line 59)May include surrounding context.

python
def save_accounts(accounts):
    ACCOUNTS_FILE.write_text(
        json.dumps(accounts, indent=2, ensure_ascii=False), encoding="utf-8"
    )

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/accounts.py (reported line 69)May include surrounding context.

python
region_id = getattr(args, "region_id", "cn-shanghai")

    # 获取当前凭证的主账号(自身也应包含在可操作范围内)
    identity_result = subprocess.run(
        _aliyun_cmd("sts", "get-caller-identity"),
        stdout=subprocess.PIPE,
        stderr=subprocess.PIPE,

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/accounts.py (reported line 179)May include surrounding context.

python
def get_caller_account_id():
    """获取当前凭证的主账号 ID(通过 aliyun sts get-caller-identity)。"""
    result = subprocess.run(
        _aliyun_cmd("sts", "get-caller-identity"),
        stdout=subprocess.PIPE,
        stderr=subprocess.PIPE,

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/accounts.py (reported line 80)May include surrounding context.

python
sys.exit(1)
    caller_account_id = str(json.loads(identity_result.stdout)["AccountId"])

    result = subprocess.run(
        _aliyun_cmd("sas", "--region", region_id, "list-accounts-in-resource-directory"),
        stdout=subprocess.PIPE,
        stderr=subprocess.PIPE,

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/accounts.py (reported line 94)May include surrounding context.

python
accounts = data.get("Accounts", [])

    # 调用 describe-monitor-accounts,只保留已纳入监控的账号(并将自身主账号也包含进来)
    monitor_result = subprocess.run(
        _aliyun_cmd("sas", "--region", region_id, "describe-monitor-accounts"),
        stdout=subprocess.PIPE,
        stderr=subprocess.PIPE,

Export requests force Chinese output without a user-selectable language.

Medium
Category
Output Handling
Confidence
92% confidence
Finding

The export request hard-codes --Lang to zh, imposing Chinese on exported content regardless of the user's language preference. The CLI offers no language choice, and the file provides no justification for restricting exports to this language.

Content

No source excerpt is available for this finding.

Unverifiable Dependency: openpyxl has 2 known advisory(ies) (CVE-2017-5992 (Improper Restriction of XML External Entity Reference in Openpyxl); CVE-2017-5992 (Openpyxl 2.4.1 resolves external entities by default, which allows remote attack)), but the manifest does not pin a version, so it is unknown whether the installed release is affected

Low
Category
Supply Chain
Confidence
40% confidence
Finding

OSV returned advisories for this package, but its resolved version is unknown. A package-name lookup does not establish whether the installed release is affected by those advisories.

Content

No source excerpt is available for this finding.

All four export configurations force Chinese-language reports without a user-selectable language option.

Low
Category
Output Handling
Confidence
93% confidence
Finding

Each export configuration hardcodes --Lang to zh, requiring Chinese-language export content regardless of user preference. The CLI provides account and region options but no language choice, and the file gives no justification for restricting the report language.

Content

No source excerpt is available for this finding.