Safeguard
Supply Chain•

Do GitHub stars and download counts show a library is safe?

Stars and downloads measure attention, not safety. Myth versus fact on popularity signals, and what to check instead before you adopt a library.

Safeguard Security Team
3 min read

No. Stars and download counts measure attention, not safety. A popular library can have unfixed flaws, and a quiet one can be solid. Use popularity only to judge how many other people are looking, then check license, security policy, maintenance and provenance directly.

Myth versus fact

MythFact
Many stars means the code was reviewedA star is a bookmark. It says nothing about review depth.
High downloads means it is trustworthyDownloads include automated installs, mirrors and CI runs, and can be inflated.
A popular package is too watched to be compromisedPopular packages are attractive targets because one compromise reaches many users.
No known vulnerabilities means no vulnerabilitiesIt may mean few researchers have looked, or that issues were fixed quietly.

What registries themselves say

The npm documentation describes its search results as keyword based, with no subjective ranking beyond a minimal boost that deprioritizes spammy or entirely new packages. Users can sort by keyword match, download counts, most dependents or last published date. In other words, the registry gives you sorting options, not a safety rating, and sorting by downloads is a convenience for finding things.

The same documentation points to provenance information on the package page where available, and separately states that provenance does not guarantee a package is free of malicious code. It links a package to its source and build instructions so you can decide whether to trust it. See what provenance proves and does not prove.

What popularity is useful for

Popularity has a fair use. A library with many dependents has more people who will notice a break, report a bug and file an issue. It is also more likely to have documented answers and alternatives. Treat popularity as a tiebreaker between two libraries that otherwise pass your checks, not as a pass by itself.

What to check instead

  1. License. Is a license published, and can you accept its terms?
  2. Security policy. Is there a documented, private way to report a vulnerability?
  3. Maintenance. Is the repository active or finished by design, and not archived?
  4. Release integrity. Do releases carry signatures or provenance where the ecosystem supports them?
  5. Footprint. What does it pull in?
  6. Fit. Does it do exactly what you need, without a long list of extras?

The library selection checklist turns these into a table.

Why attackers like popular names

Attackers do not need a large audience for their own package. They publish look-alike names or target real maintainers so that a popular package carries their change. Popularity therefore raises the value of a compromise. Reviewing what actually arrives in your build matters more than how many people use it.

Where Safeguard fits

Safeguard's SBOM and dependency scanning show what your build includes, whatever its popularity, and its zero-day discovery and reachability analysis help you see which issues actually touch your code. Try the free scan at gold.safeguard.sh/scan.

Quick check

Is a library with few stars risky?

Not automatically. Judge it on the checklist. Low attention does mean fewer reviewers, so keep your own tests and an exit plan.

Can download counts be faked?

Counts include automated traffic, so treat them as rough. Do not use them as proof of trust.

Sources

Last reviewed: 19 October 2026.

Never miss an update

Weekly insights on software supply chain security, delivered to your inbox.

Self-healing security runs on Safeguard.

Your first fix PR is minutes away.

No sales call required, even your agent can complete the purchase over MCP.