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

for configmap kubesec is not working #339

Closed
jainpratik163 opened this issue Sep 7, 2022 · 5 comments
Closed

for configmap kubesec is not working #339

jainpratik163 opened this issue Sep 7, 2022 · 5 comments
Labels

Comments

@jainpratik163
Copy link

Describe the bug
i am running kubesec for helm chart and in that chart we have configmap and for this kubesec is not working
and getting below message

{
"object": "ConfigMap/rt-generic-element-couchbase-configmap.default",
"valid": true,
"fileName": "STDIN",
"message": "This resource kind is not supported by kubesec",
"score": 0,
"scoring": {}
},

Expected behaviour
kubesec should work

@06kellyjac
Copy link
Member

#287

@jainpratik163
Copy link
Author

does configmap is supportable or not?

@06kellyjac
Copy link
Member

kubesec does not review configmaps for security since there isn't really anything to do there, you can just filter it out of the results or not feed it to kubesec in the first place

@jainpratik163
Copy link
Author

our helm chart contains all so is there any way we can provide filters in this command helm template <helmchartname>.tgz | kubesec scan -

@06kellyjac
Copy link
Member

easiest would be to filter the output of kubesec with jq or process with opa/conftest

but if you want to do the filter ahead you can do:

helm template XYZ | yq 'select(.kind == "Deployment" or .kind == "DaemonSet" or .kind == "Pod")' -y | kubesec scan -

change the kind's as you'd like

that filters relevant resources using yq (-y converts it back to yaml)

https://kislyuk.github.io/yq/

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants