You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Mercari is using policy bot in production across an organization of over 4000 repositories, many of which have legacy workflows that require customized (least privilege) exceptions to our standard configuration. We have 1 policy file that applies to every single repository: repository-specific rules are achieved by making use of the repository predicate.
There are 2 main goals:
We want to be able to make new rules secure by default. For example, we enforce signed commits in repositories by default using branch rulesets, and would prefer it to be enforced by default in every single rule in Policy Bot (unless explicitly opted out from)
We would like to share snippets between rules. For example, the list of machine users, and the definition of "developers" excluding machine accounts.
How we are currently achieving the goal
We use CUE language to generate the final YAML used by Policy Bot. It allows us to share snippets like:
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
-
What are we trying to achieve
Mercari is using policy bot in production across an organization of over 4000 repositories, many of which have legacy workflows that require customized (least privilege) exceptions to our standard configuration. We have 1 policy file that applies to every single repository: repository-specific rules are achieved by making use of the
repository
predicate.There are 2 main goals:
How we are currently achieving the goal
We use CUE language to generate the final YAML used by Policy Bot. It allows us to share snippets like:
and enforce (but allow exclusion from) requirement of signed commits by
Part of the configuration is as follows.
Beta Was this translation helpful? Give feedback.
All reactions