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

Getting error while running scan on our terraform repo #607

Closed
sachinar opened this issue Mar 10, 2021 · 4 comments
Closed

Getting error while running scan on our terraform repo #607

sachinar opened this issue Mar 10, 2021 · 4 comments

Comments

@sachinar
Copy link
Contributor

  • terrascan version: 1.4.0
  • Operating System: docker image

Description

Getting error while running scan on our terraform repo

What I Did

command used to sacn repo
terrascan scan --use-colors t .

Running the scan
$ /go/bin/terrascan scan --use-colors t .
2021-03-09T12:05:20.614Z	error	opa/engine.go:84	failed to load rego file{file 15 0 /home/terrascan/.terrascan/pkg/policies/opa/rego/aws/aws_kms_key/kmsKeyNoDisabled.rego <nil>} {error 26 0  open /home/terrascan/.terrascan/pkg/policies/opa/rego/aws/aws_kms_key/kmsKeyNoDisabled.rego: no such file or directory}
@kanchwala-yusuf
Copy link
Contributor

Hi @sachinar,

Thanks for reporting this issue.

Can you please try running terrascan init once and try running terrascan scan again?

Also, if terrascan scan fails, can you please enable debug logs with -l debug option and upload the logs here for analysis.

@sachinar
Copy link
Contributor Author

Hi @kanchwala-yusuf,

getting this now,

sachin@Sachins-MacBook-Pro % terrascan init
sachin@Sachins-MacBook-Pro  % terrascan scan --use-colors t .
2021-03-10T12:57:27.345+0530	warn	opa/engine.go:347	failed to run prepared query{error 26 0  noOwnerLabel:5: eval_type_error: object.get: operand 1 must be object but got array} {rule 15 0 'AC-K8-OE-NS-L-0128' <nil>} {file 15 0 noOwnerLabel.rego <nil>}

@kanchwala-yusuf
Copy link
Contributor

@sachinar , I hope you were able to get scan results!

@sachinar
Copy link
Contributor Author

@kanchwala-yusuf getting results with above mentioned warning.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants