Repository navigation
Release v0.0.281
…nnotation
Overview
ValidateStatusAnnotation is an allowlist that rejects any kubescape.io/status
value not in the known set. This adds the new unsupported-schema value so
objects carrying it pass validation instead of being rejected with "invalid value".
Context: kubevuln will write a stub VulnerabilityManifestSummary annotated
kubescape.io/status: unsupported-schema for images whose registry serves a
manifest schema the scanner can't read. While VulnerabilityManifestSummary
itself isn't currently routed through this validator, adding the value here keeps
the shared status vocabulary consistent and future-proofs any object type that
is validated by it.
Changes
pkg/utils/validations.go: addhelpers.UnsupportedSchemato the
ValidateStatusAnnotationswitch.pkg/utils/validations_test.go: add a "valid status - unsupported schema" case.
Related issues/PRs
Depends on kubescape/k8s-interface#155 (defines helpers.UnsupportedSchema).
Bump k8s-interface to the release that includes it, then drop the temporary
local replace before merge.
Part of: kubescape/kubevuln#369
Checklist
- Commits signed off (DCO)
- Builds and tests pass locally (against the k8s-interface change)