Skip to content

[Linting Rule] Problematic Inputs

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

Generated from 'wiki-linter.ts' on 2026-10-27, 10:46:55 UTC (v2.16.6), do not edit directly.

Problematic Inputs [overview]

smell performance readability security

This rule is a best-effort rule.

Finds dynamic calls (e.g. eval, system) with non-constant inputs, and graphics-device calls (pdf, postscript) where a filename starts with '|' indicating a pipe command injection.
This linting rule is implemented in src/linter/rules/problematic-inputs.ts.

Configuration

Linting rules can be configured by passing a configuration object to the linter query as shown in the example below. The problematic-inputs rule accepts the following configuration options:

Examples

function(x) {
	eval(x)
}

The linting query can be used to run this rule on the above example:

[ { "type": "linter",   "rules": [ { "name": "problematic-inputs",     "config": {} } ] } ]

Results (prettified and summarized):

Query: linter (10 ms)
   ╰ Problematic Inputs (problematic-inputs):
       ╰ certain:
           ╰ Use of configured dynamic call at 3.2-8 with inputs 5 (type: [param], trace: pure)

More examples are the test cases in test/functionality/linter/lint-problematic-inputs.test.ts.

Clone this wiki locally

⌂ 换网址