VOOZH about

URL: https://thenewstack.io/applying-kubernetes-security-best-practices-to-helm-charts/

⇱ Applying Kubernetes Security Best Practices to Helm Charts - The New Stack


TNS
SUBSCRIBE
Join our community of software engineering leaders and aspirational developers. Always stay in-the-know by getting the most important news and exclusive content delivered fresh to your inbox to learn more about at-scale software development.
REQUIRED
It seems that you've previously unsubscribed from our newsletter in the past. Click the button below to open the re-subscribe form in a new tab. When you're done, simply close that tab and continue with this form to complete your subscription.
The New Stack does not sell your information or share it with unaffiliated third parties. By continuing, you agree to our Terms of Use and Privacy Policy.
Welcome and thank you for joining The New Stack community!
Please answer a few simple questions to help us deliver the news and resources you are interested in.
REQUIRED
REQUIRED
REQUIRED
REQUIRED
REQUIRED
Great to meet you!
Tell us a bit about your job so we can cover the topics you find most relevant.
REQUIRED
REQUIRED
REQUIRED
REQUIRED
REQUIRED
Welcome!

We’re so glad you’re here. You can expect all the best TNS content to arrive Monday through Friday to keep you on top of the news and at the top of your game.

What’s next?

Check your inbox for a confirmation email where you can adjust your preferences and even join additional groups.

Follow TNS on your favorite social media networks.

Become a TNS follower on LinkedIn.

Check out the latest featured and trending stories while you wait for your first TNS newsletter.

PREV
1 of 2
NEXT
VOXPOP
As a JavaScript developer, what non-React tools do you use most often?
Angular
0%
Astro
0%
Svelte
0%
Vue.js
0%
Other
0%
I only use React
0%
I don't use JavaScript
0%
Thanks for your opinion! Subscribe below to get the final results, published exclusively in our TNS Update newsletter:
NEW! Try Stackie AI
From clobbered drafts to real-time sync
Apr 14th 2026 10:00am, by David Moore
TypeScript 6.0 RC arrives as a bridge to a faster future
Mar 14th 2026 9:00am, by Darryl K. Taft
Mastra empowers web devs to build AI agents in TypeScript
Jan 28th 2026 11:00am, by Loraine Lawson
2021-05-24 09:00:54
Applying Kubernetes Security Best Practices to Helm Charts
contributed,sponsor-bridgecrew,sponsored,sponsored-post-contributed,
Kubernetes / Security

Applying Kubernetes Security Best Practices to Helm Charts

Most Helm charts are not secure by default. It's vital for developers to secure Helm charts before deploying them into their production environments.
May 24th, 2021 9:00am by Taylor Smith
👁 Featued image for: Applying Kubernetes Security Best Practices to Helm Charts
Lead image via Pixabay.
Bridgecrew sponsored this post.
Taylor Smith
Taylor is a senior product marketing manager at Bridgecrew by Prisma Cloud, covering full lifecycle cloud native infrastructure and application security from build time to runtime. Previously, he held product marketing and strategy positions at Gremlin, Cisco and NetApp.
Helm charts are an easy way to package, version and deploy applications on Kubernetes. They can be used to deploy application services or even Kubernetes components and tools. They make scaling deployments internally and externally easier, as Kubernetes manifests and commands are bundled together with pre-vetted default values. As a user of a Helm, open source packages, known as charts, are readily at your disposal in repositories such as Artifact Hub. Launched in 2019, Artifact Hub has thousands of charts to quickly deploy pre-configured services such as databases into your cluster. However, our recent research found that over 70% of Helm charts in Artifact Hub contained misconfigurations, such as not setting resource limits and running root containers, that violated CIS Kubernetes Benchmarks. Even the most popular dependency chart, PostgreSQL, contained multiple misconfigurations such as forgetting to add allowPrivilegeEscalation = false, which if left out defaults to true. Part of the problem is that securing Helm charts is not as straightforward as securing a Kubernetes manifest.

What Are Helm Charts?

We should start with an exploration at a high level into how Helm charts work. Without Helm charts, you would write multiple Kubernetes manifests (YAML files) to take an application such as a container image, deploy it to your cluster and manage the additional settings of that image and how Kubernetes manages the container. For example: If you want an ingress gateway, you may need to deploy the NGINX proxy with a certain number of replicas, set it as the ingress gateway and configure applications to interface with it. That alone could be three different manifests with default values across all three. Instead, Helm bundles those manifests together, including dependencies like monitoring tools, and includes a central location for default but configurable values (values.yaml). If you come from the Terraform world, think of this as your vars.tf file. Prior to deploying, helm install will construct the Kubernetes manifests and deploy them for you, just like kubectl apply.

How Does Kubernetes Security Apply?

You may have already picked up on it, but by the time Kubernetes sees the Helm chart, it looks like just another manifest. That’s why most (we’ll talk about the exceptions later) of the misconfigurations for Kubernetes manifests are still relevant for Helm charts. Helm can still be set up to deploy a container as root or with PID 1. However, it’s not as straightforward as scanning Kubernetes manifests. For example, the CIS Kubernetes Benchmarks 5.2.6 says to “minimize the admission of containers with added capabilities.” Even if there is a YAML line for allowedCapabilities, it may look like:
allowedCapabilities: {{- toYaml .Values.speaker.securityContext.capabilities.add | nindent 2 }}.
We’d have to dig into the values.yaml to find the right line:
speaker:
	securityContext:
		capabilities:
			add:
 - NET_ADMIN
 - NET_RAW

Then we’d discover that the Helm chart is granting additional capabilities to perform networking tasks it maybe shouldn’t be. The open source tool Checkov addresses this by identifying Helm charts and first converting them into Kubernetes manifests using the helm template command. The resulting manifests can be checked for misconfigurations, like any other Kubernetes YAML files. There are exceptions. For example, the way Helm deploys pods to namespaces makes it irrelevant to check for deploying to the default namespace, which is a violation of CIS Kubernetes Benchmark 5.7.4. Also, after Helm v3, there is a Kubernetes policy to not include Tiller in any Kubernetes manifests, as it was overprivileged. However, Tiller is unlikely to show up in a Helm chart, so it is not a necessary check for Helm charts.
Bridgecrew is the codified cloud security platform for developers. By equipping teams with security-as-code and DevSecOps workflows, Bridgecrew automates infrastructure security throughout the development lifecycle.
Learn More
The latest from Bridgecrew

How to Enforce Helm Security in an Automated Way

Helm has simplified the way we deploy and manage services in Kubernetes. It presents a way to scale deployments by packaging dependencies and best-practice-based default settings. This can also scale securing those services by ensuring the defaults do not contain misconfigurations. However, today most charts are not secure by default. This makes it important for developers to take the responsibility to secure Helm charts before deploying them into their production environments. The best solution is to check for misconfigurations in your charts early and often. Start by checking the Helm charts you download for misconfigurations. Fix the issues that don’t meet your requirements and over time address the remaining misconfigurations. Helm simplifies this process with versioning and rollbacks if security patches break the deployment. Keeping all the misconfiguration fixes in Helm charts enforces their scalability, so the next team that deploys the service for their use case will have secure defaults. The result is a lower attack surface for your Kubernetes applications. To make our research dynamic and repeatable, we built and open-sourced a lightweight Helm Scanner that you can leverage to scan your own Helm charts.
Bridgecrew is the codified cloud security platform for developers. By equipping teams with security-as-code and DevSecOps workflows, Bridgecrew automates infrastructure security throughout the development lifecycle.
Learn More
The latest from Bridgecrew
TRENDING STORIES
Taylor is a senior product marketing manager at Bridgecrew by Prisma Cloud, covering full lifecycle cloud native infrastructure and application security from build time to runtime. Previously, he held product marketing and strategy positions at Gremlin, Cisco and NetApp.
Read more from Taylor Smith
Bridgecrew sponsored this post.
SHARE THIS STORY
TRENDING STORIES
TNS owner Insight Partners is an investor in: Pragma.
SHARE THIS STORY
TRENDING STORIES
TNS DAILY NEWSLETTER Receive a free roundup of the most recent TNS articles in your inbox each day.
The New Stack does not sell your information or share it with unaffiliated third parties. By continuing, you agree to our Terms of Use and Privacy Policy.