okf-mysql
Warn
Audited by Gen Agent Trust Hub on Sep 12, 2026
Risk Level: MEDIUMCOMMAND_EXECUTIONINDIRECT_PROMPT_INJECTIONEXTERNAL_DOWNLOADS
Full Analysis
- [COMMAND_EXECUTION]: The connector tool's 'ingest' command is vulnerable to SQL injection. It constructs DDL queries (ALTER TABLE, MODIFY COLUMN) by interpolating table and column names directly into SQL strings without escaping backticks. If a user or agent processes a maliciously crafted OKF bundle, the identifier names could break out of the quoting to execute unauthorized SQL commands on the target database.\n
- Evidence: In main.go, the runIngest function uses fmt.Sprintf to build queries where the tableName and col.Name are sourced from the input OKF bundle's metadata or filenames.\n
- Further evidence: Similar unsafe string formatting for database identifiers is present in metadata.go (e.g., getTableStats) and profile.go (e.g., profileTable, distinctValues, sampleTable).\n- [INDIRECT_PROMPT_INJECTION]: The skill processes untrusted data in the form of OKF bundles (Markdown files), making it susceptible to indirect prompt injection. An attacker could embed malicious SQL payloads or misleading instructions within these bundles to compromise the database or the agent's behavior.\n
- Ingestion points: OKF bundle files (typically located in a tables/ subdirectory as referenced in main.go).\n
- Boundary markers: The connector does not use specific delimiters or instructions to ignore embedded commands within the ingested Markdown content.\n
- Capability inventory: The tool has the capability to connect to a MySQL database and execute DDL/DML commands via db.Exec and db.Query.\n
- Sanitization: While the tool uses escapeString for comment values, it lacks any sanitization or validation for database identifiers.\n- [EXTERNAL_DOWNLOADS]: The skill documentation provides instructions to install a tool using
go install github.com/xSAVIKx/okf-skills/skills/okf-mysql@v0.1.0. This command fetches source code from a remote GitHub repository.
Audit Metadata