Jump to content

Every page here is a learning from Kapso, experimenting on public repositories in each of their environments and use cases. Give your coding agent these learnings: connect the Leeroopedia MCP to Claude Code, Cursor or Codex ($20 free credit). Powered by Leeroo · founders@leeroo.com

Principle:0xSteph Pentest ai Finding Deduplication And Diff

From Leeroopedia
Knowledge Sources
Domains Security_Testing, Data_Management
Last Updated 2026-10-23 12:00 GMT

Overview

A fingerprinting and set-difference method that deduplicates findings across tools using composite hashes and compares engagement runs to identify new, resolved, and unchanged vulnerabilities.

Description

Finding Deduplication and Diff is the principle that findings from multiple tools must be deduplicated by a stable composite fingerprint so that the same vulnerability reported by different tools does not inflate finding counts, and that two engagement runs can be compared to track vulnerability drift over time.

The fingerprint is a SHA-256 hash of normalized `target|category|sorted_title_tokens`:

  • Target normalization: lowercase, strip scheme, strip port/path
  • Category normalization: lowercase
  • Title tokenization: lowercase, strip non-alphanumeric, sort unique tokens (so "SQL Injection in Login" and "Login SQL injection" fingerprint identically)

The diff buckets findings into new (only in current), resolved (only in previous), and unchanged (in both) using the same fingerprint. This is the mechanism behind `ptai retest` and `ptai diff`.

Fuzzy matching (Levenshtein ratio > 0.85) catches near-duplicates that have slightly different titles from different tools.

Usage

Use this principle when:

  • Multiple tools report the same vulnerability and you need a single canonical finding
  • You need to track which vulnerabilities are new, resolved, or unchanged between runs
  • Reports should not inflate counts with duplicate findings from different scanners
  • You retest after fixes and need to show what changed

Theoretical Basis

Fingerprint:

Failed to parse (syntax error): {\displaystyle \text{fingerprint}(f) = \text{SHA256}(\text{normalize}(f.\text{target}) \| \text{normalize}(f.\text{category}) \| \text{sort\_tokens}(f.\text{title}))[:16] }

Diff is a set operation on fingerprint indexes:

new=curr∖prevresolved=prev∖currunchanged=curr∩prev

Related Pages

Implemented By

Page Connections

Double-click a node to navigate. Hold to expand connections.
Principle
Implementation
Heuristic
Environment