- Attach a log file with relevant data preferably in DEBUG level - kics-debug.log
- Attach the scanned sample files, anonymize the data if the original file cannot be provided - Config.1.zip
Expected Behavior
When I add the descriptionID it should no longer give me an error
Actual Behavior
It gives this error
7:26PM ERR Saving result. failed to detect descriptionID error="key 'descriptionID' not found in map" fileName=/builds/gitlab/tmng-examination/exam-devops/kics-scanning-pipeline-module/custom-queries/Config.1/terraform-under-test/fail_example.tf queryName=Config.1 scanID=console
7:26PM ERR Saving result. failed to detect descriptionID error="key 'descriptionID' not found in map" fileName=/builds/gitlab/tmng-examination/exam-devops/kics-scanning-pipeline-module/custom-queries/Config.1/terraform-under-test/fail_example.tf queryName=Config.1 scanID=console
7:26PM ERR Saving result. failed to detect descriptionID error="key 'descriptionID' not found in map" fileName=/builds/gitlab/tmng-examination/exam-devops/kics-scanning-pipeline-module/custom-queries/Config.1/terraform-under-test/fail_example.tf queryName=Config.1 scanID=console
7:27PM ERR Unable to unmarshal response body error="invalid character '<' looking for beginning of value"
7:27PM WRN Unable to get descriptions: invalid character '<' looking for beginning of value
7:27PM WRN Using default descriptions
Steps to Reproduce the Problem
(Command line arguments and flags used)
- use image
checkmarx/kics:v2.1.20@sha256:3e5a268eb8adda2e5a483c9359ddfc4cd520ab856a7076dc0b1d8784a37e2602
- add custom queries (see uploaded
Config.1 as an example)
- run:
/app/bin/kics scan \
--path "<PATH TO UPLOADED EXAMPLE>\terraform-under-test" \
--queries-path <PATH TO UPLOADED EXAMPLE> \
--output-path "./kicsReports" \
--report-formats "glsast,html,json" \
--fail-on "critical,high,medium" \
--ci
Specifications
- Version: 2.1.20@sha256:3e5a268eb8adda2e5a483c9359ddfc4cd520ab856a7076dc0b1d8784a37e2602
- Platform: gitlab
- Subsystem: NA
This seems related to #4824
It is printing the queryName and descriptionUrl correctly so I know it is reading the metadata.json, but I don't understand why it won't print the descriptionText and why I am getting errors about descriptionID.
Here is the full output
7:26PM INF Scanning with Keeping Infrastructure as Code Secure v2.1.20
7:26PM INF Operating system: linux
7:26PM INF Total memory: 15.3G
7:26PM INF CPU: 8.0
7:26PM INF Max file size permitted for scanning: 5 MB
7:26PM INF Max resolver depth permitted for resolving files: 15
7:26PM INF Total files in the project: 2
7:26PM INF Loading queries of type: terraform
7:26PM INF Inspector initialized, number of queries=259
7:26PM INF Query execution timeout=1m0s
7:26PM ERR Saving result. failed to detect descriptionID error="key 'descriptionID' not found in map" fileName=/builds/gitlab/tmng-examination/exam-devops/kics-scanning-pipeline-module/custom-queries/Config.1/terraform-under-test/fail_example.tf queryName=Config.1 scanID=console
7:26PM ERR Saving result. failed to detect descriptionID error="key 'descriptionID' not found in map" fileName=/builds/gitlab/tmng-examination/exam-devops/kics-scanning-pipeline-module/custom-queries/Config.1/terraform-under-test/fail_example.tf queryName=Config.1 scanID=console
7:26PM ERR Saving result. failed to detect descriptionID error="key 'descriptionID' not found in map" fileName=/builds/gitlab/tmng-examination/exam-devops/kics-scanning-pipeline-module/custom-queries/Config.1/terraform-under-test/fail_example.tf queryName=Config.1 scanID=console
7:27PM ERR Unable to unmarshal response body error="invalid character '<' looking for beginning of value"
7:27PM WRN Unable to get descriptions: invalid character '<' looking for beginning of value
7:27PM WRN Using default descriptions
7:27PM INF --- Parsing Summary ---
7:27PM INF Scanned Files: 2
7:27PM INF Parsed Files: 2
7:27PM INF Scanned Lines: 43
7:27PM INF Parsed Lines: 39
7:27PM INF Ignored Lines: 4
7:27PM INF Queries loaded: 259
7:27PM INF Queries failed to execute: 0
7:27PM INF --- Results Summary ---
7:27PM INF CRITICAL: 0
7:27PM INF HIGH: 3
7:27PM INF MEDIUM: 0
7:27PM INF LOW: 0
7:27PM INF INFO: 0
7:27PM INF TOTAL: 3
7:27PM INF --- Queries Summary ---
Platform Query Name Severity CWE Results
Terraform AWS Config Not Enabled with Service-Linked Role HIGH 3
7:27PM INF Inspector stopped
7:27PM INF Results saved to file kicsReports/gl-sast-results.json fileName=gl-sast-results.json
7:27PM INF Results saved to file kicsReports/results.html fileName=results.html
7:27PM INF Results saved to file kicsReports/results.json fileName=results.json
7:27PM INF Scan duration: 7047ms
Expected Behavior
When I add the
descriptionIDit should no longer give me an errorActual Behavior
It gives this error
Steps to Reproduce the Problem
(Command line arguments and flags used)
checkmarx/kics:v2.1.20@sha256:3e5a268eb8adda2e5a483c9359ddfc4cd520ab856a7076dc0b1d8784a37e2602Config.1as an example)Specifications
This seems related to #4824
It is printing the
queryNameanddescriptionUrlcorrectly so I know it is reading the metadata.json, but I don't understand why it won't print thedescriptionTextand why I am getting errors aboutdescriptionID.Here is the full output