Repository navigation
fix(ghidra): reject contradictory NativeAOT reports - #759
kaoru0822-kitauji wants to merge 1 commit into
Conversation
|
Reviewed: non-recovery invariant (not_applicable/unsupported/failed must have non-blank reason, method_tables:0, no types/derived_memory/coverage payloads) is correctly placed entirely in src/ghidra/extensions/nativeaot/ before Evidence admission — no domain/app/contract change, failure reasons preserved as distinct messages, no identity guessing. Honest scoping with no real-Ghidra claim, 44 targeted tests. APPROVE. Two minor suggestions: parametrize the new test over all three statuses (currently only not_applicable), and add a positive test that discovery/version fields on non-recovery still validate. |
Review — APPROVERelated #743. Summary
Verification
Suggestions (minor, non-blocking)
|
cae7282 to
8b4db34
Compare
8b4db34 to
919992a
Compare
|
Superseded by #815, which integrated this change and has now merged (3af3811). Thanks @kaoru0822-kitauji for the fix and tests — much appreciated! |
Summary
Reject NativeAOT extension reports whose non-recovery status contradicts their payload. A report labeled
not_applicable,unsupported, orfailedmust now include an actionable nonblank reason, report zero method tables, and omit recovered type, derived-memory, and coverage payloads.Problem and expected behavior
The NativeAOT adapter validator previously applied recovery-shape checks only to
completeandpartialreports. A producer response could therefore claimnot_applicablewhile reporting recovered method tables, or omit the reason for that unavailable outcome, and still pass the authenticated bridge handshake. That lets contradictory producer metadata enter the session evidence boundary.The validator should reject those reports as malformed while preserving discovery/version fields that a legitimate failed or unsupported analysis may have observed before stopping.
Change and scope
Related to #743.
Contract and boundary impact
Evidence and regression coverage
validateGhidraExtensionResultsreturnednullfor anot_applicablereport withmethod_tables: 1.Validation performed
vitest run src/ghidra/extensions/GhidraExtensions.test.ts src/ghidra/GhidraProvider.behavior.test.ts --coverage.enabled=false— 46 passed.npm exec [email protected] -- tsc --noEmit— passed.npm run lint— passed with existing repository warnings and no changed-file warnings.npm run lint -- --deny-warnings <changed files>— passed.npm run knip— passed.npm run metadata:check— passed.oxfmt --checkandgit diff --check— passed.npm run checkcould not complete in this container because the repository TypeScript 7 binary requires/proc/self/exe, which is unavailable here. A separate whole-tree formatter scan also encountered the environment's unavailable resident-memory syscall while checking an unrelated fixture; changed-file formatting passed.Compatibility, safety, and release
Review checklist
type(scope): outcome.