feat(audit): 1.2 — board collector (dmidecode types 0, 1, 2)

- board.go: collectBoard(), parseBoard(), parseBIOSFirmware(), parseDMIFields(), cleanDMIValue()
- Reads System Information (type 1): serial, manufacturer, product_name, uuid
- Reads Base Board Information (type 2): part_number
- Reads BIOS Information (type 0): firmware version record
- cleanDMIValue strips vendor placeholders (O.E.M., Not Specified, Unknown, etc.)
- board_test.go: 6 table/case tests with dmidecode fixtures in testdata/
- collector.go: wired board + BIOS firmware into snapshot

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-03-05 10:35:14 +03:00
parent a4f70b17f0
commit f1e392a7fe
7 changed files with 341 additions and 1 deletions

View File

@@ -0,0 +1,25 @@
# dmidecode 3.5
Getting SMBIOS data from sysfs.
SMBIOS 3.1.1 present.
Handle 0x0000, DMI type 0, 26 bytes
BIOS Information
Vendor: American Megatrends Inc.
Version: 06.08.05
Release Date: 12/20/2023
Address: 0xF0000
Runtime Size: 64 kB
ROM Size: 32 MB
Characteristics:
PCI is supported
PCI Express is supported
BIOS is upgradeable
BIOS shadowing is allowed
Selectable boot is supported
ACPI is supported
USB legacy is supported
BIOS boot specification is supported
Targeted content distribution is supported
UEFI is supported
BIOS Revision: 5.22
Firmware Revision: 4.1

View File

@@ -0,0 +1,14 @@
# dmidecode 3.5
Getting SMBIOS data from sysfs.
SMBIOS 3.1.1 present.
Handle 0x0001, DMI type 1, 27 bytes
System Information
Manufacturer: Inspur
Product Name: NF5468M7
Version: To Be Filled By O.E.M.
Serial Number: CAR315KA0803B90
UUID: a1b2c3d4-e5f6-7890-abcd-ef1234567890
Wake-up Type: Power Switch
SKU Number: To Be Filled By O.E.M.
Family: To Be Filled By O.E.M.

View File

@@ -0,0 +1,14 @@
# dmidecode 3.5
Getting SMBIOS data from sysfs.
SMBIOS 3.1.1 present.
Handle 0x0001, DMI type 1, 27 bytes
System Information
Manufacturer: To Be Filled By O.E.M.
Product Name: To Be Filled By O.E.M.
Version: To Be Filled By O.E.M.
Serial Number: To Be Filled By O.E.M.
UUID: Not Settable
Wake-up Type: Power Switch
SKU Number: To Be Filled By O.E.M.
Family: To Be Filled By O.E.M.

View File

@@ -0,0 +1,15 @@
# dmidecode 3.5
Getting SMBIOS data from sysfs.
SMBIOS 3.1.1 present.
Handle 0x0002, DMI type 2, 15 bytes
Base Board Information
Manufacturer: Inspur
Product Name: YZCA-02758-105
Version: To Be Filled By O.E.M.
Serial Number: CAR315KA0803B90
Asset Tag: To Be Filled By O.E.M.
Features:
Board is a hosting board
Location In Chassis: To Be Filled By O.E.M.
Type: Motherboard