fixing the crash around submit rbac

This commit is contained in:
Ben Hirschberg
2022-01-23 20:17:03 +02:00
parent 2aa8a0c935
commit 5f43da94ba
@@ -38,7 +38,9 @@ func NewReportEventReceiver(tenantConfig *cautils.ConfigObj) *ReportEventReceive
}
func (report *ReportEventReceiver) ActionSendReport(opaSessionObj *cautils.OPASessionObj) error {
cautils.ReportV2ToV1(opaSessionObj)
if opaSessionObj.PostureReport == nil && opaSessionObj.Report != nil {
cautils.ReportV2ToV1(opaSessionObj)
}
if report.customerGUID == "" {
report.message = "WARNING: Failed to publish results. Reason: Unknown accout ID. Run kubescape with the '--account <account ID>' flag. Contact ARMO team for more details"