You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Some package.json files contain very little information, and specifically, they don't have a name or version field. This is seems to be considered allowable for unpublished packages. (See related: microsoft/rushstack#2070).
For example, here's an entire package.json file we found:
This results in Syft decoding the JSON to a PackageJSON without error, which results in an empty and unusable package being returned in the end.
What you expected to happen:
We should enforce that if a parsed PackageJSON is missing the name or version fields, it should not be included in the final output. This doesn't need to be an error, but we should consider expressing this in a more detailed level of log output.
How to reproduce it (as minimally and precisely as possible):
What happened:
Some
package.json
files contain very little information, and specifically, they don't have aname
orversion
field. This is seems to be considered allowable for unpublished packages. (See related: microsoft/rushstack#2070).For example, here's an entire
package.json
file we found:This results in Syft decoding the JSON to a
PackageJSON
without error, which results in an empty and unusable package being returned in the end.What you expected to happen:
We should enforce that if a parsed
PackageJSON
is missing thename
orversion
fields, it should not be included in the final output. This doesn't need to be an error, but we should consider expressing this in a more detailed level of log output.How to reproduce it (as minimally and precisely as possible):
Anything else we need to know?:
Environment:
syft version
:cat /etc/os-release
or similar): macOSThe text was updated successfully, but these errors were encountered: