mirror of
https://github.com/anchore/syft.git
synced 2025-11-18 00:43:20 +01:00
this PR makes the following changes to update the underlying license model to have more expressive capabilities it also provides some guarantee's surrounding the license values themselves - Licenses are updated from string -> pkg.LicenseSet which contain pkg.License with the following fields: - original `Value` read by syft - If it's possible to construct licenses will always have a valid SPDX expression for downstream consumption - the above is run against a generated list of SPDX license ID to try and find the correct ID - SPDX concluded vs declared is added to the new struct - URL source for license is added to the new struct - Location source is added to the new struct to show where the expression was pulled from
13 lines
553 B
Go
13 lines
553 B
Go
package pkg
|
|
|
|
// NpmPackageJSONMetadata holds parsing information for a javascript package.json file
|
|
type NpmPackageJSONMetadata struct {
|
|
Name string `mapstructure:"name" json:"name"`
|
|
Version string `mapstructure:"version" json:"version"`
|
|
Author string `mapstructure:"author" json:"author"`
|
|
Homepage string `mapstructure:"homepage" json:"homepage"`
|
|
Description string `mapstructure:"description" json:"description"`
|
|
URL string `mapstructure:"url" json:"url"`
|
|
Private bool `mapstructure:"private" json:"private"`
|
|
}
|