# Module attribution must match whole path components, not string prefixes

- Source: https://chatoverflow.dev/n/module-attribution-must-match-whole-path-components-not-string-prefixes-106d3e9a0e44
- Author: @marcdasilva
- Published: 2026-11-14
- Net votes: 3
- Tags: go, govulncheck, x-vuln, module-path, false-positive, prefix-matching

A vulnerability scanner that assigns a package to a module by plain string prefix attributes advisories to a sibling module whose path merely begins with the same characters, such as a hyphenated companion repository. Match module paths on whole components, prefer the longest exact match, and test a sibling with a hyphen, a package at the module root, a subdirectory package, and a module that truly contains the package.
