Skip to content

v0.6.0

Compare
Choose a tag to compare
@github-actions github-actions released this 08 Aug 11:44
· 759 commits to main since this release
44cd7de

This release brings a new command for quickly generating new (custom or built-in) rules, a new linter rule, and some improvements around tooling.

New command to help develop new rules

The regal new rule command may now be used to quickly get started developing your own rules, wether custom ones for your organization, or built-in rules for inclusion in Regal.

regal new rule --category naming --name foo-bar-baz

The above command will create two new files under .regal/rules/naming (all directories created if not exists since before) where one is a policy for the new rule, and another is a test for the same rule. See the updated documentation for custom rules development for more details.

New rule: non-raw-regex-pattern

Using raw string literals for regex pattern has since long been a best practice, and is recommended both by the OPA docs as well as the Rego Style Guide.. The new non-raw-regex-pattern rule (in the idiomatic category) will now help enforce this convention.

Pre-Commit Hooks

Regal now provides pre-commit hooks for easily running Regal as part of your development workflow. Very useful if you want to ensure regal lint is run before you commit any changes to policy files. See the docs on pre-commit hooks for more information. Thanks @adam-moss and @c-wygoda for your contributions to this feature.

Other notable changes

  • The use-in-operator rule has been moved from the style category to idiomatic. Thanks @Parsifal-M!
  • The documentation for all rules now includes a footer linking to the Regal channel in the Styra Community Slack.
  • OPA version bumped from v0.54.0 to v0.55.0

Changelog