mirror of
https://github.com/falcosecurity/falco.git
synced 2025-06-30 16:42:14 +00:00
chore(userspace): minified rule schema json.
Signed-off-by: Federico Di Pierro <nierro92@gmail.com>
This commit is contained in:
parent
5bd2d5a63e
commit
a392e1ed2d
@ -47,152 +47,7 @@ limitations under the License.
|
|||||||
|
|
||||||
const std::string falco_engine::s_default_ruleset = "falco-default-ruleset";
|
const std::string falco_engine::s_default_ruleset = "falco-default-ruleset";
|
||||||
|
|
||||||
static const std::string rule_schema_string = R"(
|
static const std::string rule_schema_string = R"({"$schema":"http://json-schema.org/draft-06/schema#","type":"array","items":{"$ref":"#/definitions/FalcoRule"},"definitions":{"FalcoRule":{"type":"object","additionalProperties":false,"properties":{"required_engine_version":{"type":"string"},"macro":{"type":"string"},"condition":{"type":"string"},"list":{"type":"string"},"items":{"type":"array","items":{"$ref":"#/definitions/Item"}},"rule":{"type":"string"},"desc":{"type":"string"},"enabled":{"type":"boolean"},"output":{"type":"string"},"append":{"type":"boolean"},"priority":{"$ref":"#/definitions/Priority"},"exceptions":{"type":"array","items":{"$ref":"#/definitions/Exception"}},"override":{"$ref":"#/definitions/Override"},"tags":{"type":"array","items":{"type":"string"}}},"required":[],"title":"FalcoRule"},"Item":{"anyOf":[{"type":"integer"},{"type":"string"}],"title":"Item"},"Exception":{"type":"object","additionalProperties":false,"properties":{"name":{"type":"string"},"fields":{},"comps":{},"values":{}},"required":["name","values"],"title":"Exception"},"Priority":{"type":"string","enum":["WARNING","NOTICE","INFO","ERROR","CRITICAL"],"title":"Priority"},"OverriddenItem":{"type":"string","enum":["append","replace"],"title":"Priority"},"Override":{"type":"object","additionalProperties":false,"properties":{"items":{"$ref":"#/definitions/OverriddenItem"},"desc":{"$ref":"#/definitions/OverriddenItem"},"condition":{"$ref":"#/definitions/OverriddenItem"},"output":{"$ref":"#/definitions/OverriddenItem"},"priority":{"$ref":"#/definitions/OverriddenItem"},"enabled":{"$ref":"#/definitions/OverriddenItem"},"exceptions":{"$ref":"#/definitions/OverriddenItem"}},"minProperties":1,"title":"Override"}}})";
|
||||||
{
|
|
||||||
"$schema": "http://json-schema.org/draft-06/schema#",
|
|
||||||
"type": "array",
|
|
||||||
"items": {
|
|
||||||
"$ref": "#/definitions/FalcoRule"
|
|
||||||
},
|
|
||||||
"definitions": {
|
|
||||||
"FalcoRule": {
|
|
||||||
"type": "object",
|
|
||||||
"additionalProperties": false,
|
|
||||||
"properties": {
|
|
||||||
"required_engine_version": {
|
|
||||||
"type": "string"
|
|
||||||
},
|
|
||||||
"macro": {
|
|
||||||
"type": "string"
|
|
||||||
},
|
|
||||||
"condition": {
|
|
||||||
"type": "string"
|
|
||||||
},
|
|
||||||
"list": {
|
|
||||||
"type": "string"
|
|
||||||
},
|
|
||||||
"items": {
|
|
||||||
"type": "array",
|
|
||||||
"items": {
|
|
||||||
"$ref": "#/definitions/Item"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"rule": {
|
|
||||||
"type": "string"
|
|
||||||
},
|
|
||||||
"desc": {
|
|
||||||
"type": "string"
|
|
||||||
},
|
|
||||||
"enabled": {
|
|
||||||
"type": "boolean"
|
|
||||||
},
|
|
||||||
"output": {
|
|
||||||
"type": "string"
|
|
||||||
},
|
|
||||||
"append": {
|
|
||||||
"type": "boolean"
|
|
||||||
},
|
|
||||||
"priority": {
|
|
||||||
"$ref": "#/definitions/Priority"
|
|
||||||
},
|
|
||||||
"exceptions": {
|
|
||||||
"type": "array",
|
|
||||||
"items": {
|
|
||||||
"$ref": "#/definitions/Exception"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"override": {
|
|
||||||
"$ref": "#/definitions/Override"
|
|
||||||
},
|
|
||||||
"tags": {
|
|
||||||
"type": "array",
|
|
||||||
"items": {
|
|
||||||
"type": "string"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"required": [],
|
|
||||||
"title": "FalcoRule"
|
|
||||||
},
|
|
||||||
"Item": {
|
|
||||||
"anyOf": [
|
|
||||||
{
|
|
||||||
"type": "integer"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"type": "string"
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"title": "Item"
|
|
||||||
},
|
|
||||||
"Exception": {
|
|
||||||
"type": "object",
|
|
||||||
"additionalProperties": false,
|
|
||||||
"properties": {
|
|
||||||
"name": {
|
|
||||||
"type": "string"
|
|
||||||
},
|
|
||||||
"fields": {},
|
|
||||||
"comps": {},
|
|
||||||
"values": {}
|
|
||||||
},
|
|
||||||
"required": [
|
|
||||||
"name",
|
|
||||||
"values"
|
|
||||||
],
|
|
||||||
"title": "Exception"
|
|
||||||
},
|
|
||||||
"Priority": {
|
|
||||||
"type": "string",
|
|
||||||
"enum": [
|
|
||||||
"WARNING",
|
|
||||||
"NOTICE",
|
|
||||||
"INFO",
|
|
||||||
"ERROR",
|
|
||||||
"CRITICAL"
|
|
||||||
],
|
|
||||||
"title": "Priority"
|
|
||||||
},
|
|
||||||
"OverriddenItem": {
|
|
||||||
"type": "string",
|
|
||||||
"enum": [
|
|
||||||
"append",
|
|
||||||
"replace"
|
|
||||||
],
|
|
||||||
"title": "Priority"
|
|
||||||
},
|
|
||||||
"Override": {
|
|
||||||
"type": "object",
|
|
||||||
"additionalProperties": false,
|
|
||||||
"properties": {
|
|
||||||
"items": {
|
|
||||||
"$ref": "#/definitions/OverriddenItem"
|
|
||||||
},
|
|
||||||
"desc": {
|
|
||||||
"$ref": "#/definitions/OverriddenItem"
|
|
||||||
},
|
|
||||||
"condition": {
|
|
||||||
"$ref": "#/definitions/OverriddenItem"
|
|
||||||
},
|
|
||||||
"output": {
|
|
||||||
"$ref": "#/definitions/OverriddenItem"
|
|
||||||
},
|
|
||||||
"priority": {
|
|
||||||
"$ref": "#/definitions/OverriddenItem"
|
|
||||||
},
|
|
||||||
"enabled": {
|
|
||||||
"$ref": "#/definitions/OverriddenItem"
|
|
||||||
},
|
|
||||||
"exceptions": {
|
|
||||||
"$ref": "#/definitions/OverriddenItem"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"minProperties":1,
|
|
||||||
"title": "Override"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
)";
|
|
||||||
|
|
||||||
using namespace falco;
|
using namespace falco;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user