aws-samples / hardeneks

Runs checks to see if an EKS cluster follows EKS Best Practices.
https://aws-samples.github.io/hardeneks/
MIT No Attribution
862 stars 91 forks source link

fix: Remove rule type exception and linux capabilities check exception #41

Closed ssup2 closed 1 year ago

ssup2 commented 1 year ago

Issue #, if available:

Description of changes:

  1. Before call harden() function with rule type, check rules has cluster_wide and namespace_based config. Now hardeneks is not working with only cluster_wide config or only namespace_based config.
  2. Linux capabilities rules checks "container.security_context.capabilities.add" exist before check capability list.

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.