Skip to content

Instantly share code, notes, and snippets.

@nbeguier
Created November 30, 2020 14:47
Show Gist options
  • Save nbeguier/d065bdd238224c6aabd57e33fdd98b8a to your computer and use it in GitHub Desktop.
Save nbeguier/d065bdd238224c6aabd57e33fdd98b8a to your computer and use it in GitHub Desktop.
AWS Tower - Rule to detect deprecated version of Mysql
{
"message": {
"text": "Deprecated mysql engine version ({current_version})",
"args": {
"current_version": {
"type": "dict",
"key": "Engine",
"variable": "metadata"
}
}
},
"severity": "high",
"rules": [
{
"type": "in",
"description": "Check if Engine is in metadata",
"conditions": [
{
"type": "constant",
"name": "data_element",
"value": "Engine"
}
],
"data_sources": [
{
"type": "variable",
"name": "data_list",
"value": "metadata"
}
]
},
{
"type": "engine_deprecated_version",
"description": "Check if mysql engine is not deprecated",
"conditions": [
{
"type": "constant",
"name": "engine_name",
"value": "mysql"
},
{
"type": "constant",
"name": "versions",
"value": [
"5.2.0"
]
}
],
"data_sources": [
{
"type": "dict",
"name": "engine",
"value": "metadata",
"key": "Engine"
}
]
}
]
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment