com.limdm.customchecks (list)¶
Console: Custom compliance checks.
{"checks": [{"id": "custom.no_telnet", "title": "Telnet client is not installed", "severity": "medium", "level": 1,
"refs": {"bsi": ["SYS.2.3.A1"]}, "package": {"name": "telnet", "state": "absent"}}]}
Compliance checks defined by IT, counted like built in checks. Merged by id; at most 200.
| Field | Type | Rules |
|---|---|---|
checks[].id |
text | custom. followed by lower case letters, digits, ., _, - (up to 56 characters); unique |
checks[].title |
text | one line, up to 200 characters |
checks[].severity |
text | low, medium, high or critical |
checks[].level |
number | 1 or 2 |
checks[].refs |
object | optional cis, bsi, iso (lists of one line references) and cis_benchmark (text) |
checks[].query |
object | sql (one read only SELECT or WITH statement, up to 4096 characters, no comments), expect (rows, no_rows or compare); compare also needs column, op and value |
checks[].file |
object | path (absolute), state (present or absent); for present files optional max_mode (octal), owner, group, contains and not_contains (RE2, matched per line) |
checks[].sysctl |
object | key, op, value |
checks[].package |
object | name, state (installed or absent) |
checks[].service |
object | name, state (active or inactive), optional enabled |
Every check has exactly one test. op is eq, ne, lt, le, gt, ge (numbers),
contains or matches (RE2); value is up to 1024 characters. Queries run with osqueryi
without extensions and may read only an allowlist of local tables; writing statements and
tables that reach the network or carve files are refused. Details: Custom checks: com.limdm.customchecks.
Field reference¶
Generated from the payload schema of the server (GET /api/v1/schemas/{type}), the same reference the console editor shows. Unknown fields are rejected.
com.limdm.customchecks¶
Console: Custom compliance checks. Own compliance checks: read only osquery queries or file, sysctl, package and service conditions.
| Field | Type | Meaning | Limits |
|---|---|---|---|
checks |
list of object | Checks | |
checks[].id |
string | ID custom. followed by a name, for example custom.no_uid0. | |
checks[].title |
string | Title | |
checks[].severity |
string | Severity | one of "low" (Low), "medium" (Medium), "high" (High), "critical" (Critical) |
checks[].level |
integer | Level | one of 1 (L1), 2 (L2) |
checks[].refs |
object | References | |
checks[].refs.cis |
list of string | CIS | |
checks[].refs.cis_benchmark |
string | CIS benchmark | |
checks[].refs.bsi |
list of string | BSI IT-Grundschutz | |
checks[].refs.iso |
list of string | ISO 27001 | |
checks[].query |
object | osquery test Use exactly one test per check. | |
checks[].query.sql |
string | SQL Read only osquery query. | |
checks[].query.expect |
string | Passes when | one of "rows" (Rows), "no_rows" (No rows), "compare" (Compare) |
checks[].query.column |
string | Column | |
checks[].query.op |
string | Operator | one of "eq" (equals), "ne" (not equal), "lt" (less than), "le" (less or equal), "gt" (greater than), "ge" (greater or equal), "contains" (contains), "matches" (matches (RE2)) |
checks[].query.value |
string | Value | |
checks[].file |
object | File test | |
checks[].file.path |
string | Path | |
checks[].file.state |
string | State | one of "present" (Present), "absent" (Absent) |
checks[].file.max_mode |
string | Maximum mode Octal, for example 0644. | |
checks[].file.owner |
string | Owner | |
checks[].file.group |
string | Group | |
checks[].file.contains |
string | Contains (RE2) | |
checks[].file.not_contains |
string | Does not contain (RE2) | |
checks[].sysctl |
object | sysctl test | |
checks[].sysctl.key |
string | Key | |
checks[].sysctl.op |
string | Operator | one of "eq" (equals), "ne" (not equal), "lt" (less than), "le" (less or equal), "gt" (greater than), "ge" (greater or equal), "contains" (contains), "matches" (matches (RE2)) |
checks[].sysctl.value |
string | Value | |
checks[].package |
object | Package test | |
checks[].package.name |
string | Package | |
checks[].package.state |
string | State | one of "installed" (Installed), "absent" (Absent) |
checks[].service |
object | Service test | |
checks[].service.name |
string | Unit | |
checks[].service.state |
string | State | one of "active" (Active), "inactive" (Inactive) |
checks[].service.enabled |
boolean | Enabled Checked only when set. |
Example payload
{
"checks": [
{
"id": "custom.no_telnet",
"title": "Telnet client is not installed",
"severity": "medium",
"level": 1,
"refs": {
"bsi": [
"SYS.2.3.A1"
]
},
"package": {
"name": "telnet",
"state": "absent"
}
},
{
"id": "custom.shadow_mode",
"title": "/etc/shadow is not readable by others",
"severity": "high",
"level": 1,
"file": {
"path": "/etc/shadow",
"state": "present",
"max_mode": "0640",
"owner": "root"
}
},
{
"id": "custom.no_uid0",
"title": "Only root has UID 0",
"severity": "critical",
"level": 1,
"query": {
"sql": "SELECT username FROM users WHERE uid = 0 AND username <> 'root'",
"expect": "no_rows"
}
}
]
}