Files
Samsara/schemas/inventory-v1.schema.json
oceans2alaska b4c0cf12ca Retain infrastructure names and share/mount roots behind policy switches
Add a `retain` block to privacy_policy.json (all on by default) so assessments
show software, services, processes, tasks, shares/mounts and private peer IPs.
Values pass an identifier-pattern filter (digit runs, SSN/phone, e-mail, charset,
length, path depth). Accounts, command lines, child paths, filenames and public
peer IPs stay omitted. Linux collector and Windows PowerShell collectors updated;
tests cover retention, withholding and all-switches-off.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-11-04 19:03:49 -08:00

563 lines
14 KiB
JSON

{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"title": "Samsara inventory v1",
"type": "object",
"required": [
"schema_version",
"synthetic",
"collected_at",
"server",
"checks",
"inventory"
],
"additionalProperties": false,
"properties": {
"schema_version": {
"const": "1.0"
},
"synthetic": {
"type": "boolean"
},
"collected_at": {
"type": "string",
"format": "date-time",
"maxLength": 8192
},
"server": {
"type": "object",
"required": [
"hostname"
],
"properties": {
"hostname": {
"type": "string",
"maxLength": 8192
},
"platform": {
"enum": [
"windows",
"linux"
]
},
"operating_system": {
"type": "string",
"maxLength": 8192
},
"os_version": {
"type": "string",
"maxLength": 8192
},
"os_build": {
"type": "string",
"maxLength": 8192
},
"kernel_version": {
"type": "string",
"maxLength": 8192
},
"collection_source": {
"type": "string",
"maxLength": 8192
},
"domain": {
"type": "string",
"maxLength": 8192
},
"product_type": {
"type": "integer"
},
"domain_joined": {
"type": [
"boolean",
"null"
]
},
"ip_addresses": {
"type": "array",
"items": {
"type": "string",
"maxLength": 8192
},
"maxItems": 20000
},
"network_adapters": {
"type": "array",
"items": {
"type": "string",
"maxLength": 8192
},
"maxItems": 20000
},
"last_boot": {
"type": "string",
"maxLength": 8192
}
},
"additionalProperties": false
},
"checks": {
"type": "object",
"additionalProperties": {
"type": "object",
"required": [
"status",
"message"
],
"properties": {
"status": {
"enum": [
"complete",
"partial",
"failed",
"not_collected"
]
},
"message": {
"type": "string",
"maxLength": 8192
},
"started_at": {
"type": "string",
"format": "date-time",
"maxLength": 8192
},
"completed_at": {
"type": "string",
"format": "date-time",
"maxLength": 8192
},
"errors": {
"type": "array",
"items": {
"type": "object",
"required": [
"code",
"scope",
"message"
],
"additionalProperties": false,
"properties": {
"code": {
"type": "string",
"maxLength": 8192
},
"scope": {
"type": "string",
"maxLength": 8192
},
"message": {
"type": "string",
"maxLength": 8192
}
}
},
"maxItems": 20000
},
"permission_limitations": {
"type": "array",
"items": {
"type": "string",
"maxLength": 8192
},
"maxItems": 20000
},
"limitations": {
"type": "array",
"items": {
"type": "string",
"maxLength": 8192
},
"maxItems": 20000
}
},
"additionalProperties": false
},
"required": [
"roles",
"services",
"network",
"tasks",
"software",
"storage",
"certificates"
],
"maxProperties": 30
},
"inventory": {
"type": "object",
"required": [
"roles",
"services",
"network",
"tasks",
"software",
"storage",
"certificates"
],
"properties": {
"roles": {
"type": "array",
"items": {
"type": "object",
"required": [
"name"
],
"properties": {
"name": {
"type": "string",
"maxLength": 8192
},
"display_name": {
"type": "string",
"maxLength": 8192
},
"state": {
"type": "string",
"maxLength": 8192
},
"feature_type": {
"type": "string",
"maxLength": 8192
}
},
"additionalProperties": false
},
"maxItems": 20000
},
"services": {
"type": "array",
"items": {
"type": "object",
"required": [
"name",
"state"
],
"properties": {
"name": {
"type": "string",
"maxLength": 8192
},
"state": {
"type": "string",
"maxLength": 8192
},
"display_name": {
"type": "string",
"maxLength": 8192
},
"startup": {
"type": "string",
"maxLength": 8192
},
"account": {
"type": "string",
"maxLength": 8192
},
"pid": {
"type": "integer"
},
"arguments": {
"type": "string",
"maxLength": 8192
},
"executable": {
"type": "string",
"maxLength": 8192
},
"PathName": {
"type": "string",
"maxLength": 8192
}
},
"additionalProperties": false
},
"maxItems": 20000
},
"network": {
"type": "array",
"items": {
"type": "object",
"required": [
"state",
"local_address",
"local_port",
"remote_address",
"remote_port"
],
"properties": {
"state": {
"type": "string",
"maxLength": 8192
},
"local_address": {
"type": "string",
"maxLength": 8192
},
"local_port": {
"type": "integer"
},
"remote_address": {
"type": "string",
"maxLength": 8192
},
"remote_port": {
"type": "integer"
},
"pid": {
"type": [
"integer",
"null"
],
"minimum": 0
},
"process": {
"type": "string",
"maxLength": 8192
},
"direction": {
"type": "string",
"maxLength": 8192
},
"remote_scope": {
"enum": [
"",
"loopback",
"host",
"unspecified",
"private",
"public"
]
}
},
"additionalProperties": false
},
"maxItems": 20000
},
"tasks": {
"type": "array",
"items": {
"type": "object",
"required": [
"name",
"enabled"
],
"properties": {
"name": {
"type": "string",
"maxLength": 8192
},
"enabled": {
"type": "boolean"
},
"path": {
"type": "string",
"maxLength": 8192
},
"account": {
"type": "string",
"maxLength": 8192
},
"triggers": {
"type": "string",
"maxLength": 8192
},
"state": {
"type": "string",
"maxLength": 8192
},
"executables": {
"type": "string",
"maxLength": 8192
},
"associated_unit": {
"type": "string",
"maxLength": 8192
},
"arguments": {
"type": "string",
"maxLength": 8192
},
"executable": {
"type": "string",
"maxLength": 8192
},
"PathName": {
"type": "string",
"maxLength": 8192
}
},
"additionalProperties": false
},
"maxItems": 20000
},
"software": {
"type": "array",
"items": {
"type": "object",
"required": [
"name"
],
"properties": {
"name": {
"type": "string",
"maxLength": 8192
},
"publisher": {
"type": "string",
"maxLength": 8192
},
"version": {
"type": "string",
"maxLength": 8192
},
"installation_date": {
"type": "string",
"maxLength": 8192
},
"registry_view": {
"type": "string",
"maxLength": 8192
}
},
"additionalProperties": false
},
"maxItems": 20000
},
"storage": {
"type": "array",
"items": {
"type": "object",
"required": [
"type",
"name",
"path"
],
"properties": {
"type": {
"type": "string",
"maxLength": 8192
},
"name": {
"type": "string",
"maxLength": 8192
},
"path": {
"type": "string",
"maxLength": 8192
},
"filesystem": {
"type": "string",
"maxLength": 8192
},
"special": {
"type": "boolean"
},
"capacity_gib": {
"type": [
"number",
"null"
]
},
"free_gib": {
"type": [
"number",
"null"
]
},
"observed_open_files": {
"type": "integer",
"minimum": 0
},
"observed_client_count": {
"type": "integer",
"minimum": 0
},
"activity_source": {
"type": "string",
"maxLength": 8192
},
"activity_observed_at": {
"type": "string",
"format": "date-time",
"maxLength": 8192
}
},
"additionalProperties": false
},
"maxItems": 20000
},
"certificates": {
"type": "array",
"items": {
"type": "object",
"required": [
"subject"
],
"properties": {
"subject": {
"type": "string",
"maxLength": 8192
},
"issuer": {
"type": "string",
"maxLength": 8192
},
"expires": {
"type": "string",
"maxLength": 8192
},
"thumbprint": {
"type": "string",
"maxLength": 8192
},
"store": {
"type": "string",
"maxLength": 8192
}
},
"additionalProperties": false
},
"maxItems": 20000
}
},
"additionalProperties": false
},
"privacy": {
"type": "object",
"additionalProperties": false,
"required": [
"profile",
"identities_omitted",
"paths",
"scope"
],
"properties": {
"profile": {
"const": "minimized-metadata-v1"
},
"identities_omitted": {
"const": true
},
"paths": {
"enum": [
"approved-roots-only",
"share-and-mount-roots-only"
]
},
"scope": {
"type": "string",
"maxLength": 8192
},
"retained": {
"type": "array",
"items": {
"type": "string",
"maxLength": 64
},
"maxItems": 20
}
}
}
}
}