-
Notifications
You must be signed in to change notification settings - Fork 587
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ZERO npm dependencies discovered if any npm dependency has an array as a license #1479
Labels
bug
Something isn't working
Comments
Mikcl
changed the title
ZERO npm dependencies discovered if one package has a deprecated license section.
ZERO npm dependencies discovered if one package has a deprecated license
Jan 18, 2023
Mikcl
changed the title
ZERO npm dependencies discovered if one package has a deprecated license
ZERO npm dependencies discovered if any npm dependency has a deprecated license
Jan 18, 2023
Mikcl
changed the title
ZERO npm dependencies discovered if any npm dependency has a deprecated license
ZERO npm dependencies discovered if any npm dependency has an array as a license
Jan 19, 2023
Updated the title to reflect that its not just "deprecated" syntax but modern sytax can also be effected.
|
This was referenced Jan 20, 2023
This was referenced Jan 30, 2023
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Please provide a set of steps on how to reproduce the issue
package.json
with the following a package that has a deprecated license:package-lock.json
vianpm install --package-lock-only
You will see something like the following in the
package-lock.json
(note the deprecated license evaluated):syft .
in the same directory.What happened:
This happens even when there are numerous packages in the dependencies. i.e ZERO packages are discovered. Not
pause-stream
, nor its dependencies, or any other packages specified inpackage.json/package-lock.json
prior to running syft.What you expected to happen:
I would expect syft to find all the packages regardless of whether the licencse section is deprecated or not (possibly even if it is invalid?)
https://docs.npmjs.com/cli/v9/configuring-npm/package-json#license
Anything else we need to know?:
This is particualrly high importance as this would mean syft misses all of the npm dependencies if only one is "misformatted". No error is raised, only a warning when running in verbose mode.
Happended for
lockfileVersion: 2
however believe it occurs for version 1 and perhaps 3. Additioanlly there are likely many similar ways to cause 0 packages to be discovered. (make the unmarhalling step fail).Environment:
syft version
:0.62.1
(same with latest)cat /etc/os-release
or similar):The text was updated successfully, but these errors were encountered: