Back to skill

Security audit

alibabacloud-migration-lhm-migrate-hive-to-paimon

Security checks across malware telemetry and agentic risk

Overview

This is a real Hive-to-Paimon migration tool, but it can perform high-impact writes and includes under-scoped shell execution and automatic dependency installation that users should review carefully before use.

Install only for a dedicated, reviewed migration run. Use --dry-run first, inspect sync_commands.sh and generated SQL before execution, install rclone yourself through a trusted package path, avoid running as root, use temporary least-privilege cloud credentials, and confirm that target Paimon tables are disposable or backed up before any DROP or INSERT OVERWRITE.

SkillSpector

By NVIDIA
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Supply ChainUnpinned Dependencies, External Script Fetching, Obfuscated Code
  • Excessive AgencyUnrestricted Tool Access, Autonomous Decision Making, Scope Creep
  • Output HandlingUnvalidated Output Injection, Cross-Context Output, Unbounded Output
  • Tool MisuseTool Parameter Abuse, Chaining Abuse, Unsafe Defaults
Findings (22)

subprocess module call

Medium
Category
Dangerous Code Execution
Content
# 尝试方案 3: 官方安装脚本
    if shutil.which('curl'):
        print("尝试通过官方脚本安装 rclone...")
        result = _sp.run(
            'curl -s https://rclone.org/install.sh | bash',
            shell=True, capture_output=True, text=True, timeout=300
        )
Confidence
99% confidence
Finding
result = _sp.run( 'curl -s https://rclone.org/install.sh | bash', shell=True, capture_output=True, text=True, timeout=300 )

subprocess module call

Medium
Category
Dangerous Code Execution
Content
# 通过 hive CLI 获取 DDL
        try:
            result = subprocess.run(
                ['hive', '-S', '-e', f'SHOW CREATE TABLE `{db_name}`.`{tbl_name}`'],
                capture_output=True, text=True, timeout=60
            )
Confidence
91% confidence
Finding
result = subprocess.run( ['hive', '-S', '-e', f'SHOW CREATE TABLE `{db_name}`.`{tbl_name}`'], capture_output=True, text=True, timeout=60 )

subprocess module call

Medium
Category
Dangerous Code Execution
Content
lf.write(f"# 命令: {cmd}\n")
            lf.write(f"# 开始时间: {datetime.now().strftime('%Y-%m-%d %H:%M:%S')}\n\n")

            process = subprocess.Popen(
                cmd, shell=True,
                stdout=subprocess.PIPE, stderr=subprocess.STDOUT,
                text=True
Confidence
99% confidence
Finding
process = subprocess.Popen( cmd, shell=True, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, text=True )

subprocess module call

Medium
Category
Dangerous Code Execution
Content
for cmd in config_cmds:
            _safe_print(f"  执行: {cmd[:100]}{'...' if len(cmd) > 100 else ''}",
                        master_log_f)
            result = subprocess.run(cmd, shell=True, capture_output=True, text=True)
            if result.returncode != 0:
                _safe_print(f"  错误: {result.stderr[:200]}", master_log_f)
        _safe_print("rclone 配置完成", master_log_f)
Confidence
99% confidence
Finding
result = subprocess.run(cmd, shell=True, capture_output=True, text=True)

subprocess module call

Medium
Category
Dangerous Code Execution
Content
lf.write(f"# 命令: {cmd}\n")
            lf.write(f"# 开始时间: {datetime.now().strftime('%Y-%m-%d %H:%M:%S')}\n\n")

            process = subprocess.Popen(
                cmd, shell=True,
                stdout=subprocess.PIPE, stderr=subprocess.STDOUT,
                text=True
Confidence
99% confidence
Finding
process = subprocess.Popen( cmd, shell=True, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, text=True )

Lp3

Medium
Category
MCP Least Privilege
Confidence
93% confidence
Finding
The skill orchestrates file access, shell command execution, networked services, and use of environment variables, but it does not declare those permissions explicitly. This creates a trust and review gap: an agent or user may invoke a highly privileged migration workflow without clear up-front awareness of its capabilities, increasing the chance of unintended destructive operations or secret exposure.

Context-Inappropriate Capability

High
Confidence
99% confidence
Finding
A common utility function automatically installs software and may invoke package managers or a remote install path during normal execution. In a migration skill likely run with elevated privileges on infrastructure hosts, this expands the trust boundary and can cause unauthorized system modification or code execution from external sources.

Intent-Code Divergence

Medium
Confidence
88% confidence
Finding
The code comments and phase description suggest Phase 2 performs data copy, but the implementation also executes arbitrary rclone config commands from an input-generated shell file. This mismatch increases operator trust and makes unsafe execution easier to miss, which is dangerous in a migration tool that processes generated artifacts.

Missing User Warnings

High
Confidence
98% confidence
Finding
The function performs package installation and remote-script execution without an explicit confirmation checkpoint at the moment of action. This is dangerous because operators may run the tool expecting data migration, not privileged system changes, and the skill context implies it may execute on sensitive data-platform hosts.

Missing User Warnings

Medium
Confidence
91% confidence
Finding
The script executes shell commands sourced from an input file without an execution-time warning or confirmation, even though the file originates from another tool's output directory and may be tampered with. In this context, lack of explicit warning increases the chance of unsafe operator approval and accidental arbitrary command execution.

Missing User Warnings

Medium
Confidence
90% confidence
Finding
Credential-bearing rclone configuration commands are executed with no strong user-facing notice that secrets will be consumed and local sync configuration will be modified. In a migration context, this can cause unintended credential exposure, persistent tool reconfiguration, and reduced operator awareness of sensitive actions.

Unvalidated Output Injection

High
Category
Output Handling
Content
# 通过 hive CLI 获取 DDL
        try:
            result = subprocess.run(
                ['hive', '-S', '-e', f'SHOW CREATE TABLE `{db_name}`.`{tbl_name}`'],
                capture_output=True, text=True, timeout=60
            )
Confidence
90% confidence
Finding
subprocess.run( ['hive', '-S', '-e', f'SHOW CREATE TABLE `{db_name}`.`{tbl_name}`'], capture_output

Unvalidated Output Injection

High
Category
Output Handling
Content
for cmd in config_cmds:
            _safe_print(f"  执行: {cmd[:100]}{'...' if len(cmd) > 100 else ''}",
                        master_log_f)
            result = subprocess.run(cmd, shell=True, capture_output=True, text=True)
            if result.returncode != 0:
                _safe_print(f"  错误: {result.stderr[:200]}", master_log_f)
        _safe_print("rclone 配置完成", master_log_f)
Confidence
89% confidence
Finding
subprocess.run(cmd, shell=True, capture_output

Unvalidated Output Injection

High
Category
Output Handling
Content
if not partitions:
            # 无分区,计算全表
            lines.append(f"INSERT INTO TABLE {result_table}")
            lines.append(
                f"SELECT '{db}' as db, '{tbl}' as tbl, 'all' as part, "
                f"count(*) as num FROM {table_name};"
Confidence
94% confidence
Finding
f"INSERT INTO TABLE {result

Unvalidated Output Injection

High
Category
Output Handling
Content
partition_val = default_partition_values.get(part_field)

            if partition_val:
                lines.append(f"INSERT INTO TABLE {result_table}")
                lines.append(
                    f"SELECT '{db}' as db, '{tbl}' as tbl, "
                    f"'{part_field}={partition_val}' as part, "
Confidence
96% confidence
Finding
f"INSERT INTO TABLE {result

Unvalidated Output Injection

High
Category
Output Handling
Content
)
            else:
                # 未知分区字段,计算全表
                lines.append(f"INSERT INTO TABLE {result_table}")
                lines.append(
                    f"SELECT '{db}' as db, '{tbl}' as tbl, 'all' as part, "
                    f"count(*) as num FROM {table_name};"
Confidence
94% confidence
Finding
f"INSERT INTO TABLE {result

External Script Fetching

High
Category
Supply Chain
Content
if shutil.which('curl'):
        print("尝试通过官方脚本安装 rclone...")
        result = _sp.run(
            'curl -s https://rclone.org/install.sh | bash',
            shell=True, capture_output=True, text=True, timeout=300
        )
        if result.returncode == 0 and shutil.which('rclone'):
Confidence
100% confidence
Finding
curl -s https://rclone.org/install.sh | bash

Tool Parameter Abuse

High
Category
Tool Misuse
Content
lf.write(f"# 命令: {cmd}\n")
            lf.write(f"# 开始时间: {datetime.now().strftime('%Y-%m-%d %H:%M:%S')}\n\n")

            process = subprocess.Popen(
                cmd, shell=True,
                stdout=subprocess.PIPE, stderr=subprocess.STDOUT,
                text=True
Confidence
98% confidence
Finding
subprocess.Popen( cmd, shell=True

Tool Parameter Abuse

High
Category
Tool Misuse
Content
for cmd in config_cmds:
            _safe_print(f"  执行: {cmd[:100]}{'...' if len(cmd) > 100 else ''}",
                        master_log_f)
            result = subprocess.run(cmd, shell=True, capture_output=True, text=True)
            if result.returncode != 0:
                _safe_print(f"  错误: {result.stderr[:200]}", master_log_f)
        _safe_print("rclone 配置完成", master_log_f)
Confidence
99% confidence
Finding
subprocess.run(cmd, shell=True

Tool Parameter Abuse

High
Category
Tool Misuse
Content
lf.write(f"# 命令: {cmd}\n")
            lf.write(f"# 开始时间: {datetime.now().strftime('%Y-%m-%d %H:%M:%S')}\n\n")

            process = subprocess.Popen(
                cmd, shell=True,
                stdout=subprocess.PIPE, stderr=subprocess.STDOUT,
                text=True
Confidence
98% confidence
Finding
Popen( cmd, shell=True

Tool Parameter Abuse

High
Category
Tool Misuse
Content
lf.write(f"# 命令: {cmd}\n")
            lf.write(f"# 开始时间: {datetime.now().strftime('%Y-%m-%d %H:%M:%S')}\n\n")

            process = subprocess.Popen(
                cmd, shell=True,
                stdout=subprocess.PIPE, stderr=subprocess.STDOUT,
                text=True
Confidence
99% confidence
Finding
subprocess.Popen( cmd, shell=True

Tool Parameter Abuse

High
Category
Tool Misuse
Content
lf.write(f"# 命令: {cmd}\n")
            lf.write(f"# 开始时间: {datetime.now().strftime('%Y-%m-%d %H:%M:%S')}\n\n")

            process = subprocess.Popen(
                cmd, shell=True,
                stdout=subprocess.PIPE, stderr=subprocess.STDOUT,
                text=True
Confidence
99% confidence
Finding
Popen( cmd, shell=True

VirusTotal

VirusTotal findings are pending for this skill version.

View on VirusTotal

Static analysis

No suspicious patterns detected.