sec/iast
lib/sec/iast.vklib/sec/iast.vk
Pure-Veko Interactive Application Security Testing (IAST) taint tracker,
source/sanitizer/sink classifiers, and SARIF 2.1.0 finding emitter.
Zero top-level mut heap globals (RT-GLOBALS safe); zero capabilities required.
IastTaint = struct { value str, origin str, file str, line i64 }
Recorded runtime taint value with origin metadata and source location.
IastSession = struct { taints block[IastTaint] = ..., sanitized map = ..., findings block[sarif/Finding] = ..., seen map = ... }
Per-execution IAST session tracking active taints, sanitizations, findings, and dedup keys.
taint = fn [v str] str
Identity helper allowing callers and tests to explicitly mark untrusted strings (sec/iast/taint).
sink-sql = fn [sql str, params block] enum
Safe no-op demo/harness sink stubs for IAST instrumentation tests.
sink-html = fn [html_s str] str
sink-redirect = fn [loc str] str
sink-url = fn [u str] str
sink-path = fn [p str] str
sink-exec = fn [cmd str, args block] i64
sink-log = fn [msg str] enum
normalize-fn-name = fn [fn_name str] str
Strips leading compiler module prefixes (e.g. __m0__, m12__, m_3__) and trailing /or suffixes.
mark-taint = fn [mut sess IastSession, value str, origin str, file str, line i64]
Registers a non-empty tainted value (short < 3-char values allowed only for explicit/query/param origins).
mark-sanitized = fn [mut sess IastSession, value str, category enum]
Marks value as sanitized for category (.path, .html, .url, .sql, or .all).
classify-source = fn [fn_name str] str
Maps a function name to an IAST taint source category, or '' if not a tracked source.
classify-sanitizer = fn [fn_name str] enum
Maps a function name to its sanitizer category (.path, .html, .url, .sql), or .none.
classify-sink = fn [fn_name str] str
Maps a function name to its primary VKIAST001..VKIAST008 rule ID, or '' if not a sink.
check-sink = fn [mut sess IastSession, fn_name str, args block[str], has_secret_arg bool, file str, line i64, stack block[str]] bool
Inspects a sink invocation for tainted or .secret arguments and records a deduplicated SARIF finding.
report-findings = fn [sess IastSession] block[sarif/Finding]
Returns all recorded IAST findings for sess.