GuardDog: Unsanitized human-readable scan output allows terminal escape injection from malicious package content
GuardDog includes attacker-controlled filenames, file locations, messages, and code snippets in its default human-readable output without escaping terminal control characters. A malicious package can therefore inject ANSI or OSC escape sequences into analyst terminals or CI logs. Create a file whose name contains \x1b[2J. Feed a semgrep-style result referencing that file into Analyzer._format_semgrep_response(). Render the result with HumanReadableReporter.print_scan_results(). The output string contains the raw escape bytes, which a terminal may …