Skip to main content

Module input

Module input 

Source
Expand description

Input validation rules.

Rules detecting input validation issues:

  • Environment variable handling (RUSTCOLA065, RUSTCOLA047)
  • Untrimmed stdin input (RUSTCOLA053)
  • Invisible Unicode detection (RUSTCOLA048)
  • Infinite iterators (RUSTCOLA054)
  • Unsafe deserialization (RUSTCOLA089, RUSTCOLA091)
  • Unbounded reads (RUSTCOLA090)
  • Division by untrusted input (RUSTCOLA077)
  • Unchecked timestamp multiplication (RUSTCOLA106)

Structs§

CleartextEnvVarRule
Detects sensitive data (passwords, secrets, keys) stored via env::set_var. Environment variables can be read by child processes and are often logged.
DivisionByUntrustedRule
Detects division operations using untrusted input as denominator without validation.
EnvVarLiteralRule
Detects string literals passed to env::var() - potential config leakage.
InfiniteIteratorRule
Detects infinite iterators (repeat, cycle, repeat_with) without termination.
InsecureJsonTomlDeserializationRule
Detects untrusted input passed to JSON/TOML deserialization functions.
InsecureYamlDeserializationRule
Detects untrusted input passed to YAML deserialization functions.
InvisibleUnicodeRule
Detects invisible Unicode characters in source code.
SerdeLengthMismatchRule
Detects when the declared length argument to serialize_struct/serialize_tuple/etc doesn’t match the actual number of serialize_field/serialize_element calls.
UnboundedReadRule
Detects read_to_end/read_to_string on untrusted sources without size limits.
UncheckedTimestampMultiplicationRule
Detects unchecked multiplication when converting time units (seconds to nanos, etc.).
UntrimmedStdinRule
Detects stdin input used without trimming trailing newlines.

Functions§

register_input_rules
Register all input validation rules with the rule engine.