Modify the ScanningTarget to be a cluster or file

This commit is contained in:
Moshe-Rappaport-CA
2022-07-06 17:08:03 +03:00
parent dd79e348d3
commit 3d37a6ac2f

View File

@@ -103,6 +103,11 @@ func (opap *OPAProcessor) Process(policies *cautils.Policies) error {
logger.L().Info("Done scanning " + targetScan)
}
// All scans whose target is not a cluster, currently their target is a file, which is what the backend expects
// (e.g. local-git, directory, etc)
if opap.OPASessionObj.Metadata.ScanMetadata.ScanningTarget != clusterScan {
opap.OPASessionObj.Metadata.ScanMetadata.ScanningTarget = reporthandlingv2.File
}
return errs
}