Skip to content

fix(firmware): recommend the operation-specific engine - #8513

Closed
ShuaixinHuang wants to merge 1 commit into
morluto:mainfrom
ShuaixinHuang:codex/fix-firmware-capability-recovery
Closed

ShuaixinHuang wants to merge 1 commit into
morluto:mainfrom
ShuaixinHuang:codex/fix-firmware-capability-recovery

Conversation

@ShuaixinHuang

@ShuaixinHuang ShuaixinHuang commented Nov 1, 2026 •

Copy link
Copy Markdown
Contributor

Superseded by #8636 at the author's request: #8636 . The replacement reuses the same published branch and HEAD. This closed PR preserves the original discussion and historical validation.

Summary

Fixes #8507. Firmware capability discovery previously suggested either Binwalk or Unblob for either missing operation, although inspection requires Binwalk and extraction requires Unblob. Recovery now names only the engine that can enable the requested operation, its audited release line, util-linux prlimit and procps ps. Extraction alone additionally names the format-specific external extractor.

Change and scope

A typed FIRMWARE_OPERATION_ENGINES map owns the existing operation-to-engine contract. Capability recovery, firmware execution, CLI evidence attribution and the named tool descriptions consume it instead of repeating independent engine selection. The existing availability flags and unsupported-host precedence are retained. Product documentation explains that the other engine cannot enable an unavailable operation.

This is a correction to discovery guidance for existing capabilities. No new provider, target execution, installation, extraction behavior, process authority, cleanup policy, schema or resource-limit change. A new maintainer scope decision is not applicable.

Evidence and regression coverage

Baseline: aa48d494e9726d469a1b9ed917f021d8a1a4c7ea. Windows x64, Node 24.22.1; npm available in this session was 10.9.3 rather than the repository's pinned 11.16.0. No dependencies were installed or changed.

  • Before the production fix, the complete capability-inventory file had 3 failures / 49 passes. Both missing-engine directions failed because remediation also named the wrong alternative; the both-engines control passed.
  • After the fix, 82/82 tests passed across three complete files: CapabilityInventory, FirmwareVersion and FirmwareAnalysisService.
  • The four policy combinations cover neither engine, Binwalk only, Unblob only and both. Assertions check operation-specific configuration names, host prerequisites, extraction-only dependencies, available/null-remediation controls and full/compact availability round-trip. Existing unsupported-host cases pass.
  • npm run check:fast: 2/2 tasks passed, 47.419 seconds.
  • Formatting and git diff --check passed.
  • Remote tree d239337e437e2c1000616fa39a8b743efaf0f90e exactly matches the locally validated commit tree.

Representative capability recovery now says:

  • Inspection: REA_BINWALK_COMMAND (Binwalk 3.1.x (verified with 3.1.0)), prlimit and procps ps.
  • Extraction: REA_UNBLOB_COMMAND (Unblob 26.6.x (verified with 26.6.4)), prlimit, procps ps and the selected format's external extractor.

These are executed shared capability-projection tests with controlled configuration facts. No real Binwalk/Unblob installation, Linux firmware execution, extraction, or new compiled CLI/MCP run is claimed. Hosted CI for this new PR remains pending.

Author readiness

Human owner: @ShuaixinHuang

  • I reviewed the final diff and relevant existing code, understand the change and its edge cases, and take responsibility for the complete PR, including AI-assisted work.
  • I checked the evidence above, confirmed it supports the current change, and recorded meaningful validation gaps.
  • I declare this PR ready for initial maintainer review.

Before merge

  • This PR addresses a concrete problem or an agreed enhancement.
  • Material scope and authority questions are resolved, and any required maintainer scope decision covers the final diff.
  • The PR has one focused outcome and the title follows type(scope): outcome.
  • Related issue is linked, or the reason for not linking one is stated above.
  • Tests cover changed observable behavior and meaningful failure paths.
  • Owning docs, contracts, and generated metadata are updated where needed.
  • User-visible CLI/MCP changes include representative output.
  • I checked the final diff for secrets, unrelated cleanup, and unsupported claims.

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 1, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-11-01T13:55:29.449318Z 5dbe368 PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@greptile-apps

greptile-apps Bot commented Nov 1, 2026 •

Copy link
Copy Markdown
Contributor

RetriggerView in GreptileConfidence Score: 5/5 Tier: apex

[Medium impact] The changes appear safe to merge; recovery now names the correct engine without changing execution.

Summary

Firmware discovery now recommends Binwalk for inspection and Unblob for extraction.

  • Firmware recovery names the engine that enables each operation.

Diagram

%%{init: {'theme': 'neutral'}}%%
flowchart LR
  Map["Operation-to-engine map"] --> Recovery["Capability recovery"]
  Map --> Execution["Firmware execution"]
  Map --> CLI["CLI evidence attribution"]
  Map --> Descriptions["Tool descriptions"]
Loading

Reviews (1) · Last reviewed commit: "fix(firmware): recommend the operation-s..." · Reviewed by Greptile

@morluto morluto added bug Something isn't working area: native Native analysis and decompilation, including Ghidra, IDA, and Hopper analysis behavior labels Nov 23, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area: native Native analysis and decompilation, including Ghidra, IDA, and Hopper analysis behavior bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug] Firmware capability recovery recommends the wrong alternative engine

2 participants