Skip to content

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

Description

@anandgupta42

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions