Share rules with your team
-
Add a policy to the repository
Create
.moat/policy.yamlat the root of the repository and commit it:version: 1deny:- id: no-prod-configreason: production settings stay with the release pipelinefs.write: ["${project}/deploy/prod/**"]ask:- id: migrationsreason: database migrations change shared datashell: ["npm run migrate*"] -
Everyone gets the deny and ask rules at once
They apply to everyone who works in the repository, whatever agent they use, and show up as
repo:<id>, such asrepo:no-prod-config. -
Each person trusts the allow rules
A repository is untrusted input, so by itself it can only make your policy stricter. Its
allowrules apply after you review and trust that exact file:Terminal window moat trust # in the repository; prints the allow rules it lets inmoat trust --revoke