Skip to content

Commit

Permalink
Merge pull request #424 from HorizonNet/issue-422
Browse files Browse the repository at this point in the history
Update policy example in the documentation
  • Loading branch information
cesar-rodriguez committed Dec 11, 2020
2 parents 51d6b44 + 2df50b4 commit f96af13
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions docs/policies.md
Expand Up @@ -62,14 +62,16 @@ $ terrascan scan -i terraform --config-only -o json
}
```


You can use this `.json` output as the input in the [rego playgound](https://play.openpolicyagent.org/). The following policy can be used on the above Terraform to flag if the GitHub repository has been created with `private = false`.

```
package accurics
privateRepoEnabled[api.id] {
api := input.github_repository[_]
not api.config.private == true
api := input.github_repository[_]
not api.config.private == true
not api.config.visibility == "private"
}
```

Expand Down

0 comments on commit f96af13

Please sign in to comment.