fix(privacy): drop nvidia-bug-report / dmidecode false positives

- Allowlist nvidia.com, mellanox.com, gnu.org, debian.org, ubuntu.com; the
  common "not specified / not available" FRU placeholders.
- Reject matches with no alphanumeric or <2 chars (stray ":" from a dumped
  resolv line), fru_location values that echo the field name ("Base Board
  Asset Tag", "P1-DIMMA1_AssetTag"), IPv4 embedded in a version string
  ("18:6.1.4.5"), and e-mail on kernel ring-buffer lines (driver copyright).
- Customer guess: don't report a single-hit low-confidence domain at all -
  "unidentified" beats guessing nvidia.com from a driver comment.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
This commit is contained in:
Mikhail Chusavitin
2026-09-02 16:27:17 +03:00
co-authored by Claude Sonnet 5
parent c9748f3830
commit 551d8e450d
5 changed files with 105 additions and 12 deletions
+4 -2
View File
@@ -96,13 +96,15 @@ func guessCustomers(findings []models.PrivacyFinding) []models.CustomerGuess {
return guesses[i].Domain < guesses[j].Domain
})
// Keep the strongest few; drop weak single-hit noise unless it is all we have.
// Drop weak single-hit low-confidence candidates entirely - a "could not
// identify" is more useful than guessing a driver-comment or kernel-source
// domain (nvidia.com, linux.it, ...).
out := make([]models.CustomerGuess, 0, 3)
for _, g := range guesses {
if len(out) >= 3 {
break
}
if g.Hits < 2 && g.Confidence == "low" && len(out) > 0 {
if g.Hits < 2 && g.Confidence == "low" {
continue
}
out = append(out, g)