SQLRevokeWarn

This check warns a user when a SQL contains 'REVOKE' statements so that they can ensure that the privilege being revoked won't lead to data access and dependency issues.

Uses

Use SQLRevokeWarn to warn when changelogs contain REVOKE statements so that you do not have security issues due to the wrong privileges being removed, which can lead to failing jobs and even downtime. This quality check alerts users so they can exercise more control over the privileges and roles set and unset from changesets within the changelog.

Note: A REVOKE statement might be used in a lower environment (such as Test or Staging), but should only be used with extreme care in higher environments, such as Production. This check can even be configured to stop automated jobs which contain REVOKE.

Run the SQLRevokeWarn check

The SQLRevokeWarn 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 sqlGrantWarn 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 SQLRevokeWarn is enabled.

Note: Please be aware that sqlRevokeWarn 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 SQLRevokeWarn check by running the following command in the CLI:

liquibase checks enable --check-name=SQLRevokeWarn
Short Name Scope Enabled Severity Customization Description
SQLRevokeWarn 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 'REVOKE' statements so that they can ensure that the privilege being revoked won't lead to data access and dependency issues.