altimate-code icon indicating copy to clipboard operation
altimate-code copied to clipboard

Sanity security test 6/15 fails on main: safety threat messages echo non-SQL file content

Open anandgupta42 opened this issue 3 months ago • 1 comments

The main-only Sanity (Verdaccio) job fails since #1090 merged: security phase test [6/15] Path traversal in file args runs altimate check ../../../../etc/passwd and greps the output for root:x:0.

Root cause: #1090 correctly surfaced real engine ThreatFinding messages in check --checks safety (previously they collapsed into a generic warning). The engine's multi_statement rule quotes the raw "statement type" token verbatim — for non-SQL input that is the file's content: Disallowed statement type: ROOT:X:0:0:ROOT:/ROOT:/BIN/BASH. So checking any non-SQL file reflects its contents into CLI output — an information-disclosure hazard the sanity test rightly catches. (The job is skipped on PRs, so #1090's CI could not see it.)

Fix: redact non-SQL-keyword statement types (and the multi_statement matched_pattern, which is the raw input line) at the dispatcher boundary, covering the CLI, tools, and review paths.

anandgupta42 avatar Aug 17 '26 18:08 anandgupta42

Resolved in v0.11.0.

sahrizvi avatar Sep 09 '26 17:09 sahrizvi