/** * Deterministic discovery signal for the untrusted-input-validation rule. * * Unlike stale-duplicate (where the whole structural fact is pre-computable), * untrusted-input is a HYBRID: the *discovery* half — finding the sites that * read untrusted bytes (`JSON.parse`, `process.env`, `parseInt`, `json.loads`, * `strconv.Atoi`, …) — is deterministic from the diff, but the *judgement* half * — does the parsed value flow to a typed consumer without runtime validation — * is data-flow reasoning that resists determinism and stays with the LLM. * * This module pre-computes the parse sites the diff introduces/modifies and * injects them as an `` worklist, mirroring the * `` / `` precedents. It hands the * agent a concrete list to trace, which counters the silence-bias failure mode * (the agent investigates but emits nothing). It injects only locations — never * a verdict; the agent still traces each site to its consumers and judges. */ import type { SignalContext } from './signal-context.js'; export interface UntrustedInputSite { file: string; /** New-file line number where the parse construct appears. */ line: number; /** The matched untrusted-read construct, e.g. 'JSON.parse'. */ pattern: string; snippet: string; } /** * Collect the untrusted-read sites the diff introduces or modifies — matches on * `+` lines only (added/changed code), tracking the new-file line number. One * site per line, labelled by its most specific construct. Returns all sites * (uncapped); the render layer caps and notes any overflow. Exposed for testing. */ export declare function extractUntrustedInputSites(patches: Map): UntrustedInputSite[]; /** * Render the parse-site worklist as an `` block for the * agent's initial message. Returns '' when there are no sites so callers can * append unconditionally. */ export declare function renderUntrustedInputSites(sites: UntrustedInputSite[]): string; /** * Build the `` section from the review context. Returns * '' when there is no diff to scan. */ export declare function renderUntrustedInputSection(context: SignalContext): string; //# sourceMappingURL=untrusted-input-signals.d.ts.map