← All rules
mcp-scan rule
Low-trust supply chain
supply-chain-low-trustmediumWhat mcp-scan saw
Two triggers. The first fires when npm metadata has no usable repository URL, where usable means a github.com URL after stripping git+ and .git. The second fires when a GitHub trust score under 40 is computed from stars (up to 30), forks (up to 20), and last push recency (40 points inside six months, 20 inside a year, otherwise zero).
Why it fires
The score is weighted so that recency alone is worth 40, which means any package pushed in the last six months clears the threshold regardless of popularity. Scoring below 40 therefore means the package is both unpopular and not recently pushed, which is a narrower and more useful signal than a raw star count.
When this is a false positive
- The package is hosted anywhere other than GitHub. extractRepoUrl returns null for GitLab, Bitbucket, Codeberg, and self-hosted forges, so the package gets the no-repository finding and a trust score of 20 no matter how well maintained it is.
- A new package that is genuinely good but has not accumulated stars and had its last push seven months ago sits at 20 points and reports.
- A private or internal package with no public repository at all. There is nothing to link and nothing to score.
- GitHub API rate limiting is handled separately: when metadata cannot be fetched the score is set to 40 and no finding is emitted, so a rate-limited scan under-reports rather than over-reports.
How to fix it
- Read the finding text. It distinguishes 'no public repository URL linked' from a numeric trust score, and the two need different responses.
- For the no-repository case, find the source yourself. If it is on GitLab or self-hosted, review it there and treat the finding as a limitation of the check.
- For a low score, look at the repository directly: open issues, recent commits, and whether the maintainer responds. Those tell you more than the score does.
- Set GITHUB_TOKEN in your environment before scanning. The scanner sends it to the GitHub API, which raises the rate limit and avoids silently skipped scores.
- For packages you have reviewed, add them to allowedPackages in .mcp-scan.json, which filters every finding below CRITICAL for that package.