Skip to content
This repository has been archived by the owner on Jun 6, 2024. It is now read-only.

Commit

Permalink
add mixed example
Browse files Browse the repository at this point in the history
  • Loading branch information
Cole Kennedy committed Mar 28, 2023
1 parent 5671ef0 commit 724d123
Showing 1 changed file with 21 additions and 0 deletions.
21 changes: 21 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -118,6 +118,27 @@ Each line in the command corresponds to a separate flag or parameter for the cre

The final policy file generated by this command would contain two steps, with the specified intermediate certificate, attestations, and associated Rego policy files for each step.

### Adding custom Rego modules and Cert Constraints

```
policy-tool create -x $SAST_ATTESTATION_ID \
-a "https://witness.dev/attestations/material/v0.1" \
-g test.rego \
-y sticky.yaml \
-r $CERT \
--constraint-emails=cole@testifysec.com \
-x $TEST_ATTESTATION_ID \
-r $CERT \
-y sticky.yaml \
-x $BUILD_ATTESTATION_ID \
-r $CERT \
-y sticky.yaml \
-t $TSA_CERT > policy.json
```


This example demonstrates how to create a policy using attestations, custom Rego modules, and certificate constraints. The Rego modules are defined in the `sticky.yaml` file and the `test.rego` file. Note that you must specify which attestation the Rego module belongs to by using the `-a` flag preceding the module. Certificate constraints should be placed after the root CA flag `-r`.

## Create Command

`create` - Creates a policy file.
Expand Down

0 comments on commit 724d123

Please sign in to comment.