Skip to content

[Query] Taint Analysis

github-actions[bot] edited this page Nov 8, 2026 · 1 revision

Generated from 'wiki-query.ts' on 2026-11-08, 09:20:49 UTC (v2.17.4), do not edit directly.

Taint Analysis Query [overview]

Returns the taint values inferred for every expression.
This query is requested with the type taint.

This query infers all taints for one or multiple analysis definitions within the code using taint analysis. For example, you can use the following query to get the results of the normalization analysis:

[ { "type": "taint",   "defs": [ "normalization-constant" ] } ]

Results (prettified and summarized):

Query: taint (36 ms)
   ╰ normalization-constant:
          ╰ mean calculated on normalized data yields a known result [6.30-36]
          ╰ Known summary statistic calculated on normalized data [6.25]
      ╰ 12: ⊤
      ╰ 0: ⊤
      ╰ 18: z-Score
      ╰ 14: z-Score
      ╰ 24: ⊥
      ╰ 20: ⊥

Show Detailed Results as Json

The analysis ran (including parsing and normalization and the query) within the generation environment.

The JSON contains the ids of the nodes in question (see the Interface wiki page).

{"taint":{"results":[["normalization-constant",{"domains":{"0":"top","12":"top","14":"z-Score","18":"z-Score","20":"bottom","24":"bottom"},"findings":[{"nodeId":24,"loc":[6,30,6,36],"msg":"mean calculated on normalized data yields a known result [6.30-36]"},{"nodeId":20,"loc":[6,25,6,25],"msg":"Known summary statistic calculated on normalized data [6.25]"}]}]],".meta":{}},".meta":{}}
Original Code
			x <- c(1 , 2 , 3 , 4 , 5)

			y <- scale(x)

			z <- mean(y)
Implementation Details

The Taint Analysis Query is executed by executeTaintQuery.

Clone this wiki locally

⌂ 换网址