Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Use query parameters wherever possible in Neo4jStore (#330)
* Add validation for GufeKey format and characters to prevent Cypher injection Introduce a validator for GufeKeys to ensure they follow the <prefix>-<token> format. The validator restricts characters to ASCII letters (A-Za-z), digits (0-9), underscores (_), and hyphens (-). * Add tests for GufeKey validation Add tests to verify that GufeKeys are restricted to allowed characters. * Refactor _query method to use Cypher parameters Update `_query()` method in Neo4jStore to use Cypher parameters instead of f-strings, reducing the risk of injection attacks. Also add a test demonstrating how previous versions were vulnerable. --------- Co-authored-by: Ian Kenney <ianmichaelkenney@gmail.com>
- Loading branch information