fix(firmware): accept the verified Binwalk and Unblob release lines (#844)
* fix(firmware): accept the verified Binwalk and Unblob release lines Exact --version equality rejected every build except Binwalk 3.1.0 and Unblob 26.6.4, then stored that constant as the observed engine version. Admit the 3.1 and 26.6 lines, keep the audited build as verified, and report the banner that actually ran. * chore(docs): regenerate skill metadata after firmware contract text docs:check failed because SKILL.md lagged the Binwalk/Unblob release-line tool descriptions. --------- Co-authored-by: Cursor Agent <cursoragent@cursor.com>
This commit is contained in:
@@ -340,6 +340,37 @@ it("retains an uncertain workspace and blocks new launches after cleanup failure
|
||||
expect(fixture.launches).toHaveLength(1);
|
||||
});
|
||||
|
||||
it("accepts another build on the verified release line and reports it", async () => {
|
||||
const fixture = await firmwareFixture("normal", "binwalk 3.1.2");
|
||||
const result = await fixture.service.execute("inspect_firmware_regions", {
|
||||
path: fixture.path,
|
||||
});
|
||||
if (!result.ok) throw result.error;
|
||||
expect(result.value.provider.version).toBe("3.1.2");
|
||||
expect(result.value.limitations.join("\n")).toContain(
|
||||
"verified against 3.1.0",
|
||||
);
|
||||
expect(result.value.normalized_result).toMatchObject({
|
||||
engine: { version: "3.1.2" },
|
||||
});
|
||||
await assertFirmwareCleanup(fixture.launches);
|
||||
});
|
||||
|
||||
it("names the accepted release line when the banner is another line", async () => {
|
||||
const fixture = await firmwareFixture("normal", "binwalk 3.2.0");
|
||||
const result = await fixture.service.execute("inspect_firmware_regions", {
|
||||
path: fixture.path,
|
||||
});
|
||||
expect(result).toMatchObject({
|
||||
ok: false,
|
||||
error: {
|
||||
_tag: "AnalysisCapabilityUnavailableError",
|
||||
reason: expect.stringContaining("Binwalk 3.1.x"),
|
||||
},
|
||||
});
|
||||
await assertFirmwareCleanup(fixture.launches);
|
||||
});
|
||||
|
||||
it("rejects absent or unsupported engines without installing anything", async () => {
|
||||
const missing = await new FirmwareAnalysisService(
|
||||
new FirmwareProvider({}),
|
||||
|
||||
Reference in New Issue
Block a user