• Concept
  • Version · 5.2.1
  • User guide

Custom policy checks library

Last updated: October 19, 2026

Liquibase Professional Services maintains a library of custom policy checks in the custom_policychecks GitHub repository. Use the repository to find ready-made Python and regex checks that you can add to your Liquibase Secure policy checks.

What is the custom policy checks library?

The custom policy checks library is a collection of checks that go beyond the built-in policy checks that ship with Liquibase Secure. Liquibase field engineers and customers wrote these checks for real governance requirements. For example, CRQLabelRequired requires every changeset to have a change request label.

The repository has two folders:

Folder

Contains

Python/Scripts

Python scripts for custom policy checks, organized by database.

Regex

Regular expressions for configurable built-in checks, organized by database. Each file includes a sample passing and failing changeset, a sample error message, and the values to enter when you configure the check.

Who maintains the library?

Liquibase Professional Services maintains the checks in the repository. The repository is the source for the current version of each check.

If a check stops working because of a change in Liquibase Secure, Professional Services reports the problem to Liquibase Product and Engineering and updates the check in the repository when needed. To report a problem with a check, contact Liquibase Support.

How checks from the library work

The library holds two kinds of checks, and you set up each kind differently.

Python checks

A Python check runs a script that you store with your Liquibase project. Liquibase runs the script once for each changeset or once for each database object, depending on the check's scope. At a high level, you:

  • Save the script from the Python/Scripts folder in your Liquibase working directory or another location Liquibase can read.

  • Enable custom policy checks by setting checks-scripts-enabled to true. Custom policy checks are disabled by default.

  • Copy the built-in CustomChecksTemplate check with liquibase checks copy and point the copy at your script.

  • Run the check with liquibase checks run, the same as any built-in check.

For a full walkthrough, see Create a custom policy check.

Regex checks

A regex check is a copy of a configurable built-in check, such as SqlUserDefinedPatternCheck or UserDefinedLabelCheck, that uses a regular expression from the library as its search pattern. At a high level, you:

  • Open the check's file in the Regex folder.

  • Run the liquibase checks copy command the file lists and enter the values from the file at each prompt.

  • Run the check with liquibase checks run.

Learn more