Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(kubernetes): support for Kustomize to reduce false positives #6746

Open
bradmac-ats opened this issue Sep 27, 2023 · 0 comments
Open

feat(kubernetes): support for Kustomize to reduce false positives #6746

bradmac-ats opened this issue Sep 27, 2023 · 0 comments
Labels
community Community contribution feature request Community: new feature request kubernetes Kubernetes query

Comments

@bradmac-ats
Copy link

Is your feature request related to a problem? Please describe.
I've been trying kics out on our Kubernetes gitops repositories. We're using Kustomize overlays to keep our dev and prod environments aligned as much as possible. This leads to some false positives from kics that I'd rather not deal with manually.

Because the namespace is configured in the Kustomize.yaml file rather than on individual resources, we get

  • "Namespaces like 'default', 'kube-system' or 'kube-public' should not be used",

because some things are specified in the base only, or in the overlays only, we get false positives for:

  • Memory requests should be defined for each container.
  • Check if Readiness Probe is not configured

In all kics found 551 vulnerabilities, of which I'd guess 400+ are false positives. Would be awesome if kics could help eliminate this chaff.

Describe the solution you'd like
pay attention to the existence of kustomization.yaml files and run the scan on overlays only after all Kustomize patches are applied

Describe alternatives you've considered
Only alternative I can see would be to not use Kustomize at all.

Additional context
I'm running kics in GitLab SaaS using the official Jobs/SAST-IaC.latest.gitlab-ci.yml ci template

@bradmac-ats bradmac-ats added community Community contribution feature request Community: new feature request labels Sep 27, 2023
@github-actions github-actions bot added the kubernetes Kubernetes query label Sep 27, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
community Community contribution feature request Community: new feature request kubernetes Kubernetes query
Projects
None yet
Development

No branches or pull requests

1 participant