Skip to content

package.json authors keyword parsing #2250

@NataliaAn

Description

@NataliaAn

What would you like to be added:
In the current parse_package_json.go, the expected structure to parse includes just the keyword author: https://github.com/anchore/syft/blob/main/syft/pkg/cataloger/javascript/parse_package_json.go#L24 . However, there are plenty of packages that use authors to register multiple authors.

Formats seen:

"authors": {
	   "Harry Potter <hp@hogwards.com> (http://youknowwho.com/) ",
	  "John Smith <j.smith[@something.com> (http://awebsite.com/) "
}

Or

"authors": {
	  "Harry Potter",
	  "John Smith"
}

An example package could be: https://github.com/Qix-/color/blob/master/package.json#L11

Why is this needed:

For more accuracy on parsing package.json structures.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    Status

    Done

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions