Files
pruefwerk/docs/features/deduplication.md
T
Sharang ParnerkarandClaude Opus 5.5 2404d614e6
CI / Check (push) Skipped
CI / Detect Changes (pull_request) Skipped
CI / Deploy Agent (pull_request) Skipped
CI / Deploy Dashboard (pull_request) Skipped
CI / Deploy Docs (pull_request) Skipped
CI / Deploy MCP (pull_request) Skipped
CI / Check (pull_request) Successful in 7m1s
docs: match the pilot product; the assistant reads only published docs
- findings: every status with its German label, both Fehlalarm kinds,
  Zu prüfen, accepted risk, history, CRA and catalog controls; the
  "AI learns from feedback" claim removed (nothing implements it).
- scanning: Prüfung starten, real statuses (no Queued), the new-findings
  e-mail, tables of failure and "Nicht ausgeführt" reasons, all phases.
- repositories: the Prüfobjekte list and the Neues Prüfobjekt wizard,
  archive rules, API-only issue tracker; getting started (DE/EN), SBOM
  (embedded library versions), tools, PLC, overview, MCP, help, README.
- No Firmwerk bundle import exists yet: the UI, the scan matrix and the
  docs no longer tell customers to import one.
- The help assistant skips docs/design, .vitepress and node_modules, as
  the docs site does.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01EYKjxacrr6K88DruUmP48p
2026-09-29 00:31:49 +02:00

2.9 KiB

Finding Deduplication

Prüfwerk automatically deduplicates findings across all scanning surfaces to prevent noise and duplicate issues.

Scan Finding Dedup

Findings from a scan are deduplicated using SHA-256 fingerprints computed from:

  • Target ID
  • Scanner rule ID (e.g., Semgrep check ID, gitleaks rule; for cppcheck the tool name and check ID)
  • File path, relative to the scanned tree
  • Line number

Before inserting a new finding, the pipeline checks if a finding with the same fingerprint already exists. If it does, the finding is skipped: the stored finding keeps its status, and only its CRA and control references are refreshed.

DAST / Pentest Finding Dedup

Dynamic testing findings go through two-phase deduplication:

Phase 1: Exact Dedup

Findings with the same canonicalized title, endpoint, and HTTP method are merged. Evidence from duplicate findings is combined into a single finding, keeping the highest severity.

Title canonicalization handles common variations:

  • Domain names and URLs are stripped from titles (e.g., "Missing HSTS header for example.com" becomes "Missing HSTS header")
  • Known synonyms are resolved (e.g., "HSTS" maps to "strict-transport-security", "CSP" maps to "content-security-policy")

Phase 2: CWE-Based Dedup

After exact dedup, findings with the same CWE and endpoint are merged. This catches cases where different tools report the same underlying issue with different titles or vulnerability types (e.g., a missing HSTS header reported as both security_header_missing and tls_misconfiguration).

The primary finding is selected by highest severity, then most evidence, then longest description. Evidence from merged findings is preserved.

When Dedup Applies

  • At insertion time: During a pentest session, before each finding is stored in MongoDB
  • At report export: When generating a pentest report, all session findings are deduplicated before rendering

PR Review Comment Dedup

PR review comments are deduplicated to prevent posting the same finding multiple times:

  • Each comment includes a fingerprint computed from the repository, PR number, file path, line, and finding title
  • Within a single review run, duplicate findings are skipped
  • The fingerprint is embedded as an HTML comment in the review body for future cross-run dedup

Issue Tracker Dedup

Before creating an issue in GitHub, GitLab, Jira, or Gitea, the scanner:

  1. Searches for an existing issue matching the finding's fingerprint
  2. Falls back to searching by issue title
  3. Skips creation if a match is found

Code Review Dedup

Multi-pass LLM code reviews (logic, security, convention, complexity) are deduplicated across passes using proximity-aware keys:

  • Findings on the same file, in the same block of four lines, with the same normalized title words are considered duplicates
  • The finding with the highest severity is kept
  • CWE information is merged from duplicates