Commit Graph

8 Commits

Author SHA1 Message Date
Cody Jackson 2f58374c39 Ensure skipping works for multiple cis versions
We validating the security scan config appropriately when
a version was already present in the skip list. This now
ensures a version exists before verifying that it contains an array.

We were also replacing the existing skip object in the
security-scan-config which prevented us from storing
multiple versions at a time. We now extend the object
instead using the spread operator.

rancher/rancher#24733
rancher/rancher#24742
2019-12-23 10:14:07 -07:00
Cody Jackson 51c1d34dfa Provide empty configMap when it can't be retrieved
When the user doesn't have access to the systemProject we just
return an empty configMap so the page can proceed without error.

We also disable the runScan button if the systemProject isn't available.

rancher/rancher#24644
2019-12-20 16:10:12 -07:00
Westly Wright 768a84de61
Merge pull request #3644 from codyrancher/skipList
Give the skipList a default value if malformed
2019-12-18 09:37:10 -07:00
Cody Jackson ca7c5a0cf1 Give the skipList a default value if malformed
I don't want to validate the configMap in the skipList
because a malformed configMap is the equivelant of
an empty skipList for the purposes of running a scan
and displaying what is currently being skipped.

rancher/rancher#24627
2019-12-17 17:14:11 -07:00
Cody Jackson b3fd5dff55 Make the security-scan-config load for each route
The security-scan-config wasn't being reloaded when
navigating between clusters because the config map
was getting cached. This forces it to be reloaded.

rancher/rancher#24623
2019-12-17 16:35:05 -07:00
Cody Jackson 84d50d3aad lint:fix 2019-12-14 22:39:01 -07:00
Cody Jackson 1e7ed9488c Adding support to CIS for versioned skipping
This enables us to have separate skip lists for different versions of
CIS scans.
2019-12-14 22:08:41 -07:00
Cody Jackson 91bd0498d7 Provide more feedback when a security config is malformed
We provide an error notification when the security config is malformed and
the user attempts to run a scan. We also prevent the scan from running.

We also added a default sort by 'id' on the scan detail table.

rancher/rancher#24495
rancher/rancher#24496
2019-12-11 16:42:07 -07:00