fix: allow read-only CALL queries in axon_cypher#47
Closed
bhattaraiprayag wants to merge 3 commits intoharshkedia177:mainfrom
Closed
fix: allow read-only CALL queries in axon_cypher#47bhattaraiprayag wants to merge 3 commits intoharshkedia177:mainfrom
bhattaraiprayag wants to merge 3 commits intoharshkedia177:mainfrom
Conversation
- Remove CALL from the cypher write/admin deny-list so read-only procedures such as QUERY_FTS_INDEX can be executed through axon_cypher. Keep unsafe operations blocked via existing write/admin keywords including INSTALL and LOAD. - Add regression tests for allowed read-only CALL usage and blocked unsafe CALL and write-operation queries.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Why
axon_cyphercurrently rejects any query containingCALL, which blocks legitimate read-only procedure calls (for exampleCALL QUERY_FTS_INDEX(...)).Scope
This PR makes one focused bug fix to
axon_cypherread-only query gating and adds regression tests for that exact behavior.What changed
src/axon/mcp/tools.py:CALLfrom the write/admin keyword deny-listDELETE,DROP,CREATE,SET,REMOVE,MERGE,DETACH,INSTALL,LOAD,COPY)tests/mcp/test_tools.py:CALL QUERY_FTS_INDEX(...)CALL INSTALL ...CALL LOAD ...DETACH DELETE)Validation
uv run pytest -q tests/mcp/test_tools.py->48 passeduv run pytest -q->588 passedaxon analyze --no-embeddingssucceeds for python/javascript/typescriptaxon cypher "CALL QUERY_FTS_INDEX(...)"now returns resultsaxon cypher "CALL INSTALL EXTENSION fts"is still rejectedCloses #36
Checklist
pytestpasses locallyruff check src/ tests/passes