-
Notifications
You must be signed in to change notification settings - Fork 2.3k
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: Support passing value overrides for configuration checks #2679
Conversation
pkg/flag/misconf_flags.go
Outdated
@@ -53,6 +53,36 @@ var ( | |||
Value: []string{}, | |||
Usage: "Rego namespaces", | |||
} | |||
HelmValuesFileFlag = Flag{ | |||
Name: "helm-values", | |||
ConfigName: "misconfiguration.helm-values", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Currently, the config format is like the following.
misconfiguration:
helm-values:
- values-prod.yaml
helm-set:
- key1=val1
- key2=val2
tf-vars:
- foo.tfvars
- bar.tfvars
Do you think grouping languages is too nested as below? I'm not sure which is better. I just would like to hear your thought.
misconfiguration:
helm:
values:
- values-prod.yaml
set:
- key1=val1
- key2=val2
terraform:
vars:
- foo.tfvars
- bar.tfvars
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Helm uses --set
but I changed it to --helm-set
to avoid collisions in the future with other configs that might be in the same files system that also wanted a --set
I like personally like how explicit the second config block is and I don't think it's too nested. @liamg - do you have an opinion?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So I assume I would just change the ConfigName
to misconfiguration.helm.values
to achieve the second config block?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So I assume I would just change the ConfigName to misconfiguration.helm.values to achieve the second config block?
Yes. misconfiguration.helm.values
should work.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Changed to misconfiguration.helm.xxxx
and misconfiguration.terraform.xxx
912c29e
to
014159f
Compare
Could you also update this page? |
Resolves #2276 Signed-off-by: Owen Rumney <owen.rumney@aquasec.com>
be more explict in the configuration block to separate the languages Signed-off-by: Owen Rumney <owen.rumney@aquasec.com>
Signed-off-by: Owen Rumney <owen.rumney@aquasec.com>
b0f91b6
to
13e4d66
Compare
Updated this with the possible config settings |
Cool. Thanks. |
Description
Add support for passing variable files for configuration scanning
Terraform
Pass
--tf-vars
to override default terraform valuesHelm
Support standard helm install flags (with the
helm
prefix)--helm-set
--helm-values
--helm-set-string
--helm-set-file
Related issues
Remove this section if you don't have related PRs.
Checklist