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

KICS counting malformed files and not reporting error #1930

Closed
felipe-avelar opened this issue Feb 1, 2021 · 1 comment · Fixed by #2754
Closed

KICS counting malformed files and not reporting error #1930

felipe-avelar opened this issue Feb 1, 2021 · 1 comment · Fixed by #2754
Assignees
Labels
bug Something isn't working

Comments

@felipe-avelar
Copy link
Contributor

KICS is not reporting malformed files

Expected Behavior

KICS should detect and report an error for invalid files

Actual Behavior

KICS is not counting and reporting files which failed when parsing and continues scan only ignoring malformed files.

Steps to Reproduce the Problem

  1. Create a malformed file (e.g. bad indentation for YAML files)
  2. Run scan targeting this file

Specifications

  • Version: 1.1.2
  • Platform: Linux
@felipe-avelar felipe-avelar added the bug Something isn't working label Feb 1, 2021
@miguelfreitas93
Copy link
Contributor

@felipe-avelar This happens as well when trying to scan kics repo itself with kics (verbose enabled):

kics        | 2:49PM ERR failed to marshal content in file: /path/.goreleaser.yml error="json: error calling MarshalJSON for type model.Document: json: error calling MarshalJSON for type model.Document: json: unsupported type: map[interface {}]interface {}"
kics        | 2:49PM ERR Filesystem terraform files provider couldn't parse file, file=.goreleaser.yml error="failed to save file content: json: error calling MarshalJSON for type model.Document: json: error calling MarshalJSON for type model.Document: json: unsupported type: map[interface {}]interface {}"

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants