You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
bug: REPL parse errors are completely silent after over-broad security fix #78
This discards the entire error message. The REPL now gives no feedback about why a query failed to parse — no line number, no indication of what was unexpected, nothing. This makes the REPL nearly unusable for debugging malformed queries.
Expected behaviour
The REPL prints a useful structural error message (e.g. Parse error: expected closing ')' at position 42) that helps the user fix their query, without exposing raw user-supplied string values (which were the actual CodeQL concern).
Fix
The parser error type (in src/query/datalog/parser.rs and/or anyhow::Error) likely contains both a structural description (safe to log) and the offending token/value (potentially sensitive). The fix should:
Identify what information the error type carries.
Log only the structural part (error kind, position, expected token type) — not the raw user-supplied string contents.
If the error type doesn't separate these, create a ParseErrorKind enum or similar that carries only safe-to-log structural information.
This must not re-introduce the CodeQL rust/cleartext-logging pattern.
Files
src/repl.rs — the silenced eprintln! call
src/query/datalog/parser.rs — the error type produced by the parser
Test
Add a test (or extend an existing one in the REPL / parser tests) that verifies the error output for a malformed query contains a non-empty structural description. Do NOT assert on the raw user-supplied value.
Activity
fix: restore useful parse error messages in REPL (issue #78)
fix: restore useful parse error messages in REPL (issue #78) (#87)