From ba0c6c74db7ad350d833bb1591c2cf9ce199a6b7 Mon Sep 17 00:00:00 2001 From: attiasas Date: Mon, 2 Dec 2024 14:10:42 +0200 Subject: [PATCH] Parse policy Field from scan response --- xray/services/scan.go | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/xray/services/scan.go b/xray/services/scan.go index 3895c752e..2ebfcfade 100644 --- a/xray/services/scan.go +++ b/xray/services/scan.go @@ -243,6 +243,7 @@ type Violation struct { LicenseKey string `json:"license_key,omitempty"` LicenseName string `json:"license_name,omitempty"` IgnoreUrl string `json:"ignore_url,omitempty"` + Policies []Policy `json:"policies,omitempty"` RiskReason string `json:"risk_reason,omitempty"` IsEol *bool `json:"is_eol,omitempty"` EolMessage string `json:"eol_message,omitempty"` @@ -320,6 +321,11 @@ type JfrogResearchSeverityReason struct { IsPositive bool `json:"is_positive,omitempty"` } +type Policy struct { + Policy string `json:"policy,omitempty"` + Rule string `json:"rule,omitempty"` +} + type XscPostContextResponse struct { MultiScanId string `json:"multi_scan_id,omitempty"` }