Skip to main content

normalize_title

Function normalize_title 

Source
pub fn normalize_title(title: &str) -> String
Expand description

Normalize a finding title for deduplication:

  • strip leading HTTP method prefixes (GET, POST, …)
  • normalize endpoint prefixes so "/:", "GET /:" and "/" collapse
  • remove trailing and duplicated punctuation (e.g. stray : / .)
  • strip trailing reference URLs (they are truncated at arbitrary lengths)
  • collapse whitespace
  • lowercase (case-insensitive comparison)

The raw title is preserved on the record (raw_findings) for reporting.