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

Terrascan is failing in scan #887

Closed
sachinar opened this issue Jun 24, 2021 · 7 comments
Closed

Terrascan is failing in scan #887

sachinar opened this issue Jun 24, 2021 · 7 comments
Assignees

Comments

@sachinar
Copy link
Contributor

  • terrascan version:1.5.0
  • Operating System: docker image

$ /go/bin/terrascan init
$ /go/bin/terrascan scan --use-colors t .

Got this error while runnning : -

2021-06-24T05:58:45.331Z	error	opa/engine.go:219	error compiling rego files{rule 15 0 checkDiskEncryption <nil>} {raw rego 15 0 package accurics
reme_checkDiskEncryption<no value>[managed_disk.id] {
    managed_disk := input.azurerm_managed_disk[_]
    encryption_settings = managed_disk.config.encryption_settings[_]
    encryption_settings.enabled == false
}
reme_checkDiskEncryption<no value>[managed_disk.id] {
    managed_disk := input.azurerm_managed_disk[_]
    managed_disk.config.encryption_settings == []
} <nil>} {error 26 0  1 error occurred: checkDiskEncryption:4: rego_parse_error: unexpected assign token: non-terminated set
	    managed_disk := input.azurerm_managed_disk[_]
	                 ^}
2021-06-24T05:58:45.334Z	error	opa/engine.go:261	error compiling rego files{policy path 15 0 /home/terrascan/.terrascan/pkg/policies/opa/rego/azure <nil>} {error 26 0  1 error occurred: checkDiskEncryption:4: rego_parse_error: unexpected assign token: non-terminated set
	    managed_disk := input.azurerm_managed_disk[_]
	                 ^}
2021-06-24T05:58:45.334Z	error	runtime/executor.go:124	failed to initialize OPA policy engine
2021-06-24T05:58:45.334Z	error	cli/run.go:110	scan run failed{error 26 0  failed to initialize OPA policy engine}
@sachinar
Copy link
Contributor Author

@kanchwala-yusuf Can you please suggest what we can do here?

@kanchwala-yusuf
Copy link
Contributor

Hey @sachinar ,
Can you please try running terrascan init and check?

@sachinar
Copy link
Contributor Author

Hi @kanchwala-yusuf ,

I did already. Shared the same in 1st comment as well.

@kanchwala-yusuf
Copy link
Contributor

Hey @sachinar ,

We are investigating this issue. Will reply back in some time. Sorry!

@kanchwala-yusuf
Copy link
Contributor

Hey @sachinar ,
We just tried to fix this issue in #888 .

Can you please retry terrascan init and see if this fixes the problem for you?

@sachinar
Copy link
Contributor Author

@kanchwala-yusuf Thanks for quick response. This issue has been resolved now.

Efforts much appreciated!!!

@kanchwala-yusuf
Copy link
Contributor

Closing, since the issue has been fixed!

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

4 participants