Back to Wazuh

Flatbuffer schemas

docs/ref/modules/vulnerability-scanner/flatbuffers.md

4.14.58.2 KB
Original Source

Flatbuffer schemas

The Vulnerability Detector makes use of the FlatBuffers tool. FlatBuffers is a library that enables high-performance data serialization and deserialization without the need of unpacking or parsing, providing direct access to the required information.

Although the synchronization events received by Remoted are in JSON format, the event data needs to be augmented with additional agent context within this module. As a result, deserializing and re-serializing the data becomes unavoidable.

Another key use of FlatBuffers in the Vulnerability Detector module is for vulnerability feeds processing, specifically those following the CVE5 schema. In this case, FlatBuffers are used to avoid the deserialization overhead during scanning.

Due to the nature of FlatBuffers, the deserialization cost is significantly lower compared to JSON, regardless of the JSON library used. This makes FlatBuffers particularly well-suited for scanning operations, where deserialization performance is a critical factor.

Flatbuffer schemas

Common AgentInfo table

  • Common agent information for FIM Delta, Inventory Delta and Synchronization events.
TableFieldTypeDescription
AgentInfoagent_idstringUnique identifier of the agent, e.g., "001".
agent_ipstringIP address of the agent.
agent_namestringName assigned to the agent.
agent_versionstringVersion of the agent software, e.g., "v4.10.2".

Inventory Delta table

  • Main table in flatbuffer schema for inventory Delta events.
TableFieldTypeDescription
Deltaagent_infoAgentInfoInformation about the agent.
dataProviderData changes in the agent.
operationstringType of operation performed (e.g., INSERTED, MODIFIED, DELETED).

Inventory Provider union table

  • Provider union table for inventory delta events. (Vulnerability scanner only process osinfo, packages, and hotfixes events).
TableTypeDescription
Provider (Union)dbsync_osinfoHost operating system.
dbsync_packagesInstalled packages.
dbsync_hotfixesInstalled hotfixes.

Inventory providers

  • Provider tables for inventory delta events.
TableFieldTypeDescription
dbsync_hotfixeshotfixstringName or identifier of the applied hotfix.
dbsync_osinfohostnamestringSystem hostname.
architecturestringCPU architecture (e.g., x86_64, ARM).
os_namestringOperating system name.
os_versionstringFull OS version.
os_codenamestringOS codename (if applicable).
os_majorstringMajor version number.
os_minorstringMinor version number.
os_patchstringPatch level of the OS.
os_buildstringBuild number of the OS.
os_platformstringPlatform name (e.g., Debian, RedHat).
sysnamestringSystem kernel name.
releasestringKernel release version.
versionstringKernel version.
os_releasestringDistribution-specific release information.
os_display_versionstringHuman-readable OS version.
dbsync_packagesnamestringPackage name.
versionstringPackage version.
vendorstringVendor or maintainer of the package.
install_timestringInstallation timestamp.
locationstringPath where the package is installed.
architecturestringPackage architecture.
groupsstringPackage category or group.
descriptionstringDescription of the package.
sizelongSize of the package in bytes.
prioritystringPriority of the package.
multiarchstringMultiarchitecture support.
sourcestringSource of the package.
formatstringFormat of the package.
item_idstringUnique identifier for the package entry.

SyncMsg table

  • Main table in flatbuffer schema for synchronization events.
TableFieldTypeDescription
SyncMsgagent_infoAgentInfoEvent type description.
dataDataUnionData changes in the agent.

DataUnion table union

  • DataUnion table union for synchronization events.
TableTypeDescription
DataUnion (Union)stateNetwork interfaces description.
integrity_clearHardware information.

State table

  • State event type for synchronization events.
TableFieldTypeDescription
stateattributesAttributesUnionAggregated attributes of the entity.
indexstringIndex of the entity.
pathstringAbsolute path of the file or registry entry.
value_namestringName of the registry value.
archstringSystem architecture (x86, x64).

AttributesUnion table union

  • Different event component types for synchronization events.
TableTypeDescription
AttributesUnionsyscollector_hotfixesEquivalent to dbsync_programs.
syscollector_osinfoEquivalent to dbsync_osinfo .
syscollector_packagesEquivalent to dbsync_packages .

Integrity clear table

  • Integrity clear event for synchronization events.
TableFieldTypeDescription
integrity_clearattributes_typestringRemoves information for specific provider