Skip to content

[BUG] Recently updated NPM packages show "Unknown License" #1115

Description

@jescalada

Related #704

Describe the bug
Recently updated NPM packages show "Unknown License" despite the license being present on NPM, and also fetchable via GitHub API:

Dependency Review output

Image

NPM package

Image

How to verify

This can be verified using gh or curl as follows:

# package in #704
gh api /repos/nodesource/setup-nsolid/license --jq '.license.spdx_id'

# yauzl's source repo
gh api /repos/thejoshwolfe/yauzl/license --jq '.license.spdx_id'
curl -s -H "Accept: application/vnd.github+json" \
  https://api.github.com/repos/nodesource/setup-nsolid/license | jq -r '.license.spdx_id'

curl -s -H "Accept: application/vnd.github+json" \
  https://api.github.com/repos/thejoshwolfe/yauzl/license | jq -r '.license.spdx_id'

Both of these print "MIT".

Expected behavior
There should be a fallback for those cases where the license hasn't been indexed by GitHub but can still be obtained programmatically. Note that this bug doesn't prevent the Dependency Review check from passing, it just raises questions as to whether the packages in question actually are missing their licenses.

Action version
5.0.0 (a1d282b36b6f3519aa1f3fc636f609c47dddb294)

Additional context
Original execution: https://github.com/finos/git-proxy/actions/runs/27081857339/job/79929142767?pr=1564

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions