Query module BadParityCheck

name
Bad parity check
description
Ensure that parity checks take negative numbers into account.
kind
problem
problem.severity
recommendation
id
js/incomplete-parity-check
tags
reliability correctness external/cwe/cwe-480
precision
low
deprecated
This query is prone to false positives. Deprecated since 1.17.

Imports

javascript

Provides classes for working with JavaScript programs, as well as JSON, YAML and HTML.

Predicates

maybeNegative

Holds if e could evaluate to a negative number.

maybeNegativeVar

Holds if v could be assigned a negative number.

relevant

Holds if e is an expression that is relevant for the maybe-negative analysis.