Skip to content

Instantly share code, notes, and snippets.

@9b
Last active June 1, 2018 02:50
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save 9b/23465eb7ed71dd221c7f3c7c8149f1fb to your computer and use it in GitHub Desktop.
Save 9b/23465eb7ed71dd221c7f3c7c8149f1fb to your computer and use it in GitHub Desktop.
Sample policy generated from a rule builder meant to be evaluated.
{
"condition": "AND",
"rules": [
{
"id": "monitor_category",
"field": "monitor_category",
"type": "string",
"input": "select",
"operator": "equal",
"value": "Competition",
"decision": true
},
{
"id": "monitor_tag",
"field": "monitor_tag",
"type": "string",
"input": "text",
"operator": "equal",
"value": "PassiveTotal",
"decision": true
},
{
"condition": "OR",
"rules": [
{
"id": "article_tag",
"field": "article_tag",
"type": "string",
"input": "text",
"operator": "contains",
"value": "Attack",
"decision": false
},
{
"id": "article_tag",
"field": "article_tag",
"type": "string",
"input": "text",
"operator": "contains",
"value": "Hunt",
"decision": true
},
{
"id": "article_tag",
"field": "article_tag",
"type": "string",
"input": "text",
"operator": "contains",
"value": "Threat",
"decision": false
}
]
},
{
"id": "monitor_tag",
"field": "monitor_tag",
"type": "string",
"input": "text",
"operator": "equal",
"value": "Analysis",
"decision": false
}
]
}
{
"condition": "AND",
"rules": [
{
"id": "monitor_category",
"field": "monitor_category",
"type": "string",
"input": "select",
"operator": "equal",
"value": "Competition",
"decision": true
},
{
"id": "monitor_tag",
"field": "monitor_tag",
"type": "string",
"input": "text",
"operator": "equal",
"value": "PassiveTotal",
"decision": true
},
{
"condition": "OR",
"rules": [
{
"id": "article_tag",
"field": "article_tag",
"type": "string",
"input": "text",
"operator": "contains",
"value": "Attack",
"decision": false
},
{
"id": "article_tag",
"field": "article_tag",
"type": "string",
"input": "text",
"operator": "contains",
"value": "Hunt",
"decision": true
},
{
"id": "article_tag",
"field": "article_tag",
"type": "string",
"input": "text",
"operator": "contains",
"value": "Threat",
"decision": false
}
]
},
{
"id": "monitor_tag",
"field": "monitor_tag",
"type": "string",
"input": "text",
"operator": "equal",
"value": "Analysis",
"decision": true
}
]
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment