diff --git a/core/pkg/resultshandling/reporter/v2/reporteventreceiver.go b/core/pkg/resultshandling/reporter/v2/reporteventreceiver.go index 4b89cacbbe..1e4486878a 100644 --- a/core/pkg/resultshandling/reporter/v2/reporteventreceiver.go +++ b/core/pkg/resultshandling/reporter/v2/reporteventreceiver.go @@ -7,6 +7,7 @@ import ( "net/http" "net/url" "os" + "time" "github.com/armosec/armoapi-go/apis" logger "github.com/kubescape/go-logger" @@ -35,6 +36,7 @@ const ( var _ reporter.IReport = &ReportEventReceiver{} type ReportEventReceiver struct { + reportTime time.Time httpClient *http.Client clusterName string customerGUID string @@ -55,6 +57,7 @@ func NewReportEventReceiver(tenantConfig *cautils.ConfigObj, reportID string, su customerAdminEMail: tenantConfig.CustomerAdminEMail, reportID: reportID, submitContext: submitContext, + reportTime: time.Now().UTC(), } } diff --git a/core/pkg/resultshandling/reporter/v2/reporteventreceiverutils.go b/core/pkg/resultshandling/reporter/v2/reporteventreceiverutils.go index e96baeee04..13b5c971e6 100644 --- a/core/pkg/resultshandling/reporter/v2/reporteventreceiverutils.go +++ b/core/pkg/resultshandling/reporter/v2/reporteventreceiverutils.go @@ -37,7 +37,7 @@ func (report *ReportEventReceiver) setSubReport(opaSessionObj *cautils.OPASessio CustomerGUID: report.customerGUID, ClusterName: report.clusterName, ReportID: report.reportID, - ReportGenerationTime: opaSessionObj.Report.ReportGenerationTime, + ReportGenerationTime: report.reportTime, SummaryDetails: opaSessionObj.Report.SummaryDetails, Attributes: opaSessionObj.Report.Attributes, ClusterAPIServerInfo: opaSessionObj.Report.ClusterAPIServerInfo,