File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -467,6 +467,8 @@ type SpdxStatusComponent struct {
467467 License string `json:"license" example:"MIT"`
468468 Name string `json:"name" example:"@some/component"`
469469 Version string `json:"version" example:"7.19.6"`
470+ PrStatus string `json:"prStatus" example:"noassertion"`
471+ Type components.ComponentType `json:"type" example:"Package"`
470472 ScanRemarks []SpdxStatusScanRemarks `json:"scanRemarks"`
471473 LicenseRemarks []SpdxStatusLicenseRemarks `json:"licenseRemarks"`
472474 PolicyRuleStatus []SpdxStatusPolicy `json:"policyRuleStatus"`
Original file line number Diff line number Diff line change @@ -2093,13 +2093,18 @@ func (projectHandler *ProjectHandler) CreateProjectSPDXExternCheck(requestSessio
20932093 components := make ([]project.SpdxStatusComponent , 0 )
20942094 for _ , compRes := range evalRes .Results {
20952095 componentInfoElement := compRes .Component
2096+
20962097 statusComponent := project.SpdxStatusComponent {
20972098 SpdxId : componentInfoElement .SpdxId ,
20982099 License : componentInfoElement .GetLicenseEffective (),
20992100 Name : componentInfoElement .Name ,
21002101 Version : componentInfoElement .Version ,
2102+ Type : componentInfoElement .Type ,
21012103 }
21022104
2105+ usedPolicyRule , _ := compRes .GetUsedPolicyRule ()
2106+ statusComponent .PrStatus = usedPolicyRule
2107+
21032108 if compRes .Status != nil {
21042109 policyRuleStatus := make ([]project.SpdxStatusPolicy , 0 )
21052110 for _ , policyRule := range compRes .Status {
You can’t perform that action at this time.
0 commit comments