- Concept
- Version · 5.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 for custom policy checks, organized by database. |
| 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/Scriptsfolder in your Liquibase working directory or another location Liquibase can read.Enable custom policy checks by setting
checks-scripts-enabledtotrue. Custom policy checks are disabled by default.Copy the built-in
CustomChecksTemplatecheck withliquibase checks copyand 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
Regexfolder.Run the
liquibase checks copycommand the file lists and enter the values from the file at each prompt.Run the check with
liquibase checks run.
Learn more
custom_policychecks repository: the Python and regex checks maintained by Liquibase Professional Services
What is a Liquibase Secure custom policy check?: how the custom policy checks framework works
Create a custom policy check: write and run your own Python check
Create a new checks settings file: store your checks configuration
Policy check reference: every built-in check that ships with Liquibase Secure