sql-server-table-reconciliation
Warn
Audited by Gen Agent Trust Hub on Sep 20, 2026
Risk Level: MEDIUMCOMMAND_EXECUTIONINDIRECT_PROMPT_INJECTION
Full Analysis
- [COMMAND_EXECUTION]: The
scripts/reconcile.pyscript is vulnerable to SQL injection. In theextract_tableandextract_hashesfunctions, the code uses f-string interpolation to insert thetablename andpk_colsdirectly into SQL query strings (e.g.,f"SELECT * FROM {table} ORDER BY {pk_order}"). Since these values are derived from user-controllable arguments (--tablesand--primary-key), a malicious actor could provide crafted inputs to execute arbitrary SQL commands on the target database servers. - [COMMAND_EXECUTION]: The connection string construction in the
connectfunction is vulnerable to Connection String Injection. The script uses f-strings to build the connection string (f"Server={server};Database={database};UID={user};PWD={password};...") without sanitizing the input variables. A malicious input containing semicolons could be used to inject or override connection parameters, such as disabling encryption or redirecting the connection. - [INDIRECT_PROMPT_INJECTION]: The skill has a vulnerability surface for indirect prompt injection via malicious database metadata.
- Ingestion points: Table names and primary key specifications provided via command-line arguments in
scripts/reconcile.py, as well as metadata retrieved fromINFORMATION_SCHEMA.COLUMNS. - Boundary markers: None. There are no delimiters or instructions provided to the script to treat these inputs as untrusted data.
- Capability inventory: The script has the capability to connect to remote SQL Server instances and execute arbitrary queries using the
mssql-pythondriver. - Sanitization: None. The script fails to sanitize table or column identifiers and specifically violates the safety guidance provided in the
SKILL.mdfile, which explicitly states to "never f-string interpolate user input into SQL."
Audit Metadata