Checkmarx / kics

Find security vulnerabilities, compliance issues, and infrastructure misconfigurations early in the development cycle of your infrastructure-as-code with KICS by Checkmarx.
https://kics.io
Apache License 2.0
1.97k stars 294 forks source link

query<Kubernetes>: kics-scan ignore-block not working for YAML files #7054

Open apurvakg opened 1 month ago

apurvakg commented 1 month ago

Platform

Kubernetes YAML files

Description

I have a Kubernetes deployment file(YAML), where the YAMl is a bit comples, I am getting error for one line in YAML, and I want to ignore the line. I have tried both #kics-scan ignore-line and #kics-scan ignore-block and its not working. I am not sure its because of indendation or something else. Can u help me with this. Pasting the code snipped for reference.

apiVersion: apps/v1
kind: Deployment
metadata:
  name: "some-name"
spec:
  replicas: 1
  template: 
  metadata: 
    labels: "some label"
  spec:
    volumes:
        {{- toYaml .Values.volumes | nindent 8 }}
        - name: {{ include "name" . }}-config
          configMap:
            # kics-scan ignore-line
            name: {{ include "name" . }}-config  #line causing the issue
kicsbot commented 1 month ago

Please, follow the guideline for an issue title:

For bug:

bug(<scope>): <title starting with lowercase letter>

For query:

query(<platform>): <title starting with lowercase letter>

For feature request:

feat(<scope>): <title starting with lowercase letter>

Thank you! KICS Team