Skip to content

Commit

Permalink
Upgrade the policychecks file to 4.30
Browse files Browse the repository at this point in the history
  • Loading branch information
dreads committed Dec 31, 2024
1 parent 6618896 commit 87f5282
Showing 1 changed file with 92 additions and 4 deletions.
96 changes: 92 additions & 4 deletions policychecks/liquibase.checks-settings.conf
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
## Quality Checks Settings File
## Policy Checks Settings File
########## IMPORTANT: NEVER EDIT THIS KEY
## id: 'some-l0ng-uni4ue-id3nt1fier-c0d3'

Expand All @@ -9,8 +9,9 @@
########## EDITABLE PARAMETERS
## Standard value options:
## ALLOWED_LIST: <comma-separated list>
## ATTRIBUTE: <ID, AUTHOR, CONTEXT, CONTEXT_FILTER, LABELS, DBMS, RUN_ON_CHANGE, RUN_ALWAYS, FAIL_ON_ERROR, ON_VALIDATION_FAIL, RUN_IN_TRANSACTION, LOGICAL_FILE_PATH, OBJECT_QUOTING_STRATEGY, CREATED, RUN_ORDER, IGNORE, RUN_WITH, RUN_WITH_SPOOL_FILE>
## CASE_SENSITIVE: <true, false>
## CHANGE_TYPE_LIST: <comma-separated list; valid values: RENAMEVIEW, DELETEGLOBALSECONDARYINDEX, DROPFOREIGNKEYCONSTRAINT, DROPTABLE, CREATEGLOBALSECONDARYINDEX, DROPUNIQUECONSTRAINT, DROPCOLLECTION, SQLFILE, MERGECOLUMNS, RENAMETRIGGER, MONGOFILE, TAGDATABASE, ADDNOTNULLCONSTRAINT, INSERTMANY, UPDATEGLOBALSECONDARYINDEX, CREATECOLLECTION, SETCOLUMNREMARKS, DISABLECHECKCONSTRAINT, ADMINCOMMAND, ADDUNIQUECONSTRAINT, CREATEFUNCTION, CREATETRIGGER, DROPINDEX, DROPSEQUENCE, CREATESEQUENCE, DROPPACKAGE, OUTPUT, STOP, DROPNOTNULLCONSTRAINT, ENABLETRIGGER, SETTABLEREMARKS, DROPTRIGGER, DROPCOLUMN, RUNCOMMAND, DROPPROCEDURE, SQL, EXECUTECOMMAND, ADDCHECKCONSTRAINT, CREATEVIEW, DROPFUNCTION, CREATETABLE, DROPPACKAGEBODY, MONGO, ENABLECHECKCONSTRAINT, LOADUPDATEDATA, CUSTOMCHANGE, DROPSYNONYM, INSERT, DROPDEFAULTVALUE, ADDCOLUMN, CREATEPROCEDURE, LOADDATA, INSERTONE, CREATEINDEX, DROPALLFOREIGNKEYCONSTRAINTS, CREATEPACKAGEBODY, CREATESYNONYM, DISABLETRIGGER, DELETE, RENAMESEQUENCE, ADDDEFAULTVALUE, CREATEDYNAMOTABLE, DROPPRIMARYKEY, UPDATEDYNAMOTABLE, PARTIQLFILE, PARTIQL, UPDATE, MODIFYDATATYPE, ADDFOREIGNKEYCONSTRAINT, DROPCHECKCONSTRAINT, EMPTY, UPDATETABLEPROVISIONEDTHROUGHPUT, MARKUNUSED, DELETEDYNAMOTABLE, ALTERSEQUENCE, ADDAUTOINCREMENT, RENAMECOLUMN, ADDLOOKUPTABLE, DROPVIEW, CREATEPACKAGE, ADDPRIMARYKEY, RENAMETABLE>
## CHANGE_TYPE_LIST: <comma-separated list; valid values: RENAMEVIEW, DROPFOREIGNKEYCONSTRAINT, DROPTABLE, DROPUNIQUECONSTRAINT, SQLFILE, MERGECOLUMNS, RENAMETRIGGER, TAGDATABASE, ADDNOTNULLCONSTRAINT, SETCOLUMNREMARKS, DISABLECHECKCONSTRAINT, ADDUNIQUECONSTRAINT, CREATEFUNCTION, CREATETRIGGER, DROPINDEX, DROPSEQUENCE, CREATESEQUENCE, DROPPACKAGE, OUTPUT, STOP, DROPNOTNULLCONSTRAINT, ENABLETRIGGER, SETTABLEREMARKS, DROPTRIGGER, DROPCOLUMN, DROPPROCEDURE, SQL, EXECUTECOMMAND, ADDCHECKCONSTRAINT, CREATEVIEW, DROPFUNCTION, CREATETABLE, DROPPACKAGEBODY, ENABLECHECKCONSTRAINT, LOADUPDATEDATA, CUSTOMCHANGE, DROPSYNONYM, INSERT, DROPDEFAULTVALUE, ADDCOLUMN, CREATEPROCEDURE, LOADDATA, CREATEINDEX, DROPALLFOREIGNKEYCONSTRAINTS, CREATEPACKAGEBODY, CREATESYNONYM, DISABLETRIGGER, DELETE, RENAMESEQUENCE, ADDDEFAULTVALUE, DROPPRIMARYKEY, UPDATE, MODIFYDATATYPE, ADDFOREIGNKEYCONSTRAINT, DROPCHECKCONSTRAINT, EMPTY, MARKUNUSED, ALTERSEQUENCE, ADDAUTOINCREMENT, RENAMECOLUMN, ADDLOOKUPTABLE, DROPVIEW, CREATEPACKAGE, ADDPRIMARYKEY, RENAMETABLE>
## COLUMN_NAME: <non-empty string>
## CONSTRAINT: <NOT_NULL, UNIQUE, PRIMARYKEY, FOREIGNKEY, DEFAULT>
## CONSTRAINT_OPERATOR: <STARTS_WITH, ENDS_WITH, CONTAINS, REGEXP, ALL>
Expand All @@ -32,19 +33,28 @@
## OPERATOR: <STARTS_WITH, ENDS_WITH, CONTAINS, REGEXP, EQUALS>
## PASSWORD: <non-empty string>
## PATH_FILTER_REGEX: <RegexGetter>
## PATTERN_A: <a string, or a valid regular expression>
## PATTERN_B: <a string, or a valid regular expression>
## PRIMARY_SEARCH_STRING: <a string, or a valid regular expression>
## PRIVILEGE_LIST: <comma-separated list of valid database privileges>
## PROJECT_DIR: <path to a directory>
## REQUIRES_SNAPSHOT: <true, false>
## RUN_IN_TRANSACTION_VALUE: <true,false>
## SAMPLE_CHANGELOG_NAME: <valid filename>
## SCRIPT_NAME: <a relative file path>
## SCRIPT_ARGS: <a list of arguments, i.e key1="value1", key2="value2">
## SCRIPT_DESCRIPTION: <string>
## SCRIPT_MESSAGE: <string>
## SCRIPT_PATH: <a relative file path>
## SCRIPT_SCOPE: <changelog, database>
## SCRIPT_TYPE: <PYTHON>
## SEARCH_STRING: <a string, or a valid regular expression>
## SPLIT_STATEMENTS: <true, false>
## STRIP_COMMENTS: <true, false>
## TABLE_NAME: <string>
## USERNAME: <non-empty string>

fileCreated: 2024-02-23T17:05:17.619Z
fileModified: 2024-08-23T16:04:20.017Z
fileModified: 2024-12-31T18:40:26.141Z
rules:
- description: This check warns a user when SQL contains 'GRANT' statements so that
they can ensure that the privilege being granted won't lead to security issues.
Expand Down Expand Up @@ -113,6 +123,8 @@ rules:
value: true
- parameter: PATH_FILTER_REGEX
value: null
- parameter: SPLIT_STATEMENTS
value: false
parentRuleId: null
severity: '0'
shortName: SqlUserDefinedPatternCheck
Expand All @@ -133,6 +145,13 @@ rules:
in Changeset ''<CHANGESET>''.'
- parameter: STRIP_COMMENTS
value: true
- parameter: PATTERN_A
value: null
- parameter: PATTERN_B
value: null
- parameter: MESSAGE
value: 'Match found: ''<PATTERN_A>'' is followed by ''<PATTERN_B>'' in Changeset
''<CHANGESET>''.'
parentRuleId: null
severity: '0'
shortName: PatternAFollowedByPatternB
Expand All @@ -153,6 +172,13 @@ rules:
in Changeset ''<CHANGESET>''.'
- parameter: STRIP_COMMENTS
value: true
- parameter: PATTERN_A
value: null
- parameter: PATTERN_B
value: null
- parameter: MESSAGE
value: 'Match found: ''<PATTERN_A>'' is preceded by ''<PATTERN_B>'' in Changeset
''<CHANGESET>''.'
parentRuleId: null
severity: '0'
shortName: PatternAPrecededByPatternB
Expand All @@ -173,6 +199,13 @@ rules:
in Changeset ''<CHANGESET>''.'
- parameter: STRIP_COMMENTS
value: true
- parameter: PATTERN_A
value: null
- parameter: PATTERN_B
value: null
- parameter: MESSAGE
value: 'Match found: ''<PATTERN_A>'' is NOT followed by ''<PATTERN_B>'' in Changeset
''<CHANGESET>''.'
parentRuleId: null
severity: '0'
shortName: PatternANotFollowedByPatternB
Expand All @@ -193,6 +226,13 @@ rules:
in Changeset ''<CHANGESET>''.'
- parameter: STRIP_COMMENTS
value: true
- parameter: PATTERN_A
value: null
- parameter: PATTERN_B
value: null
- parameter: MESSAGE
value: 'Match found: ''<PATTERN_A>'' is NOT preceded by ''<PATTERN_B>'' in Changeset
''<CHANGESET>''. '
parentRuleId: null
severity: '0'
shortName: PatternANotPrecededByPatternB
Expand Down Expand Up @@ -612,4 +652,52 @@ rules:
parentRuleId: null
severity: '0'
shortName: MaxAffectedRowsAllowedUpdate
- description: Executes a custom check script.
enabled: false
id: '68592fc1-8c79-3026-990f-da80c1c6d6e0'
name: Custom Check Template
parameters:
- parameter: SCRIPT_DESCRIPTION
value: Custom check
- parameter: SCRIPT_SCOPE
value: CHANGELOG
- parameter: SCRIPT_MESSAGE
value: The message to display when the check is triggered
- parameter: SCRIPT_TYPE
value: PYTHON
- parameter: SCRIPT_PATH
value: null
- parameter: SCRIPT_ARGS
value: null
- parameter: REQUIRES_SNAPSHOT
value: false
parentRuleId: null
severity: '0'
shortName: CustomCheckTemplate
- description: This check triggers when specified attributes do not match TRUE or
FALSE, as configured by the user.
enabled: false
id: '8339bc72-ae9e-3678-8a86-2af1b8aa2d1c'
name: Changeset attributes set true or false
parameters:
- parameter: ATTRIBUTE
value: null
- parameter: SEARCH_STRING
value: null
parentRuleId: null
severity: '0'
shortName: ChangesetAttributesSetTrueOrFalse
- description: This check triggers when specified attributes do not match the user-supplied
string or regex pattern.
enabled: false
id: '84092e22-894a-3452-a778-5bfae8ba03ca'
name: Changeset attributes and value
parameters:
- parameter: ATTRIBUTE
value: null
- parameter: SEARCH_STRING
value: null
parentRuleId: null
severity: '0'
shortName: ChangesetAttributesAndValue
version: '1.1'

0 comments on commit 87f5282

Please sign in to comment.