mirror of
https://github.com/komodorio/helm-dashboard.git
synced 2026-03-24 11:48:04 +00:00
Improve resource scanning flow (#68)
* List supported resources for scanners * Don't warn on scanner discovery commands * Use scanner-to-resource map * Save changes * Scan result tabs * Own table render for Checkov * Scannable manifest flag for scanners
This commit is contained in:
@@ -12,11 +12,18 @@ type ScannersHandler struct {
|
||||
}
|
||||
|
||||
func (h *ScannersHandler) List(c *gin.Context) {
|
||||
res := make([]string, 0)
|
||||
for _, scanner := range h.Data.Scanners {
|
||||
res = append(res, scanner.Name())
|
||||
type ScannerInfo struct {
|
||||
SupportedResourceKinds []string
|
||||
ManifestScannable bool
|
||||
}
|
||||
c.JSON(http.StatusOK, res)
|
||||
res := map[string]ScannerInfo{}
|
||||
for _, scanner := range h.Data.Scanners {
|
||||
res[scanner.Name()] = ScannerInfo{
|
||||
SupportedResourceKinds: scanner.SupportedResourceKinds(),
|
||||
ManifestScannable: scanner.ManifestIsScannable(),
|
||||
}
|
||||
}
|
||||
c.IndentedJSON(http.StatusOK, res)
|
||||
}
|
||||
|
||||
func (h *ScannersHandler) ScanDraftManifest(c *gin.Context) {
|
||||
|
||||
Reference in New Issue
Block a user