Sonar IAC still failing on on 9.9

hi
we are hitting the same issue that was reported last year by some on SONARIAC and described in [SONARIAC-435] - Jira .

(i.e. Scan fails on IaC kubernetes sensor)

We are running the latest LTS version (9.9).

error snipset:

INFO: Sensor IaC CloudFormation Sensor [iac] (done) | time=35ms
INFO: Sensor IaC Kubernetes Sensor [iac]
INFO: 4 source files to be analyzed
ERROR: Unable to parse file: file:///usr/src/charts/XXXX-backend/templates/ingress.yaml. Parse error at position 1:0
ERROR: Cannot parse 'charts/XXXX-backend/templates/ingress.yaml': while parsing a flow node
 in reader, line 1, column 3:
    {{- if .Values.ingress.enabled -}}
      ^
expected the node content, but found '-'
 in reader, line 1, column 3:
    {{- if .Values.ingress.enabled -}}
      ^

ERROR: Unable to parse file: file:///usr/src/charts/XXXXX-backend/templates/deployment.yaml. Parse error at position 80:0
ERROR: Cannot parse 'charts/XXXXX-backend/templates/deployment.yaml': while parsing a flow node
 in reader, line 80, column 15:
                {{- toYaml .Values.resources | nin ...
                  ^
expected the node content, but found '-'
 in reader, line 80, column 15:
                {{- toYaml .Values.resources | nin ...
                  ^

INFO: 4/4 source files have been analyzed
INFO: Sensor IaC Kubernetes Sensor [iac] (done) | time=70ms
INFO: Sensor Ansible Lint Sensor [ansible]

Hi,

Welcome to the community and thanks for this report!

Could you provide the files in question? Or at least enough of a subset of each to reproduce the error?

 
Thx,
Ann

sorry for the delay.
Find attached a (zipped)
XXXX-ingress.zip (522 Bytes)
copy of the file in question.

Hi,

Thanks for the file. I’ve flagged this for the team.

 
Ann

Hi @sbarbereau

The issue is now fixed on the master branch in Sonar IaC Sensor and it will available in the next SonarQube release. Thanks for reporting.

Marcin Stachniuk

1 Like