update report size limit to 4mb

This commit is contained in:
David Wertenteil
2022-07-05 15:13:02 +03:00
parent fc78d9143b
commit 424f2cc403
2 changed files with 4 additions and 3 deletions

View File

@@ -18,7 +18,7 @@ import (
reporthandlingv2 "github.com/armosec/opa-utils/reporthandling/v2"
)
const MAX_REPORT_SIZE = 2097152 // 2 MB
const MAX_REPORT_SIZE = 4000000 // 4 MB
type ReportEventReceiver struct {
httpClient *http.Client
@@ -124,6 +124,7 @@ func (report *ReportEventReceiver) sendResources(host string, opaSessionObj *cau
if err := report.setResults(splittedPostureReport, opaSessionObj.ResourcesResult, &counter, &reportCounter, host); err != nil {
return err
}
return report.sendReport(host, splittedPostureReport, reportCounter, true)
}
func (report *ReportEventReceiver) setResults(reportObj *reporthandlingv2.PostureReport, results map[string]resourcesresults.Result, counter, reportCounter *int, host string) error {