> For the complete documentation index, see [llms.txt](https://docs.snyk.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.snyk.io/scan-fix-and-prevent/scan-with-snyk/snyk-iac/scan-your-iac-source-code/scan-kubernetes-configuration-files/scan-and-fix-security-issues-in-helm-charts-current-iac.md).

# Scan and fix security issues in Helm Charts

How to scan and fix security issues in Helm charts with Snyk IaC

In addition to scanning Kubernetes configuration files for misconfigurations and security issues, Snyk has support for templating Helm charts and scanning the resultant manifests. This templating functionality is only available when you import repositories using the Snyk UI. See the following sections for prerequisites and guidance on how to scan templated Helm charts using the Snyk CLI. After Helm charts are scanned, Snyk creates Projects for each template and dependency template, generates reports on any misconfigurations, and makes recommendations for fixing them.

## Prerequisites for scanning and fixing issues in Helm Charts

* An administrator must connect your Organization with your preferred Git repository and enable the detection of configuration files as [explained for Terraform files](/scan-fix-and-prevent/scan-with-snyk/snyk-iac/scan-your-iac-source-code/scan-terraform-files/configure-your-integration-to-find-security-issues-in-your-terraform-files-current-iac.md#configure-snyk-to-scan-your-terraform-configuration-files).
* The repository should follow the [standard Chart directory structure](https://helm.sh/docs/topics/charts/#the-chart-file-structure). However the `charts/` sub-directory is not supported.
* Snyk supports only templating Helm charts using the default values file, `values.yaml`.
  * If you want to scan particular configurations of Helm values, the supported workflow is to template the chart outside of Snyk and scan the manifests as regular Kubernetes files.
  * Helm charts that cannot be templated from their default values file are not supported.
* Any chart dependencies must be publicly downloadable from the configured Helm repository. Subcharts or non-publicly downloadable dependencies are not supported. The supported workflow in these cases is to template the chart outside of Snyk and scan the manifests as regular Kubernetes files.

## Scan and fix your Helm Charts

* Log in to your account and navigate to the relevant Group and Organization that you want to manage.
* If you imported your repositories for testing before configuration file detection was enabled by your administrator, you must re-import that repository in order to import the Helm chart:

Every time a repository is scanned, Snyk creates a Project for each template in your Helm Chart, grouped together by repository.

If you re-imported the repository in order to import the configuration files, then Snyk imports and tests the configuration files and also re-tests the already imported application manifest files, displaying the test time as "now".

* Click the Project link you are interested in to view the scan results and to correct your configuration files accordingly.\
  Projects that were created from external dependencies will also be scanned, and issues will be shown.

<figure><img src="https://2730497224-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FBJO0IZx7zB6bOkotxQP2%2Fuploads%2Fgit-blob-69f7bfa3cbafff927c9bece04c95cd668d7d40b6%2Fimage%20(114).png?alt=media" alt="Helm Charts Project detail"><figcaption><p>Helm Charts Project detail</p></figcaption></figure>

## Templating charts and scanning Kubernetes manifests

Sometimes testing a chart using only the default values is not enough, or a dependency is either a subchart or not publicly downloadable. Snyk does not support these scenarios during imports. This section is intended to offer guidance on how to template custom configurations outside of Snyk and scan the resultant Kubernetes manifests.

You can use the Snyk CLI and Helm in conjunction:

```bash
cd /path/to/helm/chart
helm dependency update
helm template . --output-dir out
snyk iac test out/
```

You can pass standard Helm values flags (for example, `--set`, `--value`, or both) to `helm template` in order to test a non-default configuration.

You can script this process and run it in a CLI pipeline or helm-template files into a repository that can be imported into Snyk as Projects.

To share CLI results with the Snyk Web UI, use the `--report` CLI option. For example:

```
snyk iac test out/ --report
```


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.snyk.io/scan-fix-and-prevent/scan-with-snyk/snyk-iac/scan-your-iac-source-code/scan-kubernetes-configuration-files/scan-and-fix-security-issues-in-helm-charts-current-iac.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
