Liquibase policy checks are designed to analyze changesets and SQL for specific patterns, commands, and conditions to ensure database changes adhere to an organization’s security and compliance standards. They also help maintain code quality and consistency.
Checks integrate into a team's build and deployment automation to catch non-compliant changes early in the process, making it easier to address issues before changes advance further in the pipeline.
Watch the video for an overview of policy checks.
Below is a high-level policy checks flow diagram for reference:
This is a flow diagram illustrating the workflow of SQL through an automated pipeline. As part of an automated Liquibase process, each SQL change is checked for compliance with established policy. Non-compliant code is returned to the author while compliant code is pushed to the database as an update. In either case, an informational report is generated and made available to team members.
Liquibase offers a library of available checks in the default checks file which can be enabled or disabled. These default checks can also be customized using Java regular expressions (regex).
Liquibase also enables organizations to enforce compliance using Custom Policy checks written in Python. Check chains combine default and custom checks, allowing multiple checks to function together as a single policy check.
Learn how to configure and run policy checks in the following pages.