Skip to content

Commit

Permalink
Add ALPM Metadata to CYCLONEDX and SPDX output formats (#1747)
Browse files Browse the repository at this point in the history
Signed-off-by: Shane Dell <shanedell100@gmail.com>
  • Loading branch information
shanedell authored Apr 18, 2023
1 parent ee80349 commit 6e835fd
Showing 1 changed file with 12 additions and 12 deletions.
24 changes: 12 additions & 12 deletions syft/pkg/alpm_metadata.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,19 +14,19 @@ var _ FileOwner = (*AlpmMetadata)(nil)
const AlpmDBGlob = "**/var/lib/pacman/local/**/desc"

type AlpmMetadata struct {
BasePackage string `mapstructure:"base" json:"basepackage"`
Package string `mapstructure:"name" json:"package"`
Version string `mapstructure:"version" json:"version"`
Description string `mapstructure:"desc" json:"description"`
Architecture string `mapstructure:"arch" json:"architecture"`
BasePackage string `mapstructure:"base" json:"basepackage" cyclonedx:"basepackage"`
Package string `mapstructure:"name" json:"package" cyclonedx:"package"`
Version string `mapstructure:"version" json:"version" cyclonedx:"version"`
Description string `mapstructure:"desc" json:"description" cyclonedx:"description"`
Architecture string `mapstructure:"arch" json:"architecture" cyclonedx:"architecture"`
Size int `mapstructure:"size" json:"size" cyclonedx:"size"`
Packager string `mapstructure:"packager" json:"packager"`
License string `mapstructure:"license" json:"license"`
URL string `mapstructure:"url" json:"url"`
Validation string `mapstructure:"validation" json:"validation"`
Reason int `mapstructure:"reason" json:"reason"`
Files []AlpmFileRecord `mapstructure:"files" json:"files"`
Backup []AlpmFileRecord `mapstructure:"backup" json:"backup"`
Packager string `mapstructure:"packager" json:"packager" cyclonedx:"packager"`
License string `mapstructure:"license" json:"license" cyclonedx:"license"`
URL string `mapstructure:"url" json:"url" cyclonedx:"url"`
Validation string `mapstructure:"validation" json:"validation" cyclonedx:"validation"`
Reason int `mapstructure:"reason" json:"reason" cyclonedx:"reason"`
Files []AlpmFileRecord `mapstructure:"files" json:"files" cyclonedx:"files"`
Backup []AlpmFileRecord `mapstructure:"backup" json:"backup" cyclonedx:"backup"`
}

type AlpmFileRecord struct {
Expand Down

0 comments on commit 6e835fd

Please # to comment.