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

bug(helm): rendering errors on valid charts #7161

Open
jghal opened this issue Jun 26, 2024 · 1 comment
Open

bug(helm): rendering errors on valid charts #7161

jghal opened this issue Jun 26, 2024 · 1 comment
Labels
bug Something isn't working community Community contribution docker Docker query kubernetes Kubernetes query

Comments

@jghal
Copy link

jghal commented Jun 26, 2024

I posted this first in discussions but received no response.

I have a helm chart based off of https://github.com/runatlantis/helm-charts and when I try to scan with Kics (both 1.7.x in GitLab CI's IaC scan docker image and 2.1.0 in the official checkmarx/kics docker image) I get a bunch of parsing errors. To give you something reproducible, One of the files that is failing to be parsed looks like this

{{- if .Values.repoConfig -}}
apiVersion: v1
kind: ConfigMap
metadata:
  name: {{ template "atlantis.fullname" . }}-repo-config
  labels:
    app: {{ template "atlantis.name" . }}
    chart: {{ template "atlantis.chart" . }}
    release: {{ .Release.Name }}
    heritage: {{ .Release.Service }}
data:
  repos.yaml: |
{{ .Values.repoConfig | indent 4 }}
{{- end -}}

It's a valid, deployable chart template using the published best practice.

Expected Behavior

the chart is rendered and scanned without error.

Actual Behavior

4:01PM ERR failed to parse file content: /work/templates/configmap-config.yaml error="failed to parse yaml: invalid yaml"

Steps to Reproduce the Problem

(Command line arguments and flags used)

  1. clone https://github.com/runatlantis/helm-charts
  2. cd into charts/atlantis
  3. run docker run --rm -it -u $(id -u):$(id -u) -v $(pwd):/work -w /work checkmarx/kics scan --ci -t Kubernetes -p /work/

Specifications

(N/A if not applicable)

  • Version: 1.7.13, 2.1.0
  • Platform: linux
  • Subsystem: kubernetes
@jghal jghal added bug Something isn't working community Community contribution labels Jun 26, 2024
@github-actions github-actions bot added docker Docker query kubernetes Kubernetes query labels Jun 26, 2024
@toninin
Copy link

toninin commented Aug 7, 2024

Just stumbled over the same issue when trying out kics. Any plan to get this fixed?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working community Community contribution docker Docker query kubernetes Kubernetes query
Projects
None yet
Development

No branches or pull requests

2 participants