Back to skill

Security audit

sqlserver-tidb-replay

Security checks across malware telemetry and agentic risk

Overview

This appears to be a real SQL replay tool, but it can run raw data-changing SQL against TiDB using high-privilege database credentials, so it should be reviewed carefully before use.

Install only if you intend to replay SQL against a controlled TiDB test environment. Do not use production credentials or the root account; review and filter the replay JSON first, back up the target database, and protect generated reports because they may contain sensitive SQL.

VirusTotal

67/67 vendors flagged this skill as clean.

View on VirusTotal

Risk analysis

Artifact-based informational review of SKILL.md, metadata, install specs, static scan signals, and capability signals. ClawScan does not execute the skill or run runtime probes.

#
ASI02: Tool Misuse and Exploitation
High
What this means

A selected log file could change, delete, or corrupt data in the target TiDB database during replay.

Why it was flagged

The replay script executes SQL strings from the replay input directly on the target TiDB connection. Because replayed logs can include INSERT, UPDATE, DELETE, DDL, or other state-changing statements, this can mutate or destroy target database data if run against the wrong environment.

Skill content
with conn.cursor() as cursor:
            cursor.execute(sql)
Recommendation

Run only against an isolated test or disposable TiDB instance, inspect the generated JSON before replay, filter out DDL/destructive statements, and add backups or a dry-run/approval workflow before production-like use.

#
ASI03: Identity and Privilege Abuse
Medium
What this means

If root or another highly privileged account is used, replayed SQL can affect more data and schema than intended.

Why it was flagged

The script accepts database credentials and defaults the TiDB user to root. This is purpose-aligned for connecting to TiDB, but root is an overpowered default for a tool that replays arbitrary SQL.

Skill content
parser.add_argument("--user", default=os.getenv("TIDB_USER", "root"), help="TiDB 用户")
    parser.add_argument("--password", default=os.getenv("TIDB_PASSWORD", ""), help="TiDB 密码")
Recommendation

Create a dedicated least-privilege TiDB account for the specific test database, avoid root, and ensure the registry/installation documentation clearly declares the credential requirement.

#
ASI04: Agentic Supply Chain Vulnerabilities
Low
What this means

Users may need to find or create the missing collection script, which could introduce unreviewed code into the workflow.

Why it was flagged

The documentation references a PowerShell collection helper, but the provided file manifest does not include collect_xe.ps1. This is a provenance gap if users obtain or run that helper from elsewhere.

Skill content
.\collect_xe.ps1 -SessionName "slow_query_capture" -ThresholdMs 1000 -OutputPath "C:\slow_logs\slow_20260412.csv"
Recommendation

Only run a collector script from a trusted, reviewed source, and include the referenced helper in the package or clearly document that users must supply their own.

#
ASI06: Memory and Context Poisoning
Low
What this means

Generated CSV/JSON/HTML reports may contain sensitive SQL text and should not be shared casually.

Why it was flagged

The conversion output stores raw SQL fragments for comparison. This is expected for reporting, but slow-query logs may contain sensitive table names, business data literals, or identifiers.

Skill content
'original_raw': raw_sql[:500],  # 保存原始片段用于对比
Recommendation

Store outputs securely, redact sensitive literals before sharing reports, and delete intermediate files when the migration test is complete.