Skip to content

Enhance/native hw detection#2

Merged
prabhu merged 7 commits into
mainfrom
enhance/native-hw-detection
May 13, 2026
Merged

Enhance/native hw detection#2
prabhu merged 7 commits into
mainfrom
enhance/native-hw-detection

Conversation

@prabhu
Copy link
Copy Markdown
Member

@prabhu prabhu commented May 13, 2026

No description provided.

prabhu added 6 commits May 13, 2026 16:11
…ci, display, and bluetooth components

Signed-off-by: Prabhu Subramanian <prabhu@appthreat.com>
…B metadata

- Add lsusb -v, cpupower frequency-info, and cpupower idle-info collectors
- Parse and merge richer USB descriptor data (class, power, interfaces)
- Parse cpupower frequency/idle output for driver, governor, boost, idle states
- Emit new CPU properties: frequency/idle driver, governor, boost, idle state summary
- Emit new USB properties: product name, serial, power, interface classes, configuration/interface counts
- Emit additional battery/power supply telemetry (voltage, current, energy, charge, scope, design capacity %)
- Update tests for extended hardware metadata extraction and normalization

Signed-off-by: Prabhu Subramanian <prabhu@appthreat.com>
…ter and connector metadata

Signed-off-by: Prabhu Subramanian <prabhu@appthreat.com>
… EDID decode command support and diagnostics

Signed-off-by: Prabhu Subramanian <prabhu@appthreat.com>
…noisy stderr warnings

- Add probeOptionalLinuxCommand to detect optional command availability (e.g. edid-decode) before execution
- Suppress command-warning diagnostics for generic stderr when stdout is usable
- Update SECURITY.md and THREAT_MODEL.md to document new commands and evidence properties
- Export getInstallHint for install diagnostics
- Add test for noisy stderr suppression in runCommand

Signed-off-by: Prabhu Subramanian <prabhu@appthreat.com>
…smem command diagnostics and document command diagnostic handling

Signed-off-by: Prabhu Subramanian <prabhu@appthreat.com>
Copilot AI review requested due to automatic review settings May 13, 2026 16:31
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR significantly expands the Linux native hardware detection capabilities of cdx-hbom, adding a broad range of new collectors and parsers for Thunderbolt, modems, DRM info, UPower, fwupd, EDID-decode, cpupower, and verbose USB, along with a new command diagnostics infrastructure that classifies command failures and provides install hints. It also introduces a controlled sudo -n retry path for privileged enrichment and merges new sources into existing hardware components.

Changes:

  • New Linux command collectors and parsers (lsusb -v, cpupower frequency/idle, drm_info, upower --dump, fwupdmgr, boltctl, mmcli, edid-decode) feeding new component classes (thunderbolt-device, modem, firmware-device) and enriching existing ones.
  • Command diagnostic infrastructure in src/common/command.js with failure classification (missing-command, permission-denied, partial-support, timeout), install hints, suppression of low-value noise, and optional sudo -n retry gated by a privilege field on each CommandSpec.
  • Documentation, threat model, README, and CLI changes to surface the new properties, privilege model, and per-command diagnostics on stderr.

Reviewed changes

Copilot reviewed 10 out of 12 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
src/linux/common/index.js Adds new parsers, merge helpers, and component creators for Thunderbolt, modems, DRM info, UPower, fwupd, EDID-decode, and lshw enrichment.
src/linux/common/commands.js Adds new command specs and a privilege field used by the runner; includes the edid-decode template spec.
src/common/command.js Implements failure classification, install hints, suppressed-diagnostic handling, and sudo -n retry for optional/required privileged commands.
bin/cdx-hbom.js Emits aggregated command diagnostics to stderr without polluting JSON stdout.
index.js Wires new collectors and diagnostics into the public build entry.
test/linux.test.js Adds comprehensive parser and end-to-end build tests for all new enrichment paths.
test/command.test.js New tests covering classification, install hints, and sudo retry behavior.
test/commands.test.js Tests new command specs and their privilege/purpose metadata.
docs/hardware-properties.md Documents newly emitted properties across enriched component classes.
docs/THREAT_MODEL.md / SECURITY.md / README.md Documents the privilege model, diagnostics surface, and new collectors.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread src/linux/common/commands.js Outdated
…per-device and per-interface runtime substitution

Signed-off-by: Prabhu Subramanian <prabhu@appthreat.com>
@prabhu prabhu merged commit 7b729ea into main May 13, 2026
3 checks passed
@prabhu prabhu deleted the enhance/native-hw-detection branch May 13, 2026 16:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants