mirror of
https://github.com/empayre/fleet.git
synced 2024-11-06 00:45:19 +00:00
Website: update get-extended-osquery-schema helper to ensure all column types are lowercase. (#17931)
Closes: #17883 Changes: - Updated the `get-extended-osquery-schema` helper to set the `type` values of columns of tables with Fleet overrides to be lowercase. - Regenerated `osquery_fleet_schema.json`
This commit is contained in:
parent
4ae6b362b9
commit
2ae85ac2c4
@ -14,7 +14,7 @@
|
|||||||
{
|
{
|
||||||
"name": "uid",
|
"name": "uid",
|
||||||
"description": "[User ID](https://superuser.com/a/1108201)",
|
"description": "[User ID](https://superuser.com/a/1108201)",
|
||||||
"type": "BIGINT",
|
"type": "bigint",
|
||||||
"notes": "",
|
"notes": "",
|
||||||
"hidden": false,
|
"hidden": false,
|
||||||
"required": false,
|
"required": false,
|
||||||
@ -3964,7 +3964,7 @@
|
|||||||
{
|
{
|
||||||
"name": "path",
|
"name": "path",
|
||||||
"description": "Path to extension folder. Defaults to '' on ChromeOS",
|
"description": "Path to extension folder. Defaults to '' on ChromeOS",
|
||||||
"type": "TEXT",
|
"type": "text",
|
||||||
"notes": "",
|
"notes": "",
|
||||||
"hidden": false,
|
"hidden": false,
|
||||||
"required": false,
|
"required": false,
|
||||||
@ -4061,7 +4061,7 @@
|
|||||||
{
|
{
|
||||||
"name": "state",
|
"name": "state",
|
||||||
"description": "1 if this extension is enabled",
|
"description": "1 if this extension is enabled",
|
||||||
"type": "TEXT",
|
"type": "text",
|
||||||
"notes": "",
|
"notes": "",
|
||||||
"hidden": false,
|
"hidden": false,
|
||||||
"required": false,
|
"required": false,
|
||||||
@ -6792,7 +6792,7 @@
|
|||||||
{
|
{
|
||||||
"name": "type",
|
"name": "type",
|
||||||
"description": "The interface type of the disk.",
|
"description": "The interface type of the disk.",
|
||||||
"type": "TEXT",
|
"type": "text",
|
||||||
"notes": "",
|
"notes": "",
|
||||||
"hidden": false,
|
"hidden": false,
|
||||||
"required": false,
|
"required": false,
|
||||||
@ -6801,7 +6801,7 @@
|
|||||||
{
|
{
|
||||||
"name": "id",
|
"name": "id",
|
||||||
"description": "The unique identifier of the drive on the system.",
|
"description": "The unique identifier of the drive on the system.",
|
||||||
"type": "TEXT",
|
"type": "text",
|
||||||
"notes": "",
|
"notes": "",
|
||||||
"hidden": false,
|
"hidden": false,
|
||||||
"required": false,
|
"required": false,
|
||||||
@ -6822,7 +6822,7 @@
|
|||||||
{
|
{
|
||||||
"name": "disk_size",
|
"name": "disk_size",
|
||||||
"description": "Size of the disk.",
|
"description": "Size of the disk.",
|
||||||
"type": "BIGINT",
|
"type": "bigint",
|
||||||
"notes": "",
|
"notes": "",
|
||||||
"hidden": false,
|
"hidden": false,
|
||||||
"required": false,
|
"required": false,
|
||||||
@ -6855,7 +6855,7 @@
|
|||||||
{
|
{
|
||||||
"name": "name",
|
"name": "name",
|
||||||
"description": "The label of the disk object.",
|
"description": "The label of the disk object.",
|
||||||
"type": "TEXT",
|
"type": "text",
|
||||||
"notes": "",
|
"notes": "",
|
||||||
"hidden": false,
|
"hidden": false,
|
||||||
"required": false,
|
"required": false,
|
||||||
@ -18801,7 +18801,7 @@
|
|||||||
{
|
{
|
||||||
"name": "uid",
|
"name": "uid",
|
||||||
"description": "User ID for the policy. Returns `-1` if the policy applies to all users.",
|
"description": "User ID for the policy. Returns `-1` if the policy applies to all users.",
|
||||||
"type": "BIGINT",
|
"type": "bigint",
|
||||||
"notes": "",
|
"notes": "",
|
||||||
"hidden": false,
|
"hidden": false,
|
||||||
"required": false,
|
"required": false,
|
||||||
@ -18810,7 +18810,7 @@
|
|||||||
{
|
{
|
||||||
"name": "policy_identifier",
|
"name": "policy_identifier",
|
||||||
"description": "Policy identifier, such as `ProfilePayload:1d33ef8c-da1c-4534-8458-95a4d43d849e:minLength`.",
|
"description": "Policy identifier, such as `ProfilePayload:1d33ef8c-da1c-4534-8458-95a4d43d849e:minLength`.",
|
||||||
"type": "TEXT",
|
"type": "text",
|
||||||
"notes": "",
|
"notes": "",
|
||||||
"hidden": false,
|
"hidden": false,
|
||||||
"required": false,
|
"required": false,
|
||||||
@ -18819,7 +18819,7 @@
|
|||||||
{
|
{
|
||||||
"name": "policy_content",
|
"name": "policy_content",
|
||||||
"description": "Policy content, such as `policyAttributePassword matches '.{10,}'`.",
|
"description": "Policy content, such as `policyAttributePassword matches '.{10,}'`.",
|
||||||
"type": "TEXT",
|
"type": "text",
|
||||||
"notes": "",
|
"notes": "",
|
||||||
"hidden": false,
|
"hidden": false,
|
||||||
"required": false,
|
"required": false,
|
||||||
@ -18828,7 +18828,7 @@
|
|||||||
{
|
{
|
||||||
"name": "policy_description",
|
"name": "policy_description",
|
||||||
"description": "Policy description, such as `Contain at least 10 characters.`",
|
"description": "Policy description, such as `Contain at least 10 characters.`",
|
||||||
"type": "TEXT",
|
"type": "text",
|
||||||
"notes": "",
|
"notes": "",
|
||||||
"hidden": false,
|
"hidden": false,
|
||||||
"required": false,
|
"required": false,
|
||||||
@ -20687,7 +20687,7 @@
|
|||||||
{
|
{
|
||||||
"name": "operation",
|
"name": "operation",
|
||||||
"description": "Operation type",
|
"description": "Operation type",
|
||||||
"type": "TEXT",
|
"type": "text",
|
||||||
"notes": "",
|
"notes": "",
|
||||||
"hidden": false,
|
"hidden": false,
|
||||||
"required": false,
|
"required": false,
|
||||||
@ -20696,7 +20696,7 @@
|
|||||||
{
|
{
|
||||||
"name": "pid",
|
"name": "pid",
|
||||||
"description": "Process ID",
|
"description": "Process ID",
|
||||||
"type": "BIGINT",
|
"type": "bigint",
|
||||||
"notes": "",
|
"notes": "",
|
||||||
"hidden": false,
|
"hidden": false,
|
||||||
"required": false,
|
"required": false,
|
||||||
@ -20705,7 +20705,7 @@
|
|||||||
{
|
{
|
||||||
"name": "ppid",
|
"name": "ppid",
|
||||||
"description": "Parent process ID",
|
"description": "Parent process ID",
|
||||||
"type": "BIGINT",
|
"type": "bigint",
|
||||||
"notes": "",
|
"notes": "",
|
||||||
"hidden": false,
|
"hidden": false,
|
||||||
"required": false,
|
"required": false,
|
||||||
@ -20714,7 +20714,7 @@
|
|||||||
{
|
{
|
||||||
"name": "time",
|
"name": "time",
|
||||||
"description": "Time of execution in UNIX time",
|
"description": "Time of execution in UNIX time",
|
||||||
"type": "BIGINT",
|
"type": "bigint",
|
||||||
"notes": "",
|
"notes": "",
|
||||||
"hidden": false,
|
"hidden": false,
|
||||||
"required": false,
|
"required": false,
|
||||||
@ -20723,7 +20723,7 @@
|
|||||||
{
|
{
|
||||||
"name": "executable",
|
"name": "executable",
|
||||||
"description": "The executable path",
|
"description": "The executable path",
|
||||||
"type": "TEXT",
|
"type": "text",
|
||||||
"notes": "",
|
"notes": "",
|
||||||
"hidden": false,
|
"hidden": false,
|
||||||
"required": false,
|
"required": false,
|
||||||
@ -20732,7 +20732,7 @@
|
|||||||
{
|
{
|
||||||
"name": "partial",
|
"name": "partial",
|
||||||
"description": "True if this is a partial event (i.e.: this process existed before we started osquery)",
|
"description": "True if this is a partial event (i.e.: this process existed before we started osquery)",
|
||||||
"type": "TEXT",
|
"type": "text",
|
||||||
"notes": "",
|
"notes": "",
|
||||||
"hidden": false,
|
"hidden": false,
|
||||||
"required": false,
|
"required": false,
|
||||||
@ -20741,7 +20741,7 @@
|
|||||||
{
|
{
|
||||||
"name": "cwd",
|
"name": "cwd",
|
||||||
"description": "The current working directory of the process",
|
"description": "The current working directory of the process",
|
||||||
"type": "TEXT",
|
"type": "text",
|
||||||
"notes": "",
|
"notes": "",
|
||||||
"hidden": false,
|
"hidden": false,
|
||||||
"required": false,
|
"required": false,
|
||||||
@ -20750,7 +20750,7 @@
|
|||||||
{
|
{
|
||||||
"name": "path",
|
"name": "path",
|
||||||
"description": "The path associated with the event",
|
"description": "The path associated with the event",
|
||||||
"type": "TEXT",
|
"type": "text",
|
||||||
"notes": "",
|
"notes": "",
|
||||||
"hidden": false,
|
"hidden": false,
|
||||||
"required": false,
|
"required": false,
|
||||||
@ -20759,7 +20759,7 @@
|
|||||||
{
|
{
|
||||||
"name": "dest_path",
|
"name": "dest_path",
|
||||||
"description": "The canonical path associated with the event",
|
"description": "The canonical path associated with the event",
|
||||||
"type": "TEXT",
|
"type": "text",
|
||||||
"notes": "",
|
"notes": "",
|
||||||
"hidden": false,
|
"hidden": false,
|
||||||
"required": false,
|
"required": false,
|
||||||
@ -20768,7 +20768,7 @@
|
|||||||
{
|
{
|
||||||
"name": "uid",
|
"name": "uid",
|
||||||
"description": "The uid of the process performing the action",
|
"description": "The uid of the process performing the action",
|
||||||
"type": "TEXT",
|
"type": "text",
|
||||||
"notes": "",
|
"notes": "",
|
||||||
"hidden": false,
|
"hidden": false,
|
||||||
"required": false,
|
"required": false,
|
||||||
@ -20777,7 +20777,7 @@
|
|||||||
{
|
{
|
||||||
"name": "gid",
|
"name": "gid",
|
||||||
"description": "The gid of the process performing the action",
|
"description": "The gid of the process performing the action",
|
||||||
"type": "TEXT",
|
"type": "text",
|
||||||
"notes": "",
|
"notes": "",
|
||||||
"hidden": false,
|
"hidden": false,
|
||||||
"required": false,
|
"required": false,
|
||||||
@ -20786,7 +20786,7 @@
|
|||||||
{
|
{
|
||||||
"name": "auid",
|
"name": "auid",
|
||||||
"description": "Audit user ID of the process using the file",
|
"description": "Audit user ID of the process using the file",
|
||||||
"type": "TEXT",
|
"type": "text",
|
||||||
"notes": "",
|
"notes": "",
|
||||||
"hidden": false,
|
"hidden": false,
|
||||||
"required": false,
|
"required": false,
|
||||||
@ -20795,7 +20795,7 @@
|
|||||||
{
|
{
|
||||||
"name": "euid",
|
"name": "euid",
|
||||||
"description": "Effective user ID of the process using the file",
|
"description": "Effective user ID of the process using the file",
|
||||||
"type": "TEXT",
|
"type": "text",
|
||||||
"notes": "",
|
"notes": "",
|
||||||
"hidden": false,
|
"hidden": false,
|
||||||
"required": false,
|
"required": false,
|
||||||
@ -20804,7 +20804,7 @@
|
|||||||
{
|
{
|
||||||
"name": "egid",
|
"name": "egid",
|
||||||
"description": "Effective group ID of the process using the file",
|
"description": "Effective group ID of the process using the file",
|
||||||
"type": "TEXT",
|
"type": "text",
|
||||||
"notes": "",
|
"notes": "",
|
||||||
"hidden": false,
|
"hidden": false,
|
||||||
"required": false,
|
"required": false,
|
||||||
@ -20813,7 +20813,7 @@
|
|||||||
{
|
{
|
||||||
"name": "fsuid",
|
"name": "fsuid",
|
||||||
"description": "Filesystem user ID of the process using the file",
|
"description": "Filesystem user ID of the process using the file",
|
||||||
"type": "TEXT",
|
"type": "text",
|
||||||
"notes": "",
|
"notes": "",
|
||||||
"hidden": false,
|
"hidden": false,
|
||||||
"required": false,
|
"required": false,
|
||||||
@ -20822,7 +20822,7 @@
|
|||||||
{
|
{
|
||||||
"name": "fsgid",
|
"name": "fsgid",
|
||||||
"description": "Filesystem group ID of the process using the file",
|
"description": "Filesystem group ID of the process using the file",
|
||||||
"type": "TEXT",
|
"type": "text",
|
||||||
"notes": "",
|
"notes": "",
|
||||||
"hidden": false,
|
"hidden": false,
|
||||||
"required": false,
|
"required": false,
|
||||||
@ -20831,7 +20831,7 @@
|
|||||||
{
|
{
|
||||||
"name": "suid",
|
"name": "suid",
|
||||||
"description": "Saved user ID of the process using the file",
|
"description": "Saved user ID of the process using the file",
|
||||||
"type": "TEXT",
|
"type": "text",
|
||||||
"notes": "",
|
"notes": "",
|
||||||
"hidden": false,
|
"hidden": false,
|
||||||
"required": false,
|
"required": false,
|
||||||
@ -20840,7 +20840,7 @@
|
|||||||
{
|
{
|
||||||
"name": "sgid",
|
"name": "sgid",
|
||||||
"description": "Saved group ID of the process using the file",
|
"description": "Saved group ID of the process using the file",
|
||||||
"type": "TEXT",
|
"type": "text",
|
||||||
"notes": "",
|
"notes": "",
|
||||||
"hidden": false,
|
"hidden": false,
|
||||||
"required": false,
|
"required": false,
|
||||||
@ -20849,7 +20849,7 @@
|
|||||||
{
|
{
|
||||||
"name": "uptime",
|
"name": "uptime",
|
||||||
"description": "Time of execution in system uptime",
|
"description": "Time of execution in system uptime",
|
||||||
"type": "BIGINT",
|
"type": "bigint",
|
||||||
"notes": "",
|
"notes": "",
|
||||||
"hidden": false,
|
"hidden": false,
|
||||||
"required": false,
|
"required": false,
|
||||||
@ -20858,7 +20858,7 @@
|
|||||||
{
|
{
|
||||||
"name": "eid",
|
"name": "eid",
|
||||||
"description": "Event ID",
|
"description": "Event ID",
|
||||||
"type": "TEXT",
|
"type": "text",
|
||||||
"notes": "",
|
"notes": "",
|
||||||
"hidden": true,
|
"hidden": true,
|
||||||
"required": false,
|
"required": false,
|
||||||
@ -25556,7 +25556,7 @@
|
|||||||
{
|
{
|
||||||
"name": "hostname",
|
"name": "hostname",
|
||||||
"description": "Network hostname including domain. For ChromeOS, this is only available if the extension was force-installed by an enterprise policy",
|
"description": "Network hostname including domain. For ChromeOS, this is only available if the extension was force-installed by an enterprise policy",
|
||||||
"type": "TEXT",
|
"type": "text",
|
||||||
"notes": "",
|
"notes": "",
|
||||||
"hidden": false,
|
"hidden": false,
|
||||||
"required": false,
|
"required": false,
|
||||||
@ -25574,7 +25574,7 @@
|
|||||||
{
|
{
|
||||||
"name": "cpu_type",
|
"name": "cpu_type",
|
||||||
"description": "CPU type",
|
"description": "CPU type",
|
||||||
"type": "TEXT",
|
"type": "text",
|
||||||
"notes": "",
|
"notes": "",
|
||||||
"hidden": false,
|
"hidden": false,
|
||||||
"required": false,
|
"required": false,
|
||||||
@ -25597,7 +25597,7 @@
|
|||||||
{
|
{
|
||||||
"name": "cpu_brand",
|
"name": "cpu_brand",
|
||||||
"description": "CPU brand string, contains vendor and model",
|
"description": "CPU brand string, contains vendor and model",
|
||||||
"type": "TEXT",
|
"type": "text",
|
||||||
"notes": "",
|
"notes": "",
|
||||||
"hidden": false,
|
"hidden": false,
|
||||||
"required": false,
|
"required": false,
|
||||||
@ -25657,7 +25657,7 @@
|
|||||||
{
|
{
|
||||||
"name": "physical_memory",
|
"name": "physical_memory",
|
||||||
"description": "Total physical memory in bytes",
|
"description": "Total physical memory in bytes",
|
||||||
"type": "TEXT",
|
"type": "text",
|
||||||
"notes": "",
|
"notes": "",
|
||||||
"hidden": false,
|
"hidden": false,
|
||||||
"required": false,
|
"required": false,
|
||||||
@ -25666,7 +25666,7 @@
|
|||||||
{
|
{
|
||||||
"name": "hardware_vendor",
|
"name": "hardware_vendor",
|
||||||
"description": "Hardware vendor. For ChromeOS, this is only available if the extension was force-installed by an enterprise policy",
|
"description": "Hardware vendor. For ChromeOS, this is only available if the extension was force-installed by an enterprise policy",
|
||||||
"type": "TEXT",
|
"type": "text",
|
||||||
"notes": "",
|
"notes": "",
|
||||||
"hidden": false,
|
"hidden": false,
|
||||||
"required": false,
|
"required": false,
|
||||||
@ -25675,7 +25675,7 @@
|
|||||||
{
|
{
|
||||||
"name": "hardware_model",
|
"name": "hardware_model",
|
||||||
"description": "Hardware model. For ChromeOS, this is only available if the extension was force-installed by an enterprise policy",
|
"description": "Hardware model. For ChromeOS, this is only available if the extension was force-installed by an enterprise policy",
|
||||||
"type": "TEXT",
|
"type": "text",
|
||||||
"notes": "",
|
"notes": "",
|
||||||
"hidden": false,
|
"hidden": false,
|
||||||
"required": false,
|
"required": false,
|
||||||
@ -25698,7 +25698,7 @@
|
|||||||
{
|
{
|
||||||
"name": "hardware_serial",
|
"name": "hardware_serial",
|
||||||
"description": "The device's serial number. For ChromeOS, this is only available if the extension was force-installed by an enterprise policy",
|
"description": "The device's serial number. For ChromeOS, this is only available if the extension was force-installed by an enterprise policy",
|
||||||
"type": "TEXT",
|
"type": "text",
|
||||||
"notes": "",
|
"notes": "",
|
||||||
"hidden": false,
|
"hidden": false,
|
||||||
"required": false,
|
"required": false,
|
||||||
@ -25763,7 +25763,7 @@
|
|||||||
{
|
{
|
||||||
"name": "computer_name",
|
"name": "computer_name",
|
||||||
"description": "Friendly computer name (optional). For ChromeOS, if the extension wasn't force-installed by an enterprise policy this will default to 'ChromeOS' only",
|
"description": "Friendly computer name (optional). For ChromeOS, if the extension wasn't force-installed by an enterprise policy this will default to 'ChromeOS' only",
|
||||||
"type": "TEXT",
|
"type": "text",
|
||||||
"notes": "",
|
"notes": "",
|
||||||
"hidden": false,
|
"hidden": false,
|
||||||
"required": false,
|
"required": false,
|
||||||
@ -27515,7 +27515,7 @@
|
|||||||
{
|
{
|
||||||
"name": "name",
|
"name": "name",
|
||||||
"description": "Extension Name",
|
"description": "Extension Name",
|
||||||
"type": "TEXT",
|
"type": "text",
|
||||||
"notes": "",
|
"notes": "",
|
||||||
"hidden": false,
|
"hidden": false,
|
||||||
"required": false,
|
"required": false,
|
||||||
@ -27524,7 +27524,7 @@
|
|||||||
{
|
{
|
||||||
"name": "uuid",
|
"name": "uuid",
|
||||||
"description": "Extension UUID",
|
"description": "Extension UUID",
|
||||||
"type": "TEXT",
|
"type": "text",
|
||||||
"notes": "",
|
"notes": "",
|
||||||
"hidden": false,
|
"hidden": false,
|
||||||
"required": false,
|
"required": false,
|
||||||
@ -27533,7 +27533,7 @@
|
|||||||
{
|
{
|
||||||
"name": "version",
|
"name": "version",
|
||||||
"description": "Extension version",
|
"description": "Extension version",
|
||||||
"type": "TEXT",
|
"type": "text",
|
||||||
"notes": "",
|
"notes": "",
|
||||||
"hidden": false,
|
"hidden": false,
|
||||||
"required": false,
|
"required": false,
|
||||||
@ -27542,7 +27542,7 @@
|
|||||||
{
|
{
|
||||||
"name": "path",
|
"name": "path",
|
||||||
"description": "Extension path",
|
"description": "Extension path",
|
||||||
"type": "TEXT",
|
"type": "text",
|
||||||
"notes": "",
|
"notes": "",
|
||||||
"hidden": false,
|
"hidden": false,
|
||||||
"required": false,
|
"required": false,
|
||||||
@ -27551,7 +27551,7 @@
|
|||||||
{
|
{
|
||||||
"name": "publisher",
|
"name": "publisher",
|
||||||
"description": "Publisher Name",
|
"description": "Publisher Name",
|
||||||
"type": "TEXT",
|
"type": "text",
|
||||||
"notes": "",
|
"notes": "",
|
||||||
"hidden": false,
|
"hidden": false,
|
||||||
"required": false,
|
"required": false,
|
||||||
@ -27560,7 +27560,7 @@
|
|||||||
{
|
{
|
||||||
"name": "publisher_id",
|
"name": "publisher_id",
|
||||||
"description": "Publisher ID",
|
"description": "Publisher ID",
|
||||||
"type": "TEXT",
|
"type": "text",
|
||||||
"notes": "",
|
"notes": "",
|
||||||
"hidden": false,
|
"hidden": false,
|
||||||
"required": false,
|
"required": false,
|
||||||
@ -27569,7 +27569,7 @@
|
|||||||
{
|
{
|
||||||
"name": "installed_at",
|
"name": "installed_at",
|
||||||
"description": "Installed Timestamp",
|
"description": "Installed Timestamp",
|
||||||
"type": "BIGINT",
|
"type": "bigint",
|
||||||
"notes": "",
|
"notes": "",
|
||||||
"hidden": false,
|
"hidden": false,
|
||||||
"required": false,
|
"required": false,
|
||||||
@ -27578,7 +27578,7 @@
|
|||||||
{
|
{
|
||||||
"name": "prerelease",
|
"name": "prerelease",
|
||||||
"description": "Pre release version",
|
"description": "Pre release version",
|
||||||
"type": "INTEGER",
|
"type": "integer",
|
||||||
"notes": "",
|
"notes": "",
|
||||||
"hidden": false,
|
"hidden": false,
|
||||||
"required": false,
|
"required": false,
|
||||||
@ -27587,7 +27587,7 @@
|
|||||||
{
|
{
|
||||||
"name": "uid",
|
"name": "uid",
|
||||||
"description": "The local user that owns the plugin",
|
"description": "The local user that owns the plugin",
|
||||||
"type": "BIGINT",
|
"type": "bigint",
|
||||||
"notes": "",
|
"notes": "",
|
||||||
"hidden": false,
|
"hidden": false,
|
||||||
"required": false,
|
"required": false,
|
||||||
|
@ -31,7 +31,6 @@ module.exports = {
|
|||||||
let util = require('util');
|
let util = require('util');
|
||||||
|
|
||||||
let topLvlRepoPath = path.resolve(sails.config.appPath, '../');
|
let topLvlRepoPath = path.resolve(sails.config.appPath, '../');
|
||||||
|
|
||||||
require('assert')(sails.config.custom.versionOfOsquerySchemaToUseWhenGeneratingDocumentation, 'Please set sails.config.custom.sails.config.custom.versionOfOsquerySchemaToUseWhenGeneratingDocumentation to the version of osquery to use, for example \'5.8.1\'.');
|
require('assert')(sails.config.custom.versionOfOsquerySchemaToUseWhenGeneratingDocumentation, 'Please set sails.config.custom.sails.config.custom.versionOfOsquerySchemaToUseWhenGeneratingDocumentation to the version of osquery to use, for example \'5.8.1\'.');
|
||||||
let VERSION_OF_OSQUERY_SCHEMA_TO_USE = sails.config.custom.versionOfOsquerySchemaToUseWhenGeneratingDocumentation;
|
let VERSION_OF_OSQUERY_SCHEMA_TO_USE = sails.config.custom.versionOfOsquerySchemaToUseWhenGeneratingDocumentation;
|
||||||
|
|
||||||
@ -212,10 +211,6 @@ module.exports = {
|
|||||||
} else {// If the Fleet overrides JSON has column data for this table, we'll find the matching column and use the values from the Fleet overrides in the final schema.
|
} else {// If the Fleet overrides JSON has column data for this table, we'll find the matching column and use the values from the Fleet overrides in the final schema.
|
||||||
let columnHasFleetOverrides = _.find(fleetOverridesForTable.columns, {'name': osquerySchemaColumn.name});
|
let columnHasFleetOverrides = _.find(fleetOverridesForTable.columns, {'name': osquerySchemaColumn.name});
|
||||||
if(!columnHasFleetOverrides) {// If this column has no Fleet overrides, we'll add it to the final schema unchanged
|
if(!columnHasFleetOverrides) {// If this column has no Fleet overrides, we'll add it to the final schema unchanged
|
||||||
let columnWithNoOverrides = _.clone(osquerySchemaColumn);
|
|
||||||
if(osquerySchemaColumn.type !== undefined) {
|
|
||||||
columnWithNoOverrides.type = osquerySchemaColumn.type.toUpperCase();
|
|
||||||
}
|
|
||||||
mergedTableColumns.push(osquerySchemaColumn);
|
mergedTableColumns.push(osquerySchemaColumn);
|
||||||
} else { // If this table has Fleet overrides, we'll adjust the value in the merged schema
|
} else { // If this table has Fleet overrides, we'll adjust the value in the merged schema
|
||||||
let fleetColumn = _.clone(osquerySchemaColumn);
|
let fleetColumn = _.clone(osquerySchemaColumn);
|
||||||
@ -240,7 +235,7 @@ module.exports = {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
if(columnHasFleetOverrides.type !== undefined) {
|
if(columnHasFleetOverrides.type !== undefined) {
|
||||||
fleetColumn.type = _.clone(columnHasFleetOverrides.type.toUpperCase());
|
fleetColumn.type = _.clone(columnHasFleetOverrides.type.toLowerCase());
|
||||||
}
|
}
|
||||||
if(columnHasFleetOverrides.required !== undefined) {
|
if(columnHasFleetOverrides.required !== undefined) {
|
||||||
fleetColumn.required = _.clone(columnHasFleetOverrides.required);
|
fleetColumn.required = _.clone(columnHasFleetOverrides.required);
|
||||||
@ -282,6 +277,7 @@ module.exports = {
|
|||||||
if(typeof overrideColumnToAdd.type !== 'string') {
|
if(typeof overrideColumnToAdd.type !== 'string') {
|
||||||
throw new Error(`The osquery tables could not be merged with the Fleet overrides. The "type" for the "${fleetOverrideColumn.name}" column of the "${fleetOverridesForTable.name}" table is an invalid type (${typeof fleetOverrideColumn.type}). To resolve, change the value of a column's "type" to be a string.`);
|
throw new Error(`The osquery tables could not be merged with the Fleet overrides. The "type" for the "${fleetOverrideColumn.name}" column of the "${fleetOverridesForTable.name}" table is an invalid type (${typeof fleetOverrideColumn.type}). To resolve, change the value of a column's "type" to be a string.`);
|
||||||
}//•
|
}//•
|
||||||
|
overrideColumnToAdd.type = overrideColumnToAdd.type.toLowerCase();
|
||||||
} else {
|
} else {
|
||||||
throw new Error(`The osquery tables could not be merged with the Fleet overrides. The "${fleetOverrideColumn.name}" column added to the merged schema for the "${fleetOverridesForTable.name}" table is missing a "type" in the Fleet overrides schema. To resolve, add a type for this column to the Fleet overrides schema.`);
|
throw new Error(`The osquery tables could not be merged with the Fleet overrides. The "${fleetOverrideColumn.name}" column added to the merged schema for the "${fleetOverridesForTable.name}" table is missing a "type" in the Fleet overrides schema. To resolve, add a type for this column to the Fleet overrides schema.`);
|
||||||
}
|
}
|
||||||
@ -353,6 +349,7 @@ module.exports = {
|
|||||||
} else if(typeof columnToValidate.type !== 'string') {
|
} else if(typeof columnToValidate.type !== 'string') {
|
||||||
throw new Error(`Could not add a table from the Fleet overrides schema. The "type" of the "${columnToValidate.name}" column of the "${fleetOverrideToPush.name}" table at ${path.resolve(topLvlRepoPath+'/schema/tables', fleetOverrideToPush.name+'.yml')} has an invalid value. (expected a string, but got a ${typeof columnToValidate.type}) To resolve, change the value of the column's "type" be a string.`);
|
throw new Error(`Could not add a table from the Fleet overrides schema. The "type" of the "${columnToValidate.name}" column of the "${fleetOverrideToPush.name}" table at ${path.resolve(topLvlRepoPath+'/schema/tables', fleetOverrideToPush.name+'.yml')} has an invalid value. (expected a string, but got a ${typeof columnToValidate.type}) To resolve, change the value of the column's "type" be a string.`);
|
||||||
}//•
|
}//•
|
||||||
|
columnToValidate.type = columnToValidate.type.toLowerCase();
|
||||||
|
|
||||||
if(!columnToValidate.description) {
|
if(!columnToValidate.description) {
|
||||||
throw new Error(`Could not add a new table from the Fleet overrides schema. The "${columnToValidate.name}" column of the "${fleetOverrideToPush.name}" table is missing a "description". To resolve add a "description" property to the "${columnToValidate.name}" column at ${path.resolve(topLvlRepoPath+'/schema/tables', fleetOverrideToPush.name+'.yml')}`);
|
throw new Error(`Could not add a new table from the Fleet overrides schema. The "${columnToValidate.name}" column of the "${fleetOverrideToPush.name}" table is missing a "description". To resolve add a "description" property to the "${columnToValidate.name}" column at ${path.resolve(topLvlRepoPath+'/schema/tables', fleetOverrideToPush.name+'.yml')}`);
|
||||||
|
Loading…
Reference in New Issue
Block a user