Skip to content

[Linting Rule] Unescaped Arguments

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

Generated from 'wiki-linter.ts' on 2026-11-08, 14:25:27 UTC (v2.17.4), do not edit directly.

Unescaped Arguments [overview]

smell quickfix security shiny

This rule is a best-effort rule.

Finds arguments of critical system, evaluation, database, and HTML/JavaScript calls that are not properly escaped.
This linting rule is implemented in src/linter/rules/unescaped-arguments.ts.

Configuration

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

  • acceptedInputs
    The input types that count as already escaped
  • categories
    The target, critical functions, critical arguments, sanitizers and quick fixes for each category
  • disabledCategories
    The categories that should be disabled and not checked
  • maxDecentDepth
    The maximum depth to descent to find unescaped parts of an argument

Examples

function(dir) {
	system(paste0("ls ", dir))
}

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

[ { "type": "linter",   "rules": [ { "name": "unescaped-arguments",     "config": {} } ] } ]

Results (prettified and summarized):

Query: linter (31 ms)
   ╰ Unescaped Arguments (unescaped-arguments):
       ╰ uncertain:
           ╰ Unescaped system argument of system at 2.9-26 (1 quick fix(es) available)

More examples are the test cases in test/functionality/linter/lint-unescaped-arguments.test.ts.

Clone this wiki locally

⌂ 换网址