SQLGrantAdminWarn

This check warns a user when a SQL contains 'GRANT' statements that include the 'WITH ADMIN OPTION' clause so that they can ensure that the privilege being granted won't lead to security issues or violate compliance regulations.

Uses

Use the check to warn when changelogs contain WITH ADMIN OPTION statements. Unintended or unauthorized GRANTS can lead to security and compliance issues, especially in regulated industries. This quality check alerts users so they can exercise more control over privileges and permission changes, which is especially important in automated data pipelines, before these changes are deployed to your quality checked environments.

Run the SQLGrantWarn check

The SQLGrantAdminWarn check is enabled by default, so you will not need to turn it on if you have not changed your settings previously. To run the sqlGrantAdminWarn check, ensure you have a Liquibase Pro license and the checks-scope property includes changelog. The checks-scope parameter is set in the default properties file, environment variable, or any standard method. Then, check the changelog to see if SQLGrantAdminWarn is enabled.

Note: Please be aware that SQLGrantAdminWarn only supports unmodeled changeset types. If you use this Quality Check with modeled changesets (XML, JSON, and YAML changelogs as well as all ChangeTypes except sql and sqlFile), a message will appear stating the changeset was skipped.

Enable the SQLGrantAdminWarn check by running the following command in the CLI:

liquibase checks enable --check-name=SQLGrantAdminWarn
Short Name Scope Enabled Severity Customization Description
SQLGrantAdminWarn changelog

true

Default value: 1

  • 'INFO' | 0
  • 'MINOR' | 1
  • 'MAJOR' | 2
  • 'CRITICAL' | 3
  • 'BLOCKER' | 4

<None>

This check warns a user when a SQL contains 'GRANT' statements that include the 'WITH ADMIN OPTION' clause so that they can ensure that the privilege being granted won't lead to security issues.