Context-Inappropriate Capability
Medium
- Confidence
- 98% confidence
- Finding
- The `load_data` function builds a SQL query with an f-string using the user-controlled `code` argument directly: `WHERE code='{code}'`. This allows SQL injection against the local SQLite database, enabling an attacker to alter query logic and potentially read unintended rows or manipulate the query beyond the script’s stated backtesting purpose. In this skill context, the risk is somewhat bounded by SQLite and a fixed local DB path, but it is still a real vulnerability because the CLI accepts arbitrary input and the script processes it without validation.
