Open and answer this issue on GitHub.
ready · opened 2026-11-29 · updated 2026-11-29 · 0 comments
Two holes in the NK1308 prover (ADR-raw-sinks-1 D18). On develop (5d6ac6060) neither function below draws NK1308, but in both, text from cli::args reaches the start of a process::run argument:
use std::cli
use std::process
fn joined() throws {
let s = ""
let arg = s + (cli::args().nth(1) ?? "")
process::run("git", ["show", arg]) // silent: should be NK1308
}
fn matched() throws {
match cli::args().nth(2) ?? "" {
tip => process::run("git", ["show", tip]), // silent: should be NK1308
}
}
fn direct() throws {
process::run("git", ["show", "" + (cli::args().nth(1) ?? "")]) // warns, correct
}
fn main() throws {
if cli::args().len() > 7 { joined() matched() direct() }
}
operand_proved (prover_calls.nika, ~1018) takes literal_only as proved, and "" is a literal. A name bound to "" then starts every concatenation it heads as “proved”, although the empty text proves nothing about what follows. The direct form "" + x is judged correctly, so the gap is in how a bound name’s start is carried."" as transparent: the start is the next part’s start. Apply this wherever literal_only / LitStr stands for a proof (operand_proved, mut_start_judged already handles "\"\"").joined and matched above warn NK1308. A twin with let s = "./" stays silent.The probe warns at both sites, the twins stay silent, and nikaia check --bounds scripts/drive.nika draws no new NK1308 except where it really passes outside text (each new one is fixed in drive.nika with a proof, not with [allow]).
Part of #2694.