Zora is an open source solution that helps you achieve compliance with Kubernetes best practices recommended by industry-leading frameworks. By scanning your cluster with multiple plugins, Zora identifies potential issues, misconfigurations, and vulnerabilities.
This PR deals with two issues which can cause stale information to be stored
The main ClusterScan controller continues with processing when reconciliation has already errored, preventing the LastSuccessfulScanID information from being updated
The generated ScanStatus is derived from the live data and ignores changes made to the currently reconciling ClusterScan, which is persisted at the end of the reconciler.
Linked Issues
How has this been tested?
The easiest way to reproduce this issue appears to be running with a ClusterScan set to only persist the last successful scan, i.e. setting the successfulScansHistoryLimit to 1.
Let the scanning run for a few iterations, after each run check the database to see if there are zero (0) vulnerabilities
Checklist
[X] I have labeled this PR with the relevant Type labels
Description
This PR deals with two issues which can cause stale information to be stored
Linked Issues
How has this been tested?
successfulScansHistoryLimit
to 1.Checklist