terrascan: cli/run.go:110 scan run failed{error 26 0 failed to initialize OPA policy engine}
Hi Team,
Terrascan is failing while doing scan.
We are using docker image to run terrascan accurics/terrascan:1.5.0
Command we are using to run
terrascan init
terrascan scan --use-colors t .
Error we are facing.
2022-03-03T05:[40](h):57.980Z error opa/engine.go:219 error compiling rego files{rule 15 0 authUsersReadAccess <nil>} {raw rego 15 0 package accurics
authUsersReadAccess[retVal] {
bucket := input.aws_s3_bucket[_]
bucket.config.acl == "authenticated-read"
traverse = "acl"
retVal := { "Id": bucket.id, "ReplaceType": "edit", "CodeType": "attribute", "Traverse": traverse, "Attribute": "acl", "AttributeDataType": "string", "Expected": "private", "Actual": bucket.config.acl }
}
authUsersReadAccess<no value>[retVal] {
bucket := input.aws_s3_bucket_acl[_]
bucket.config.acl == "authenticated-read"
traverse = "acl"
retVal := { "Id": bucket.id, "ReplaceType": "edit", "CodeType": "attribute", "Traverse": traverse, "Attribute": "acl", "AttributeDataType": "string", "Expected": "private", "Actual": bucket.config.acl }
} <nil>} {error 26 0 1 error occurred: authUsersReadAccess:11: rego_parse_error: unexpected assign token: non-terminated set
bucket := input.aws_s3_bucket_acl[_]
^}
2022-03-03T05:40:57.982Z error opa/engine.go:261 error compiling rego files{policy path 15 0 /home/terrascan/.terrascan/pkg/policies/opa/rego/aws <nil>} {error 26 0 1 error occurred: authUsersReadAccess:11: rego_parse_error: unexpected assign token: non-terminated set
bucket := input.aws_s3_bucket_acl[_]
^}
2022-03-03T05:40:57.983Z error runtime/executor.go:124 failed to initialize OPA policy engine
2022-03-03T05:40:57.984Z error cli/run.go:110 scan run failed{error 26 0 failed to initialize OPA policy engine}
About this issue
- Original URL
- State: closed
- Created 2 years ago
- Reactions: 4
- Comments: 16 (9 by maintainers)
@pflueg the fix has been pushed. Sorry for the inconvenience. I would suggest everyone to try now, and if any issue persists please let us know.