kubeaudit icon indicating copy to clipboard operation
kubeaudit copied to clipboard

fix unmarshal errors not found for known k8s schema

Open fedeztk opened this issue 2 years ago • 0 comments

Description

Fixes #523 (known schema not raising errors when incompatible with k8s resource definitions)

Type of change
  • [x] Bug fix :bug:
  • [ ] New feature :sparkles:
  • [ ] This change requires a documentation update :book:
  • [ ] Breaking changes :warning:
How Has This Been Tested?

Tested using the example provided in #523. Prior to this change there was no error; now, known resources (e.g. Deployments) raise an error when the unmarshaling goes wrong (like unquoted labels) and clearly shows that there is a misconfiguration in the manifest.

Checklist:
  • [x] I have :tophat: my changes (A 🎩 specifically includes pulling down changes, setting them up, and manually testing the changed features and potential side effects to make sure nothing is broken)
  • [x] I have performed a self-review of my own code
  • [ ] I have made corresponding changes to the documentation
  • [ ] I have added tests that prove my fix is effective or that my feature works
  • [x] New and existing unit tests pass locally with my changes
  • [x] The test coverage did not decrease
  • [x] I have signed the appropriate Contributor License Agreement

fedeztk avatar Sep 01 '23 11:09 fedeztk