Custom policy checks library

Last updated: May 13, 2026

Find the right policy check for your governance needs. Our Custom policy checks Library provides ready-to-use Python scripts organized by database platform and use case, so you can enforce compliance without starting from scratch.

Cassandra Regex Custom policy checks

  • CreateTableMustHaveIFNOTEXIST

    CreateTableMustHaveIFNOTEXIST is a regex custom policy check that requires every CREATE TABLE statement to use IF NOT EXISTS syntax. All Regex Custom Policy Checks can only run against the changelog, not against the database.

  • CreateTableMustHavePrimaryKey
  • CreateTableMustHaveSystemKeyFile

    CreateTableMustHaveSystemKeyFile is a custom policy check that requires every CREATE TABLE statement to also have a system_key_file. All Regex Custom Policy Checks can only run against the changelog, not against the database.

DynamoDB Regex Custom policy checks

  • DynamoDeleteDynamoTableCheck

    The DynamoDeleteDynamoTableCheck changelog check triggers when a XML, YAML, or JSON changeset contains the Dynamo-specific change type.

  • DynamoDeleteGlobalSecondaryIndexCheck

    Alerts when changesets try to remove Global Secondary Indexes from DynamoDB tables, helping verify that deleting these indexes will not negatively impact query performance or break application functionality that depends on these alternative access patterns for retrieving DynamoDB data.

  • DynamoChangetypeAttributes

    The DynamoChangetypeAttributes changelog check validates whether a specified attribute of a Dynamo changetype is set to an exact value or pattern.

MariaDB Regex Custom policy checks

  • CannotModifyUsersOrRoles

    CannotModifyUsersOrRoles is a custom policy check that prevents the following statements from occurring for users and roles:

  • PreventLockingColumnOrIndex

    The PreventLockingColumnOrIndex custom policy check mandates that ADD COLUMN and ADD INDEX execute online, rather than locally. This prevents the database from locking specific objects while other database tasks are in progress.

MongoDB Regex Custom policy checks

  • mongoCrCollectionValidatorChk

    mongoCrCollectionValidatorChk is a custom policy check that requires every db.createCollection statement to include a validator definition statement.

  • mongoCreateIdxWarning

    mongoCreateIdxWarning is a custom policy check that warns every time a db.<collection>.createIndex MongoSH change includes a create index statement.

  • mongoNoDeleteMany

    mongoNoDeleteMany is a custom policy check that does not allow deleteMany() statements.

  • mongoNoDropCollection

    mongoNoDropCollection is a custom policy check that does not allow drop() statements.

  • mongoNoDropIndex

    mongoNoDropIndex is a custom policy check that prevents dropIndex() statements from occurring.

  • mongoNoMergeAggregation

    mongoNoMergeAggregation is a custom policy check that prevents $merge(aggregation) statements from occurring.

  • mongoNoRenameCollection

    mongoNoRenameCollection is a custom policy check that prevents renameCollection() statements from occurring.

  • mongoNoUpdateMany

    mongoNoUpdateMany is a custom policy check that prevents updateMany() statements from occurring.

Oracle Regex Custom policy checks

  • CreateTableMustHaveOneGrant

    CreateTableMustHaveOneGrant is a custom policy check that requires every CREATE TABLE statement to also have at least one GRANT included.

  • CreateTableMustHavePartition

    CreateTableMustHaveOnePartition is a custom policy check that requires every CREATE TABLE statement to also have at least one PARTITION included.

  • CreateTableMustHavePrimaryKey
  • CreateTableNoCompressAdvanced

    CreateTableNoCompressAdvance is a custom policy check that prevents the use of COMPRESS FOR in CREATE TABLE statements and only allows compress or compress basic statements.

  • CreateTableNoCompressFor

    CreateTableNoCompressFor is a custom policy check that prevents the use of COMPRESS FOR in CREATE TABLE statements and only allows compress or compress basic statements.

  • CreateTableWithCertainColumnRequiresSequence

    CreateTableWithCertainColumnRequiresSequence is a custom policy check that requires when a CREATE TABLE statement with a certain column such as SQLKEY exists, there must also be a CREATE SEQUENCE included.

  • CreateTableWithCertainColumnRequiresTrigger

    CreateTableWithCertainColumnRequiresTrigger is a custom policy check that requires when a CREATE TABLE statement with a certain column such as SQLKEY exists, there must also be a CREATE OR REPLACE TRIGGER included.

  • ExecuteImmediateWarning

    ExecuteImmediateWarning is a custom policy check that warns you if any EXECUTE IMMEDIATE statements are detected.

  • NoAlterUser

    NoAlterUser is a custom policy check that prevents the use of ALTER USER statements.

  • NoCreateRole

    NoCreateRole is a custom policy check that prevents the use of CREATE ROLE statements.

  • NoCreateUser

    NoCreateRole is a custom policy check that prevents the use of CREATE USER statements.

  • NoDBLinks

    NoDBLinks is a custom policy check that prevents the use of database links, or the use of @ in SQL statements.

  • NoDeleteWithoutWhere

    NoDeleteWithoutWhere is a custom policy check that requires every DELETE statement to also have a WHERE statement.

  • NoGrantAll

    NoGrantAll is a custom policy check that does not allow ALL or ALL PRIVILEGES grants.

  • NoGrantsToPublic

    NoGrantsToPublic is a custom policy check that prevents the use of GRANT <Privilege Type> TO PUBLIC statements.

  • NoGrantsToSystem

    NoGrantsToSystem is a custom policy check that prevents the use of GRANT <Privilege Type> TO SYSTEM statements.

  • NoSystemSchemaChanges

    NoSystemSchemaChanges is a custom policy check that prevents changes to the SYSTEM schema.

Regex Custom policy checks

  • CRQLabelRequired

    CRQLabelRequired is a custom policy check that tells Liquibase all changesets must have a CRQ (change request) label assigned.

  • enumerationListContext

    enumerationListContext is a custom policy check that tells Liquibase that if a context is provided, the context value must match a specified pattern. This is different from UserDefinedContextCheck because context is not required in this check.

  • MultipleCreateProceduresNotAllowed

    MultipleCreateProceduresNotAllowed is a custom policy check that prevents Liquibase from including Multiple CREATE PROCEDURE statements in a changeset. All regex Custom Policy Checks are only scoped for the changelog.

  • MultipleCreateTablesNotAllowed

    MultipleCreateTablesNotAllowed is a custom policy check that prevents multiple CREATE TABLE statements from occurring in a Liquibase Secure changeset.

  • MultipleDropsNotAllowed

    MultipleDropsNotAllowed is a custom policy check that tells Liquibase multiple DROP statements are not allowed in a Changeset.

  • MultipleGrantsNotAllowed

    MultipleGrantsNotAllowed is a custom policy check that does not allow Multiple GRANT statements in a Liquibase Secure changeset.

  • NoDataDmlStatements

    NoDataDmlStatements is a custom policy check that does not allow DATA DML statements.

  • NoDbclString

    The NoDbclString custom policy check prevents any uppercase or lowercase variations of the string databasechangelog from appearing outside of comments.

  • noSelectStar

    The NoSelect Custom Policy Checks prevents SELECT * statements from appearing in your Liquibase Secure changelog.

  • NoSelect

    The NoSelect Custom Policy Checks prevents SELECT statements from appearing in your Liquibase Secure changelog.

  • OnlySpecificSchemasAllowed

    The OnlySpecificSchemasAllowed custom policy check allows you to filter what specific schemas are allowed.

  • TablesMustHaveCreateTableOnly

    All changesets in the Tables folder must have CREATE TABLE statement only.

  • TablesMustHavePkOrBeNamedNpk

    TablesMustHavePkOrBeNamedNpk is a custom policy check that finds tables that have a Primary Key AND contain NPK in their name.

  • UppercaseTableNames

    UppercaseTableNames is a custom policy check that looks for table names that are uppercase. If Liquibase Secure detects a table that is not uppercase, it will return the code set in step 3.

  • viewsMustHaveCreateReplaceViewOnly

    viewsMustHaveCreateReplaceViewOnly is a custom policy check that requires all changesets in the Views folder to have a CREATE OR REPLACE VIEW statement. regex: (?is)^((?!create\s*or\s*replace\s*view).)*$ path_filter_regex: Views\/.*

Snowflake Regex Custom policy checks

  • CreateObjectCheck

    The CreateObjectCheck is a custom policy check that requires Create Object statements to either be Create Or Replace Object or Create Object If Not Exists.

  • CreateTableMustHaveDataRetention

    CreateTableMustHaveDataRetention is a custom policy check that requires CREATE TABLE statements to include parameters for DATA_RETENTION_TIME_IN_DAYS.

  • DatabaseNameNotAllowed

    NoUseDatabase is a custom policy check that does not allow USE DATABASE statements.

  • DoNotUseQaOrProdDatabases

    DoNotUseQaOrProdDatabases is a custom policy check that prevents the use of *_QA or *_PROD databases when deployment is restricted to *_DEV database only.

SQL Server Regex Custom policy checks

  • CreateProcedureMustHaveGrantExecute

    CreateProcedureMustHaveGrantExecute is a custom policy check that requires every CREATE PROCEDURE statement to follow GRANT EXECUTE statements for the same procedure.

  • CreateTableMustHavePrimaryKey

    CreateTableMustHavePrimaryKey is a custom policy check that requires every CREATE TABLE statement to also have a PRIMARY KEY.

  • NoAlterIndex

    NoAlterIndex is a custom policy check that requires every ALTER INDEX statement to be flagged.

  • NoAlterProcedure

    NoAlterProcedure is a custom policy check that requires every ALTER PROCEDURE statement to be flagged.

  • NoAlterTable

    NoAlterProcedure is a custom policy check that requires every ALTER TABLE statement to be flagged.

  • NoBulkInsert

    NoBulkInsert is a custom policy check that prevents the use of BULK INSERT statements.

  • NoCreateTable

    NoCreateTable is a custom policy check that prevents the use of CREATE TABLE statements except when creating temporary tables.

  • NoCursor

    NoCursor is a custom policy check that prevents the use of CURSOR statements.

  • NoDataDmlStatements for SQL Server

    NoDataDmlStatements is a custom policy check that prevents the use of DELETE FROM statements.

  • NoDeleteWithoutWhere

    NoDeleteWithoutWhere is a custom policy check that requires every DELETE statement to also have a WHERE statement.

  • NoExecute

    NoExecute is a custom policy check that prevents the use of EXEC or EXECUTE statements.

  • NoGrantExceptGrantExecute

    NoGrantExceptGrantExecute is a custom policy check that only allows GRANT EXECUTE statements and does not allow other GRANT statements.

  • NoGrantWithGrantOption

    NoGrantWithGrantOption is a custom policy check that prevents the use of GRANT ... WITH GRANT OPTION statements.

  • NoOpenDataSource

    NoOpenDataSource is a custom policy check that prevents the use of OPENDATASOURCE statements.

  • NoOpenRowSet

    NoOpenRowSet is a custom policy check that does not allow OPENROWSET statements.

  • OnlyTempTableDropAllowed

    OnlyTempTableDropAllowed is a custom policy check that only allows DROP TABLE statements when dropping temporary tables.