From 1ed28a5d9fdcf587a54b0aa2090599b6ad90cbae Mon Sep 17 00:00:00 2001 From: Nikolay Osmolovskiy Date: Mon, 15 May 2023 14:03:32 +0300 Subject: [PATCH] source attribute added to report. Signed-off-by: Nikolay Osmolovskiy --- pkg/target/http/model.go | 1 + pkg/target/http/utils.go | 1 + 2 files changed, 2 insertions(+) diff --git a/pkg/target/http/model.go b/pkg/target/http/model.go index efc61ed8..4a80b2f5 100644 --- a/pkg/target/http/model.go +++ b/pkg/target/http/model.go @@ -32,4 +32,5 @@ type Result struct { Properties map[string]string `json:"properties,omitempty"` Resource Resource `json:"resource"` CreationTimestamp time.Time `json:"creationTimestamp"` + Source string `json:"source"` } diff --git a/pkg/target/http/utils.go b/pkg/target/http/utils.go index faec1ad7..26547091 100644 --- a/pkg/target/http/utils.go +++ b/pkg/target/http/utils.go @@ -75,6 +75,7 @@ func NewJSONResult(r v1alpha2.PolicyReportResult) Result { Properties: r.Properties, Resource: res, CreationTimestamp: time.Unix(r.Timestamp.Seconds, int64(r.Timestamp.Nanos)), + Source: r.Source, } }