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

Nginx Ingress annotation snippet related checks are not checking the correct configuration #6761

Open
tepentti opened this issue Oct 10, 2024 · 0 comments
Labels
checks Check additions or changes

Comments

@tepentti
Copy link

tepentti commented Oct 10, 2024

There are 3 checks that are related to Nginx Ingress annotation snippets:

  • checkov/kubernetes/checks/resource/k8s/NginxIngressCVE202125742Alias.py
  • checkov/kubernetes/checks/resource/k8s/NginxIngressCVE202125742AllSnippets.py
  • checkov/kubernetes/checks/resource/k8s/NginxIngressCVE202125742Lua.py

However all of these only check if some annotation snippets are in place, not if the feature is actually disabled. It can be disabled with configuration allow-snippet-annotations which defaults to false:

https://kubernetes.github.io/ingress-nginx/user-guide/nginx-configuration/configmap/#allow-snippet-annotations

I suggest that those three checks are consolidated into one which fails if in the ConfigMap for Nginx Ingress that configuration is set to true.

@tepentti tepentti added the checks Check additions or changes label Oct 10, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
checks Check additions or changes
Projects
None yet
Development

No branches or pull requests

1 participant