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

AC_K8S_0131 triggers on a Namespace resource #957

Closed
danmx opened this issue Aug 4, 2021 · 0 comments
Closed

AC_K8S_0131 triggers on a Namespace resource #957

danmx opened this issue Aug 4, 2021 · 0 comments

Comments

@danmx
Copy link
Contributor

danmx commented Aug 4, 2021

  • terrascan version:
  • Operating System:

Description

I'm using latest Terrascan Github Action and it triggers AC_K8S_0131 on kubernetes_namespace even though I have namespace: whatever set in in my kustomization.yaml and a Namespace resource is not a namespaced one.

 	Description    :	Ensure default name space is not in use in Kubernetes Namespace
	File           :	kustomization.yaml
	Line           :	1
	Severity       :	LOW
	Rule Name      :	defaultNamespaceUsed
	Rule ID        :	AC_K8S_0131
	Resource Name  :	valheim
	Resource Type  :	kubernetes_namespace
	Category       :	Security Best Practices

The issue seems to be here: https://github.com/accurics/terrascan/blob/2fdc14d96fa82cb114ab30c4d1a0c6294f6b77ad/pkg/policies/opa/rego/k8s/kubernetes_namespace/defaultNamespaceUsed.rego#L8

What I Did

https://github.com/danmx/valheim-server-k8s/runs/3245324018?check_suite_focus=true

harkirat22 pushed a commit that referenced this issue Aug 10, 2021
Removing AC_K8S_0131 which is triggered for Kubernetes Namespaces.
It should address #957.

Signed-off-by: danmx <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants