Open and answer this issue on GitHub.
blocked, safety · opened 2026-11-21 · updated 2026-11-21 · 1 comment
Part of #1253 After #2366
A pub function’s parameter that reaches a raw sink is outside data, as for an index (ADR-396 D6). The body proves the precondition with a guard, or states it with an assert on the sink’s predicate, which is published as requires (ADR-269 D18, D20) so the obligation goes to each caller; otherwise the package needs the [allow] key (ADR-raw-sinks-1 D6). That a pub parameter at a sink is reported at all is “a pub function’s parameter at a sink is not reported” (#2366); this part builds the other half, the assert published as requires. Step 6 of the original list. The original’s example assert process::is_word(p) names a predicate that left std with D9 (#2197); html::is_plain (the precondition of html::Raw) is the one in std today.
assert html::is_plain(p) on a parameter of a pub function whose p reaches html::Raw is published as requires, and a caller passing an unguarded value from outside gets the obligation (NK1308 at the caller); a caller with the guard builds. Test: a .nika program in tests/compiler/tests/ with its .stdout / .stderr.A test shows the pub function with the assert building, a caller handing it an unguarded value from outside reported with NK1308 at the call, and a guarded caller building; the commit with the test carries Fixes #THIS, a Found: line per finding.
Split from #1253 by Claude Code
Driver: not queued, this issue waits for #2366, which is still open (#1819). Set ready again when it is closed.
Generated by Claude Code