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

@@ -17,7 +17,11 @@ func Run() schema.HardwareIngestRequest {
snap := schema.HardwareSnapshot{}
// collectors are added here in subsequent steps (1.2 1.10)
board, biosFW := collectBoard()
snap.Board = board
snap.Firmware = append(snap.Firmware, biosFW...)
// remaining collectors added in steps 1.3 1.10
slog.Info("audit completed", "duration", time.Since(start).Round(time.Millisecond))