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

Update policy example in the documentation #424

Merged
merged 2 commits into from
Dec 11, 2020
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions docs/policies.md
Original file line number Diff line number Diff line change
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