okf-mysql
Audited by Socket on Sep 12, 2026
2 alerts found:
Anomalyx2The code implements expected MySQL-to-OKF export and comment synchronization functionality and contains no apparent malware or deliberate obfuscation. The main security risk is SQL injection or unintended DDL through unescaped table and column identifiers in dynamically constructed ALTER TABLE statements when ingesting a modified or untrusted bundle with --sync. Comment escaping reduces literal injection risk but should be replaced or strengthened. Overall risk is moderate and primarily dependent on whether bundles are trusted and synchronization is enabled.
The code appears to implement legitimate MySQL profiling and sampling functionality, with no evidence of malware or intentional sabotage. It has a meaningful SQL injection risk when table or column names are influenced by untrusted input because backtick-delimited identifiers are not escaped or validated. It also risks excessive data retrieval and disclosure because sampleTable does not enforce a safe maximum limit. Use strict identifier validation or proper escaping and enforce bounded, nonnegative limits.