Skip to content

npm finding for git package on yarn.lock - false positive? #2850

Description

@nirhaas

Hi. I ran osv-scanner on the firebase-js-sdk repository and encountered a potential false positive match.

The project's yarn.lock includes a direct git dependency pointing to Google's official repository:

"closure-net@git+[https://github.com/google/closure-net.git#6f48f578d3e80fe7a85e530a5d95b9351433d135](https://github.com/google/closure-net.git#6f48f578d3e80fe7a85e530a5d95b9351433d135)":
  version "0.0.0"
  resolved "git+[https://github.com/google/closure-net.git#6f48f578d3e80fe7a85e530a5d95b9351433d135](https://github.com/google/closure-net.git#6f48f578d3e80fe7a85e530a5d95b9351433d135)"

However, osv-scanner flags this against MAL-2026-276, which is a malicious package advisory intended for the closure-net npm registry package.

Since yarn is resolving this dependency directly from a specific commit on a public github repository (google/closure-net) rather than fetching a package from the npm registry, it seems like osv-scanner might be incorrectly mapping the package name collision.

Could you please clarify if osv-scanner is intended to match git dependencies this way, or if this is an issue with how the ecosystem lookup is handled for direct git URLs?

If this is not a bug - does that mean that firebase-js-sdk users are considered compromised?

Thanks

Metadata

Metadata

Assignees

Labels

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions