Skip to content

Commit

Permalink
Move JSON schemas to secl package
Browse files Browse the repository at this point in the history
  • Loading branch information
lebauce committed Nov 15, 2024
1 parent ac888df commit e664e9b
Show file tree
Hide file tree
Showing 55 changed files with 332 additions and 321 deletions.
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"$id": "agent_context.json",
"$id": "agent_context.schema.json",
"type": "object",
"properties": {
"rule_id": {
Expand Down Expand Up @@ -32,10 +32,10 @@
"items": {
"oneOf": [
{
"$ref": "/schemas/kill.schema.json"
"$ref": "kill.schema.json"
},
{
"$ref": "/schemas/hash.schema.json"
"$ref": "hash.schema.json"
}
]
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,20 +1,20 @@
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"$id": "bind.json",
"$id": "bind.schema.json",
"type": "object",
"allOf": [
{
"$ref": "/schemas/event.json"
"$ref": "event.schema.json"
},
{
"$ref": "/schemas/usr.json"
"$ref": "usr.schema.json"
},
{
"$ref": "/schemas/process_context.json"
"$ref": "process_context.schema.json"
},
{
"date": {
"$ref": "/schemas/datetime.json"
"$ref": "datetime.schema.json"
}
},
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,20 +1,20 @@
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"$id": "bpf.json",
"$id": "bpf.schema.json",
"type": "object",
"allOf": [
{
"$ref": "/schemas/event.json"
"$ref": "event.schema.json"
},
{
"$ref": "/schemas/usr.json"
"$ref": "usr.schema.json"
},
{
"$ref": "/schemas/process_context.json"
"$ref": "process_context.schema.json"
},
{
"date": {
"$ref": "/schemas/datetime.json"
"$ref": "datetime.schema.json"
}
},
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"$id": "chmod.json",
"$id": "chmod.schema.json",
"type": "object",
"anyOf": [
{
"$ref": "/schemas/container_event.json"
"$ref": "container_event.schema.json"
},
{
"$ref": "/schemas/host_event.json"
"$ref": "host_event.schema.json"
}
],
"allOf": [
Expand Down
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"$id": "chown.json",
"$id": "chown.schema.json",
"type": "object",
"anyOf": [
{
"$ref": "/schemas/container_event.json"
"$ref": "container_event.schema.json"
},
{
"$ref": "/schemas/host_event.json"
"$ref": "host_event.schema.json"
}
],
"allOf": [
Expand Down
Original file line number Diff line number Diff line change
@@ -1,20 +1,20 @@
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"$id": "connect.json",
"$id": "connect.schema.json",
"type": "object",
"allOf": [
{
"$ref": "/schemas/event.json"
"$ref": "event.schema.json"
},
{
"$ref": "/schemas/usr.json"
"$ref": "usr.schema.json"
},
{
"$ref": "/schemas/process_context.json"
"$ref": "process_context.schema.json"
},
{
"date": {
"$ref": "/schemas/datetime.json"
"$ref": "datetime.schema.json"
}
},
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"$id": "container.json",
"$id": "container.schema.json",
"type": "object",
"properties": {
"id": {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"$id": "container_context.json",
"$id": "container_context.schema.json",
"type": "object",
"properties": {
"container": {
"$ref": "/schemas/container.json"
"$ref": "container.schema.json"
}
},
"required": [
Expand Down
12 changes: 12 additions & 0 deletions pkg/security/secl/schemas/container_event.schema.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"$id": "container_event.schema.json",
"allOf": [
{
"$ref": "host_event.schema.json"
},
{
"$ref": "container_context.schema.json"
}
]
}
12 changes: 12 additions & 0 deletions pkg/security/secl/schemas/container_event_no_file.schema.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"$id": "container_event_no_file.schema.json",
"allOf": [
{
"$ref": "host_event_no_file.schema.json"
},
{
"$ref": "container_context.schema.json"
}
]
}
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"$id": "datetime.json",
"$id": "datetime.schema.json",
"allOf": [
{
"type": "string",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,23 +1,23 @@
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"$id": "dns.json",
"$id": "dns.schema.json",
"type": "object",
"allOf": [
{
"$ref": "/schemas/event.json"
"$ref": "event.schema.json"
},
{
"$ref": "/schemas/usr.json"
"$ref": "usr.schema.json"
},
{
"$ref": "/schemas/process_context.json"
"$ref": "process_context.schema.json"
},
{
"$ref": "/schemas/network.json"
"$ref": "network.schema.json"
},
{
"date": {
"$ref": "/schemas/datetime.json"
"$ref": "datetime.schema.json"
}
},
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"$id": "event.json",
"$id": "event.schema.json",
"type": "object",
"properties": {
"evt": {
Expand Down Expand Up @@ -32,7 +32,7 @@
"type": "object"
},
"date": {
"$ref": "/schemas/datetime.json"
"$ref": "datetime.schema.json"
}
},
"required": [
Expand Down
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"$id": "exec.json",
"$id": "exec.schema.json",
"type": "object",
"anyOf": [
{
"$ref": "/schemas/container_event.json"
"$ref": "container_event.schema.json"
},
{
"$ref": "/schemas/host_event.json"
"$ref": "host_event.schema.json"
}
],
"allOf": [
Expand Down
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"$id": "exit.json",
"$id": "exit.schema.json",
"type": "object",
"anyOf": [
{
"$ref": "/schemas/container_event.json"
"$ref": "container_event.schema.json"
},
{
"$ref": "/schemas/host_event.json"
"$ref": "host_event.schema.json"
}
],
"allOf": [
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"$id": "file.json",
"$id": "file.schema.json",
"type": "object",
"properties": {
"path": {
Expand Down Expand Up @@ -29,10 +29,10 @@
"type": "string"
},
"modification_time": {
"$ref": "/schemas/datetime.json"
"$ref": "datetime.schema.json"
},
"change_time": {
"$ref": "/schemas/datetime.json"
"$ref": "datetime.schema.json"
},
"flags": {
"type": "array",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"$id": "kill.json",
"$id": "kill.schema.json",
"type": "object",
"properties": {
"type": {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"$schema": "http://json-schema.org/draft-04/schema#",
"$id": "heartbeat.json",
"$id": "heartbeat.schema.json",
"type": "object",
"properties": {
"policy": {
Expand All @@ -9,7 +9,7 @@
}
},
"date": {
"$ref": "/schemas/datetime.json"
"$ref": "datetime.schema.json"
}
},
"required": [
Expand Down
23 changes: 23 additions & 0 deletions pkg/security/secl/schemas/host_event.schema.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"$id": "host_event.schema.json",
"allOf": [
{
"$ref": "event.schema.json"
},
{
"file": { "$ref": "file.schema.json" }
},
{
"$ref": "usr.schema.json"
},
{
"$ref": "process_context.schema.json"
},
{
"date": {
"$ref": "datetime.schema.json"
}
}
]
}
20 changes: 20 additions & 0 deletions pkg/security/secl/schemas/host_event_no_file.schema.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"$id": "host_event_no_file.schema.json",
"allOf": [
{
"$ref": "event.schema.json"
},
{
"$ref": "usr.schema.json"
},
{
"$ref": "process_context.schema.json"
},
{
"date": {
"$ref": "datetime.schema.json"
}
}
]
}
Original file line number Diff line number Diff line change
@@ -1,23 +1,23 @@
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"$id": "imds.json",
"$id": "imds.schema.json",
"type": "object",
"allOf": [
{
"$ref": "/schemas/event.json"
"$ref": "event.schema.json"
},
{
"$ref": "/schemas/usr.json"
"$ref": "usr.schema.json"
},
{
"$ref": "/schemas/process_context.json"
"$ref": "process_context.schema.json"
},
{
"$ref": "/schemas/network.json"
"$ref": "network.schema.json"
},
{
"date": {
"$ref": "/schemas/datetime.json"
"$ref": "datetime.schema.json"
}
},
{
Expand Down
Loading

0 comments on commit e664e9b

Please sign in to comment.