terrascan icon indicating copy to clipboard operation
terrascan copied to clipboard

Error: Process completed with exit code 4.

Open PrateekKhatri opened this issue 3 years ago • 5 comments

  • terrascan version: v1.10.0

Description

I am running terrascan v1.10.0 for terraform aws provider and getting below error: Error: Process completed with exit code 4.

But when I checked with terrascan version v1.9.0 it works fine. There are no errors.

Could you please help me with the above error, how can I fix it?

What I Did

Check with the latest version still getting error "Error: Process completed with exit code 4."

PrateekKhatri avatar Jan 21 '22 08:01 PrateekKhatri

I started getting the same error since v1.9.10. It is not at all clear what exactly is the cause of the error.

alex-feel avatar Feb 07 '22 14:02 alex-feel

We have the same problem! The documentation says that the code 4 means "scan summary has errors but no violations" but we can't see any errors.

santipyx avatar Feb 07 '22 16:02 santipyx

Hi,

Would you mind posting a sample IaC that triggered this exit code for us to replicate the issue?

cesar-rodriguez avatar Feb 07 '22 19:02 cesar-rodriguez

Let me share you a repository with a sample here If you execute terrascan scan -t azure -i terraform in the root folder (where the main.tf and variables.tf files are) the output is `Scan Summary -

File/Folder         :	/home/user/Desktop/terrascan
IaC Type            :	terraform
Scanned At          :	2022-02-09 18:46:12.134450772 +0000 UTC
Policies Validated  :	0
Violated Policies   :	0
Low                 :	0
Medium              :	0
High                :	0

` and the exit code its 4. Terrascan version: v1.13.0 Thank you!

santipyx avatar Feb 09 '22 18:02 santipyx

Probably related to accurics/terrascan/issues/1036 and accurics/terrascan/issues/1088 also

santipyx avatar Feb 10 '22 16:02 santipyx