|
1 | | -# policy-hub-cli |
2 | | -CLI for searching Rego policies |
| 1 | +# PolicyHub CLI |
| 2 | + |
| 3 | +This is the home of the PolicyHub CLI, a CLI tool that makes Rego policies searchable. |
| 4 | + |
| 5 | +## Goals |
| 6 | + |
| 7 | +Policies are everywhere. Compliance policies, security policies, policies that define organisational best practices. The Open Policy Agent project provided a single policy language, Rego, that can be used to automate policy enforcement. However currently there is no existing mechanism that allows you to search for specific Rego policies. |
| 8 | + |
| 9 | +For example you might be looking for a set of policies that validate Kubernetes security best practices as a starting point for your organisations Kubernetes policies. Or you might be looking for a set of Microservice Authorization policies. Right now you have to hope that your google search points you in the right direction. |
| 10 | + |
| 11 | +The PolicyHub CLI aims to make policies searchable. We provide a standard format for policy creators to share their policies. Users of the CLI can search our registry for specific tags or descriptions, hopefully finding the policy they where looking for. |
| 12 | + |
| 13 | +## Searching policies |
| 14 | + |
| 15 | +To search our registry, you can use the `search` command: |
| 16 | + |
| 17 | +```bash |
| 18 | +> policy-hub search |
| 19 | + |
| 20 | ++---------------------------+---------------------------------+--------------------------------+ |
| 21 | +| NAME | MAINTAINERS | LABELS | |
| 22 | ++---------------------------+---------------------------------+--------------------------------+ |
| 23 | +| deprek8ion | https://github.com/swade1987 | k8s, kubernetes, gatekeeper | |
| 24 | +| contrib.k8s_node_selector | https://github.com/tsandall | kubernetes, k8s, node_selector | |
| 25 | +| redhat-cop.rego-policies | https://github.com/garethahealy | k8s, kubernetes, gatekeeper | |
| 26 | +| konstraint | https://github.com/garethahealy | k8s, kubernetes, gatekeeper | |
| 27 | ++---------------------------+---------------------------------+--------------------------------+ |
| 28 | +``` |
| 29 | + |
| 30 | +## Downloading policies |
| 31 | + |
| 32 | +To download a policy, use the `pull` command: |
| 33 | + |
| 34 | +```bash |
| 35 | +> policy-hub pull konstraint |
| 36 | +``` |
| 37 | + |
| 38 | +## Contributing |
| 39 | + |
| 40 | +Join us make policies more searchable! |
| 41 | + |
| 42 | +- We accept contributions to our registry. |
| 43 | +- Use [GitHub Issues](https://github.com/policy-hub/policy-hub-cli/issues) to file bugs or propose new features. |
| 44 | +- Create a [Pull Request](https://github.com/policy-hub/policy-hub-cli/pulls) and contribute to the project. |
0 commit comments