mirror of
https://github.com/morluto/rea.git
synced 2026-11-28 23:28:35 +00:00
0bbdbeaedf3d73bd9dba2d2e4801c68725e3aa1e
1786
Commits
| Author | SHA1 | Message | Date | |
|---|---|---|---|---|
|
|
0bbdbeaedf | refactor(cli): share compiled runtime checks with the session worker (#14557) | ||
|
|
825fd0a19a | refactor(verifiers): reuse streamed digests for artifacts on disk (#14555) | ||
|
|
5bf09b6dff | refactor(ghidra): reuse the verifier file digest for fixture checks (#14554) | ||
|
|
41589492e0 |
refactor(ghidra): reuse the verifier MCP call binding (#14590)
* refactor(ghidra): reuse the verifier MCP call binding * test(ghidra): cover shared verifier call decoding |
||
|
|
aad3c9c45a | refactor(windows): reuse the verified package argument encoder (#14591) | ||
|
|
400f626e52 | Merge remote-tracking branch 'origin/main' into worktree-agent-a13528ab5112902c9 | ||
|
|
3280b1a669 |
ci(apple): run the macOS lane when a pull request changes a macOS-gated test
Pull requests ran the macOS lane only for its listed paths, so a change to a test gated to macOS never ran it before main's full sweep. The CI planner runs before dependencies are installed and cannot load the parser, so a dependency-free candidate test now admits every module that could gate a test to macOS: one that names a "darwin" or "linux" literal and has a skipIf/runIf gate or a case list chosen by a conditional on that literal. The planner selects the lane when a changed test at head is a candidate, and the exact discovery parses only candidates, so the two cannot disagree about a gated module. The test over-selects modules that are not gated; a deleted test selects nothing. |
||
|
|
123b693f08 |
feat(delivery)!: bound default results by an agent result budget (#14252)
* feat(delivery)!: bound default results by an agent result budget Omitted detail now returns complete Evidence only when it fits the new delivery.agent_result_budget_bytes runtime setting (default 49152 compact JSON bytes, about 12k tokens at an estimated 4 bytes per token). Larger results are retained and delivered as the producer's summary with a limitation naming the budget and the recovery call; nothing is refused or truncated. inspect_analysis_view gains an evidence-json view that pages the exact JSON text of retained Evidence. The CLI applies the same budget and publishes the complete bundle with --evidence_output. inspect_managed_members type_names now also narrows member_refs and exported_types, and inspect-byte-entropy gains CLI evidence delivery. BREAKING CHANGE: An omitted detail no longer always returns complete Evidence inline on MCP or the CLI for tools with a detail selector (including inspect_managed_members, inspect_managed_artifact, inspect_byte_entropy, inspect_artifact, analyze_javascript_application, list_procedures, list_strings and the other operations listed in src/domain/agentBudgetOperations.ts). Over the budget they return the retained summary; pass detail complete (--detail complete) for complete inline delivery. inspect_managed_members type_names narrows member_refs and exported_types. Fixes #14172 Fixes #14180 Part of #14187 Part of #14156 * test(schemas): record advertised summaries for budgeted detail * fix(delivery): keep budgeted summaries canonical and carry delivery facts beside them Review fixes for the agent result budget: - Deliver the producer's own summary record, identical to detail summary, so its identity holds in summary consumers such as compare_artifacts. The budget, sizes, retention and the exact paging call travel as delivery facts: a second MCP text block and _meta, or a delivery field in CLI output. - Capture the caller's detail for application-validated tools too, so inspect_binary_layout and similar tools are budgeted. - Keep recovery facts when a budgeted summary itself exceeds the frame. - Size an omitted evidence-json limit by escaped UTF-8 bytes and never split a surrogate pair, even in a one-unit page. - Add the REA_AGENT_RESULT_BUDGET_BYTES launch seed; the shared test environment raises it for semantic tests, and budget tests clear it. - Align tool descriptions and verifiers that read complete Evidence. * fix(delivery): retain the budgeted summary like an explicit summary * fix(delivery): read the budget seed from the captured environment and count delivery facts in the frame - The agent result budget seed is read from the environment the server or CLI invocation captured: ToolResultDelivery takes it at construction, and a CLI invocation binds it in its publication context. The ambient process environment is no longer read. - The frame check reserves the bytes of the delivery block and _meta that are added after encoding, so a budgeted response cannot exceed the frame. - Conformance workflows that resend complete Evidence raise the budget through the shared inline-Evidence environment, as do the artifact and binary layout verifiers. * fix(delivery)!: request complete Evidence explicitly and never spill CLI overflow - Shared test and verifier environments no longer raise the agent result budget. Every test and verifier workflow that reads complete Evidence from a budgeted tool now requests it with detail complete or --detail complete, including the real-provider verifiers outside PR CI (Ghidra, Hopper, IDA, Kuna and client verifiers). Default delivery is exercised as shipped. - Budgeting applies only to tools with a detail selector, so every budgeted call has a complete opt-out. - CLI overflow without --evidence_output writes nothing; its delivery facts carry exact rerun argv for --detail complete and --evidence_output, omitted when the command declares sensitive values. * test(delivery): prove captured budget seeds with valid in-range values * test: state complete-detail requests once and fix codemod regressions - Add tests/support/completeDetail.ts with COMPLETE_DETAIL and completeArguments so tests that read complete Evidence request it in one place, keeping functions within max-lines-per-function without raising the limit. - Restore provider-client tests (GhidraClient, Hopper health): their callTool("name", ...) calls are bridge requests, not MCP tools, and take no detail. - Update the game-scale type inventory test for member_refs narrowing. * test: request complete Evidence in shared JavaScript analysis helpers and remaining CLI workflows * test: request complete Evidence by default in the shared test transports The shared MCP client helpers (createTestMcp, connectLocalToolsMcp and the CLI fixture's shared MCP session) and the CLI runners (the cli fixture and the shared CLI session) now apply one named default, completeEvidenceByDefault. A budgeted tool called with neither detail nor view gets detail complete; the CLI does the same with --detail complete, chosen by the command's tool contract. A budgeted operation that resolves to no contract fails loudly at load. Tests whose subject is delivery opt out with delivery "budgeted". This is a test-harness choice; production delivery is unchanged and the budget tests prove the default path. Per-call complete-detail edits are reverted in the 204 test files whose transports all apply the default. Explicit requests remain where a test drives its own SDK client, server, CLI instance or process, and where the detail choice is the test's subject. * test: resolve CLI complete-detail defaults from the CLI registry The Real Apple and browser verifiers read complete Evidence through artifactCliEvidence, which ran the compiled CLI without a detail choice and got the budgeted {summary, delivery} output. The helper now requests complete Evidence for commands that take --detail, read from the compiled CLI's own registry (scripts/lib/complete-evidence-cli.mjs). The test harness default had a sibling bug: it treated every cli-flagged budgeted contract as taking --detail, but only Evidence-delivery commands do (inspect-binary-layout does not). It now reads the source CLI registry too, and covers every command the CLI budgets. * test(verifiers): request complete Evidence at each verifier's SDK client and CLI argv The real-browser failure was the same missing normalized_result as the Apple one: browser-capture-metadata-budget-e2e reads analyze-web-bundle through artifactCliEvidence, fixed in the previous commit. The shared verifier module, scripts/lib/complete-evidence.mjs, now owns both transports: - completeEvidenceClient wraps each verifier's SDK Client once, so every callTool to a budgeted tool with neither detail nor view requests complete Evidence, whatever local call helper a verifier uses (86 clients, including the Ghidra, Hopper, IDA and Kuna verifiers' argument-less list_procedures and inspect_native_load_image calls). - completeEvidenceCliArguments covers the remaining verifier CLI argv that chose no detail, such as function, decompile, analyze and the Android and Apple commands. Commands and tools that are not budgeted are sent as written. * test(delivery): await async completeEvidenceCliArguments helper in boundary test * test(delivery): request complete detail in Electron CLI artifact format test * docs(delivery): document delivery.rerun as add-only argument arrays * test(schemas): record advertised summaries for the unified delivery budget Tool descriptions now name the agent result budget, and the evidence-json default page is derived from the 32 KiB default, which changes the advertised input digests of the 28 affected tools. Recorded from the Build package job's output. * test(delivery): pin the budget boundary and keep failures unbudgeted Main's retainedSummaryDelivery tests pinned the size decision at exactly 32,768 and 32,769 UTF-8 JSON bytes. Unifying that decision into budgetedSummaryBytes deleted them, and their port never landed, so the byte measurement went unchecked. Restore them against budgetedSummaryBytes at the configured budget and one byte over, for the default and a runtime budget, with ASCII, escaped and multibyte text, plus each condition of the decision. Off-by-one mutants (< for <=, a cap one byte short) fail six cases; measuring UTF-16 code units instead of UTF-8 bytes fails the multibyte cases. An MCP case pins that a target failure from a budgeted tool under the minimum budget is identical with detail omitted and complete, with no delivery facts. * test(verifiers): route literal CLI argv for budgeted commands through complete Evidence real-browser failed with "Scenario CLI did not report external disconnect ownership": runScenarioCli ran capture-browser-scenario without --detail, so an over-budget capture came back as its summary, which has no browser.cleanup. The earlier sweep counted these files as covered because their MCP clients were wrapped, but their CLI argv was not. Route the shared runScenarioCli helper (five callers), the local cli helpers in the module, source-map and script-export verifiers, and every other literal argv for a budgeted CLI command without --detail or --view (EVM interface, binary layout, packet capture, devicetree, DOM destinations, Ghidra relocation symbols, WABT cleanup, Termux browser) through completeEvidenceCliArguments. A sweep of scripts/ for budgeted command literals with --json and no detail selection now finds none. * fix(verifiers): leave clients without callTool unwrapped The native verifier cleanup test drives native-value-e2e with a connection double whose Client has only connect and close. completeEvidenceClient bound client.callTool unconditionally, so wrapping threw a TypeError before connect ran. That TypeError replaced the primary connection failure the test asserts is preserved, and all four fault cases failed in Test shard 5 and Portable tests. A client without callTool has no tool call to complete, so the helper now returns it unchanged. Locally all five fault modes of the fixture now exit 0. * fix(delivery): keep the catalog recorder on shipped helpers and expect view-implied summary The verifier sweep wrapped record-mcp-catalog.mjs in completeEvidenceClient, which lives in an unshipped helper. deferredRuntime copies only the package's shipped files plus the recorder, so the recorder failed to load (ERR_MODULE_NOT_FOUND) and its cleanup recorder never wrote. The recorder only lists tools and prompts, so the wrapper had no effect; it is removed. This branch makes a view with no --detail select summary delivery, as MCP does for a view. Three CLI cases still expected the old view refusal; with a view alone the missing input is now the summary bundle, so they expect evidence_output, and a view with --detail complete still refuses the view. * fix(delivery): request complete Evidence where callers need the whole result Budgeted delivery made four callers receive a summary they cannot use: - The GitHub Actions example uploads the analysis as a CI artifact, so it now asks for --detail complete; over budget it had saved a summary. - javascriptIntegrityPolicyCli spawns the CLI itself, outside the test harness default, and reads normalized_result; it now applies the same completeEvidenceCliArguments default. - nativeObservationViewsMcp builds its own client to prove complete observations overflow into a paging continuation; it now applies the harness default so each call asks for complete Evidence. - The CLI parity goldens are re-recorded for the --detail and --evidence_output options the budgeted commands now advertise. * fix(tests): give processes tests spawn the largest agent result budget About 90 tests spawn scripts/rea.mjs or a server directly, outside the harness default that asks for complete Evidence, and read analysis facts from the result. Over the default budget they received a summary instead; javascriptChildHandleOwnership failed this way. The Vitest environment now seeds REA_AGENT_RESULT_BUDGET_BYTES with the largest accepted value, so a spawned CLI or server delivers complete Evidence, as the in-process default does. Delivery tests keep their own budget: agentResultBudgetMcp builds its server without the seed, so its default-budget cases still exercise the shipped default. * fix(tests): give budgeted harness tests the shipped agent result budget The test environment seeds the largest agent result budget so spawned processes deliver complete Evidence. In-memory servers built by createApplicationMcpHarness (and connectGhidraMcp, which uses it) inherit process.env too, so a test that chose testDelivery "budgeted" kept the seed: the 600-row list_procedures case and the omitted-detail web page views returned complete Evidence instead of a summary. testDeliveryEnvironment now owns that choice: a budgeted test's server environment drops the seed and uses the shipped default. The application harness applies it to every server it builds. * fix(tests): expect view-implied summary delivery in the Playwright trace refusal A view with no --detail now selects summary delivery, so its refusal names the missing evidence_output bundle; --detail complete still refuses the view. The trace test still expected a view refusal in both cases. |
||
|
|
a2989e6c4b | Merge remote-tracking branch 'origin/main' into worktree-agent-a13528ab5112902c9 | ||
|
|
fa2776d065 |
ci(apple): discover and run every macOS-gated test on macOS
Tests gated with skipIf/runIf to macOS never ran on the Linux lanes and only ran on macOS when hand-picked, so they went stale. A small owned script parses each tracked test with @babel/parser and evaluates its skipIf/runIf conditions (and platform-conditional for/each case lists) for linux and darwin with three-valued logic, listing the tests that are skipped on Linux and may run on macOS. The apple-artifacts job runs all of them; the hand-picked step keeps only the ungated tests. |
||
|
|
150d6f0e19 | refactor(verifiers): share legacy Ghidra snapshot construction (#14566) | ||
|
|
2f5dc7b27c | refactor(lint): share counted findings reporting (#14558) | ||
|
|
4f7645af9c |
build(deps): update rolldown to 1.3.3 (#14536)
* build(deps): update rolldown to 1.3.3 * fix(licenses): verify notices for bundled Rolldown helpers |
||
|
|
f148353ff1 | perf(ci): reuse collected job lists for failure reports (#14537) | ||
|
|
b3f4da9404 | refactor(verification): share client version probes (#14541) | ||
|
+15 |
5b79ae5d62 |
fix(macho)!: report Mach-O read failures as target failures and delete MachoReadIssue (#14416)
* feat(errors)!: add the TargetFailure model, its projection table and conformance registry
Introduce one domain-owned TargetFailure value whose kind alone derives
the public code, category, retryability, recovery and details, for CLI
and MCP alike. Selected-file malformed and truncated refusals are the
first area on it: AnalysisMalformedTargetError is replaced by
AnalysisTargetFailureError, and ParseFailure's byte-structure variants
are TargetFailure variants rather than a parallel type.
The shared stableArtifactParserFailureCli loop is replaced by a
declarative registry (tests/support/targetFailure/readers/*.ts) and one
generated suite that runs every registered case through the CLI and MCP.
BREAKING CHANGE: selected-file malformed and truncated refusals add
details.failure_kind, and a truncated target's remediation now says to
re-acquire the complete file instead of choosing another target. Codes
are unchanged. Affected operations: every operation that refuses a
selected file's malformed or truncated bytes, including the ELF, PE,
Mach-O, DWARF, Go, Rust, BEAM, pyc, devicetree, Apple IPS, kernel
module, binary hardening, managed PE/CLI and IL2CPP readers.
* test(managed): name the target failure error in the merged status test
* docs(reference): name the error CSV instead of linking a non-page file
* fix(tests): expect the path reason for non-regular dyld inputs
#14225 refuses a non-regular dyld input as ArtifactReaderFailure("path");
dylibFileLifetime still expected "format" and fails on main's shard 9.
* fix(tests): expect io, invariant and path where #14225 reclassified
stableArtifact expected "format" for an impossible descriptor byte count
(now io) and an invalid chunk size (now InternalInvariantError);
directoryArtifactReaderOpen expected "format" for a non-file entry (now
path, the same change as #14238). All three fail on main.
* fix(errors)!: raise container reader byte faults as malformed or truncated targets
Delete the ambiguous `format` reason from ArtifactReaderFailure and
ArtifactOperationError. Each container reader now raises its owner's
fact once, through malformedArtifact / truncatedArtifact, with format,
offset, field and measured extents. Short reads inside a measured extent
are read-coverage integrity failures, path-kind refusals are `path`,
foreign or recovery-requiring inputs are `unsupported`, host tool output
is `io`, and REA defects are InternalInvariantError.
The trace, NTFS journal, release exposure, web capture, native macOS and
web artifact adapters project the reader's parsed facts as
AnalysisTargetFailureError instead of invalid_request. Inventory
malformed, truncated, unsupported and cancelled reasons take their code
from the TargetFailure projection table, so a truncated container is
unsupported_target with failure_kind "truncated" on both paths.
BREAKING CHANGE: inventory_artifact, inspect_artifact, extract_artifact,
analyze_javascript_application, inspect_desktop_application,
inspect_keyed_archive, inspect_asset_catalog, inspect_nuget_nupkg,
trace_dylib_resolution, trace_web_module_imports and
trace_web_source_location report damaged container bytes as
unsupported_target (details.reason "malformed" or "truncated", with
failure_kind and format) instead of artifact_operation_failed with
reason "format", and a truncated container as unsupported_target instead
of truncated. inspect_playwright_trace, inspect_ntfs_journal,
audit_release_exposure, the web capture inspection operations and the
caller-selected import and source maps report damaged selected bytes as
unsupported_target instead of invalid_request. The `format` reason no
longer appears in details.reason.
* test(artifacts): expect target failure codes in compiled CLI and MCP suites
* fix(errors)!: refuse malformed SQLite, pwntools and EVM inputs as target failures
The SQLite engine's `format` reason is renamed to `malformed` at its
owner (SQLITE_INSPECTION_REASONS), and its refusal becomes an
AnalysisTargetFailureError at the selected path with format "sqlite".
The pwntools and EVM worker replies keep their wire reason "format",
which their workers define, and the adapters translate it once into a
malformed target failure with the profile's format (elf, elf-core,
evm-bytecode) instead of an invalid_format argument issue. SQLite joins
the target-failure conformance registry.
BREAKING CHANGE: inspect_sqlite_database, inspect_binary_layout,
inspect_recorded_crash and inspect_evm_interface report a selected
file's malformed bytes as unsupported_target with details.failure_kind
"malformed", format_failure, format and path, instead of invalid_request
with an invalid_format issue on path.
* fix(errors): give the integrity kind a schema-valid code and list the reference page
artifact_integrity_mismatch's projection schema requires declared and
calculated digests, which a TargetFailure of kind integrity does not
carry, so the kind now projects artifact_operation_failed with category
integrity_mismatch. The model test validates every kind's projection
against analysisErrorProjectionSchema. The reference page joins the
documentation sidebar.
* fix(artifacts): report a short carrier read as a changed file and keep unsupported desktop probes local
A Bun or Node SEA short read inside a range already checked against the
measured size meant the file changed, not that it was truncated. The
carrier range reader and Bun's readExact now raise read-coverage
integrity for it, and keep 'outside the file' as the truncated case.
DesktopFileInspection records an unsupported managed-metadata probe as a
row issue again, so later file checks still run.
* test(errors): expect target failure facts in the pwntools and EVM reply suites
The literal-replacement scenario now reads the failure's detail instead
of an issues[] message, and a malformed reply wrapped by cleanup failure
reports category unsupported_target.
* test(errors): register PE DOS-signature and truncated IPS refusals and drop their per-command copies
The non-MZ PE imports and load-config cases (PE32/PE32+, ZZ and high-bit
signatures) and the truncated Apple IPS body move into the conformance
registry, which runs them through the CLI and MCP and now also checks
that a refusal leaves the selected file unchanged. The per-command tests
keep only their valid-image controls.
* test(sqlite): drop the malformed-database provider test the conformance registry covers
inspect_sqlite_database/not-a-database in the target-failure registry runs
the same non-SQLite bytes through the CLI and MCP, asserts the malformed
target facts and checks the selected file is unchanged.
* feat(errors)!: make failure_kind the identifier and derive code and retry from it
Apply the owner review on #14239 to the TargetFailure model:
- remove details.format_failure; failure_kind is the only identifier;
- give integrity, conflict and io their own codes
(target_integrity_mismatch, input_conflict, host_io_failed) and derive
inventory malformed, truncated and unsupported codes from the same table;
- add a retry hint (none, backoff, after_change) derived from the kind,
with io refined by its transient errno fact; retryable stays the
unchanged-retry flag and is true exactly for backoff;
- rename the limit-cut result code and category truncated to partial;
- drop cancelled and resource from the target kinds and spell
identifiers in American English (unrecognized);
- return a target failure a tool handler throws as a projected isError
result instead of letting the SDK flatten it to text.
BREAKING CHANGE: details.format_failure is removed (read
details.failure_kind). The truncated result code and category are now
partial. Target integrity failures report target_integrity_mismatch,
host read failures host_io_failed and disagreeing inputs input_conflict.
Inventory operations (inventory_artifact, inspect_artifact,
extract_artifact and the other inventory callers) report truncated
container bytes as unsupported_target. Every target failure carries a
top-level retry hint.
* test(sqlite): expect a malformed target for non-database bytes in the CLI suite
* fix(artifacts): keep changed-file short reads, invalid offsets and EOF declarations apart
PyInstaller reads inside the measured size, and .NET bundle manifest
refills, now raise read-coverage integrity on a zero-byte read instead of
truncated. A .NET bundle field and a Godot PCK directory entry that extend
past the file are truncated (with offset and extents) instead of
malformed. An absent or invalid ASAR packed offset is malformed; only a
valid range past the archive is truncated. The .NET manifest string
offset is reported in file coordinates.
* fix(pwntools): report a short ELF header as a truncated target
The layout and recorded-crash workers raise a distinct truncated reason
when the file ends inside the ELF identification or header, and the
decoder projects it as failure_kind truncated instead of inferring it
from the message.
* fix(errors)!: report managed coverage gaps and IL2CPP pair conflicts as target failures
Managed readers interpret an issue code once, in managedIssueTargetFailure:
a coverage gap is an unsupported target, every other rule violation is a
malformed target, and the inventory metadata status is derived from that
same fact. managedInspectionTargetFailure now returns only
AnalysisTargetFailureError.
An IL2CPP binary that parses but does not link to its metadata is a
conflict target failure that lists both inputs and blames neither, in
place of an invalid_request with two issue entries. Metadata version 108
is an unsupported target. The CLI spells each conflict input's field by
the command's option name.
BREAKING CHANGE: inspect_managed_artifact, inspect_managed_members,
inspect_managed_native_boundaries and the managed comparison operations
report unsupported metadata or signature forms as an
AnalysisTargetFailureError (failure_kind unsupported, format pe-cli,
field, offset) instead of a bare unsupported target. inspect_il2cpp_metadata
reports a binary/metadata pair that does not link as code input_conflict
with failure_kind conflict and details.inputs, instead of invalid_request
with details.issues, and metadata version 108 with failure_kind
unsupported.
* fix(artifacts): verify the carrier before blaming a short read on the bytes
The NTFS $MFT decoder, positional members (FIT, uImage, Bun, Deno) and
.NET bundle members now re-verify the source before reporting a short
stream as malformed, so a file that changed during the read reports the
change. The truncation site builds the model's measured extent.
* fix(errors)!: report inventory refusals as target failures of the selected path
An inventory, inspection or extraction refused damaged or unsupported
container bytes as an ArtifactOperationError whose reason repeated the
format owner's kind. It carried no path or retry hint, so the conformance
registry could not express container cases.
translateArtifactFailure now takes the selected path and returns the
reader's TargetFailure as an AnalysisTargetFailureError. The malformed,
truncated and unsupported reasons, their classification rows and their
presentation branch are deleted from ArtifactOperationError. Readers'
unsupported refusals carry their format facts through unsupportedArtifact.
Container cases move into the conformance registry, which now opens the
target first for session tools such as inspect_artifact.
BREAKING CHANGE: inventory_artifact, inspect_artifact, extract_artifact and
the bundle readers report a refused container as a target failure of
details.path with a top-level retry. details.reason is the owner's
description and details.detail is removed.
* docs(il2cpp): describe pair conflicts as input_conflict with both inputs
* docs(android): name unsupported_target for truncated boot image structures
* fix(errors)!: report a target that changed during the read as failure_kind changed
Inventory integrity failures whose check means the target moved under the
read (container, member and unpacked-entry identity, read coverage,
traversal coverage) now take the model's changed projection: code
artifact_changed, retry backoff and details.failure_kind changed. A
selected target that no longer matches the one the session admitted gets
its own admitted-identity check and keeps its reopen recovery.
BREAKING CHANGE: inventory_artifact, inspect_artifact, extract_artifact and
the other inventory operations report a target that changed during the
read as artifact_changed (retryable, failure_kind changed) instead of
artifact_operation_failed. Admission-identity refusals report
integrity_check admitted-identity instead of container-identity.
* test(artifacts): raise the cleanup fixture's decode refusal with its format facts
* fix(errors)!: report unsupported and unrecognized targets on the TargetFailure model
AnalysisUnsupportedTargetError carried a free-text reason and remediation
beside the TargetFailure model, so unsupported refusals had no format,
failure_kind or retry hint, and their recovery was prose written at each
producer.
The class is deleted. Producers raise unsupportedTarget or
unrecognizedTarget with the owner's format, and consumers read
targetFailureOfKind. The projection table renders the recovery and names
the operations the owner lists in related.operations. The foreign-bytes
identity loop moves into the conformance registry.
BREAKING CHANGE: unsupported and unrecognized targets report
failure_kind, format and retry. Their remediation comes from the
target-failure table; producer-written remediation sentences are folded
into details.reason or replaced by details.related_operations.
* test(artifacts): expect admitted-identity for selections replaced before admission
A selected source replaced before admission fails the admitted-identity check rather than container-identity since the changed/admitted split.
* test(go): name the fixture and result when an MZ carrier is not refused through MCP
* style: format the migrated target-failure tests
* test(errors): expect the PE readers' native-binary format label for foreign bytes
* fix(cli)!: spell a target failure's recovery with CLI commands and options
The target-failure recovery named MCP tools even when the CLI printed it,
and it could not name another provider. The projection table now renders
the owner's alternative operations and providers through an adapter
spelling: MCP by tool name and open_binary argument, the CLI by command
and --provider. The CLI output layer re-renders only the table's own text,
so appended guidance is kept.
BREAKING CHANGE: CLI target-failure remediation names commands (for
example `rea inspect-plist`) instead of MCP tool names, and errors gain
details.related_providers when the owner names a provider.
* test(verify): expect target failures for damaged ELF, core and EVM inputs in real-provider verifiers
The binary-layout, recorded-crash and EVM verifiers still expected invalid_input for malformed or truncated selected bytes. The pwntools and EVM adapters now report those as unsupported_target with failure_kind; a missing path remains invalid_input.
* test(web): expect the partial code for a refused source-map admission
The limit-cut code is partial; this Windows-lane test arrived from main with the old truncated spelling.
* fix(workers)!: name malformed worker replies by the model's kind (#14292)
* fix(workers)!: name malformed worker replies by the model's kind
The pwntools, EVM, UEFI LZMA, source-map and historical-capture workers
replied with reason "format" for bytes that break their format, a second
vocabulary for the TargetFailure kind. The workers and their reply schemas
now use "malformed" at the source, including the pwntools Python bridge
and its tests. pwndbg never sent "format", so its schema drops it.
The pwntools decoder maps the worker's malformed and truncated replies to
the target failure of the same kind in one branch.
BREAKING CHANGE: worker reply reason "format" is renamed "malformed" in
the pwntools, EVM, UEFI LZMA, source-map and capture decoder protocols.
* test(go): expect loader-equivalent PE header facts in the MZ diagnostics (#14293)
#14253 made the static PE readers read the optional header at its fixed
offsets and admit a declared directory count below 16, as the Windows
loader does. The Go MZ diagnostic fixtures still expected the older
refusals, so inspect_go_binary MCP and CLI diagnostics failed on main.
A short SizeOfOptionalHeader with an unknown magic at the fixed offset
is now an unsupported optional header, and a PE declaring one data
directory is admitted and keeps its build information, which the MCP
test now asserts.
* fix(tests): damage Deno PE resource framing the loader-equivalent reader reads
#14253 walks resource trees at their RVA whatever the directory Size
declares, so shrinking Size no longer made the 65,535-language table
malformed and the case reported the entry allowance instead. Point the
type directory's entry at a language directory outside the file-backed
resource bytes: its header cannot be read, which the reader reports as
malformed before counting rows against the allowance.
* test(go): check build information in a one-directory PE32 fixture (#14303)
* test(pe): distinguish unsupported DOS input from truncated input (#14302)
* ci: measure portable runner time for recorded selection predictions (#14304)
* ci: validate workflow anchors with actionlint 1.7.12 (#14298)
* ci: wait for static checks before broad PR test shards (#14299)
* ci: validate workflow anchors with actionlint 1.7.12
* ci: wait for static checks before broad PR test shards
* ci: record affected-test predictions above the live cutoff (#14300)
* ci: compare frozen selections with observed test failures (#14301)
* chore(deps): bump markdownify from 1.2.3 to 1.2.4 in /website (#14227)
Bumps [markdownify](https://github.com/matthewwithanm/python-markdownify) from 1.2.3 to 1.2.4.
- [Release notes](https://github.com/matthewwithanm/python-markdownify/releases)
- [Commits](https://github.com/matthewwithanm/python-markdownify/compare/1.2.3...1.2.4)
---
updated-dependencies:
- dependency-name: markdownify
dependency-version: 1.2.4
dependency-type: direct:production
update-type: version-update:semver-patch
...
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
* chore(deps): bump rcssmin from 1.2.2 to 1.3.0 in /website (#14229)
Bumps [rcssmin](https://github.com/ndparker/rcssmin) from 1.2.2 to 1.3.0.
- [Changelog](https://github.com/ndparker/rcssmin/blob/master/CHANGES)
- [Commits](https://github.com/ndparker/rcssmin/compare/1.2.2...1.3.0)
---
updated-dependencies:
- dependency-name: rcssmin
dependency-version: 1.3.0
dependency-type: direct:production
update-type: version-update:semver-minor
...
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
* fix(ci): retry recorded crash dependency acquisition without stale index cache (#14076)
Co-authored-by: ShuaixinHuang <ShuaixinHuang@users.noreply.github.com>
* ci: publish the portable build cache only for selected consumers (#14307)
* ci: run the verified actionlint release binary (#14309)
* chore(deps): bump pyyaml from 6.0.3 to 6.0.4 in /website (#14228)
Bumps [pyyaml](https://github.com/yaml/pyyaml) from 6.0.3 to 6.0.4.
- [Release notes](https://github.com/yaml/pyyaml/releases)
- [Changelog](https://github.com/yaml/pyyaml/blob/6.0.4/CHANGES)
- [Commits](https://github.com/yaml/pyyaml/compare/6.0.3...6.0.4)
---
updated-dependencies:
- dependency-name: pyyaml
dependency-version: 6.0.4
dependency-type: direct:production
update-type: version-update:semver-patch
...
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
* refactor(views): reuse invalid-view results and row selectors (#14314)
* refactor(domain): share record and graph parsing across input paths (#14321)
* ci: shallow-checkout the classifier for qualification runs (#14312)
* refactor(tests): consolidate repeated CLI capture and fixture construction (#14311)
* refactor(tests): consolidate repeated CLI capture and fixture construction
* test(cli): keep overlapping schema and help cases in their existing PR
* refactor(application): consolidate configuration and observation helpers (#14322)
* refactor(application): consolidate configuration and observation helpers
* refactor(config): leave optional launch parsers to their existing change
* refactor(tooling): share verifier fixture and lint helpers (#14318)
* refactor(tooling): share verifier fixture and lint helpers
* test(clients): retain tool messages in verifier model substitutes
* build(deps): bump write-file-atomic from 7.0.0 to 8.0.0 (#8134)
* perf(nuget): stream .nupkg ZIP over FileHandle instead of buffering full archive (#13835)
* perf(nuget): stream .nupkg ZIP over FileHandle instead of buffering full archive
Closes #13834
* fix(nuget): check artifact stability after format rejection
* refactor(kuna): extract KunaSingleFunctionCache from KunaSessionClient (#13863)
Closes #13862
* perf(har): reuse normalized Base64 for retained response bodies (#13847)
Co-authored-by: hhang <169027046+xu91102@users.noreply.github.com>
* refactor(application): migrate 7 standalone format services onto executeArtifactInspection (#13861)
Closes #13860
* refactor: prune 5 redundant single-call wrapper modules (#13807)
* refactor: prune 5 redundant single-call wrapper modules
* chore(ci): remove deleted providerEnvironment.ts from Stryker and CI scope configs
* fix(ci): retarget provider environment mutation coverage
* refactor(application): migrate 3 remaining artifact services onto executeArtifactInspection (#13867)
* refactor(rizin): extract RizinDebugEvidence from RizinDebugSessionManager (#13823)
* refactor(rizin): extract RizinDebugEvidence from RizinDebugSessionManager
* refactor(rizin): remove unused evidence imports
* fix(ci): follow extracted Rizin evidence in mutation checks
* docs: codify pagination, schema-flatness, DDIA, and flat-ownership guidance in tool-design docs and skills (#13865)
* docs: codify pagination, schema-flatness, DDIA, and flat-ownership guidance in tool-design docs and skills
Closes #13864
* docs: name the current provider operation runner
* feat(frida): add optional limit and offset paging to list_frida_processes (#13854)
* feat(frida): add optional limit and offset paging to list_frida_processes
Closes #13853
* fix(frida): stabilize paged process discovery
* docs(frida): scope paging claims to shipped discovery
* refactor(application): unify 5 pass-through analysis services into ProviderOperationService (#13856)
Closes #13855
* refactor(cli): extract contractCommandRunners from contractCommand (#13869)
* feat(tools): add optional limit and offset paging to find_xrefs_to_name (#13858)
* feat(tools): add optional limit and offset paging to find_xrefs_to_name
Closes #13857
* fix(tools): preserve xref discovery coverage in paged results
* feat(adb): add optional limit and offset paging to list_adb_features and list_adb_services (#13873)
* feat(adb): add optional limit and offset paging to list_adb_features and list_adb_services
* test(adb): verify feature and service paging guidance
* refactor(cli): extract contractCliSchemaProjection and contractCliDocumentDescription (#13871)
* fix(dwarf): reject PE long section names when PointerToSymbolTable is zero (#13889)
* perf(macho): streamline legacy rebase run marking (#13881)
* perf(erlang): stream BEAM IFF inspection over FileHandle (#13886)
* perf(erlang): stream BEAM IFF inspection over FileHandle
* fix(erlang): retain only decoded BEAM code headers
* refactor(kuna): extract KunaSessionEvidence from KunaSessionClient (#13879)
* refactor(kuna): extract KunaSessionEvidence from KunaSessionClient
* refactor(kuna): remove stale session evidence imports
* fix(objc): preserve class import reader failures (#13892)
* refactor(server): extract desktop build tool bindings (#13891)
* refactor(server): collapse inspect bindings and extract desktopBuildToolBindings
* fix(mcp): restore contract-checked inspect bindings
* fix(macho): preserve legacy bind stream bounds and target scope (#13874)
* fix(macho): preserve legacy bind stream bounds and target scope
* fix(macho): report unresolved legacy bind targets in coverage
* test(macho): consolidate legacy bind target coverage
* perf(pe): stream PE certificates over FileHandle (#13884)
* perf(pe): stream PE certificates over FileHandle
* fix(pe): share certificate table admission across readers
* perf(apple-ips): stream Mach-O join headers over FileHandle (#13894)
* perf(apple-ips): stream Mach-O join headers over FileHandle
* fix(apple-ips): retain only verified Mach-O joins
* perf(objc): streamline exact class identity projection (#13897)
* perf(pe): stream PE resource inspection over FileHandle (#13899)
* perf(pe): stream PE resource inspection over FileHandle
* fix(pe): bound streamed icon-group reads and restore lifetime coverage
* perf(swift): streamline symbol inventory classification (#13902)
* perf(apk-signature): stream APK signature inspection over FileHandle (#13877)
* perf(apk-signature): stream APK signature inspection over FileHandle
* fix(apk-signature): preserve bounded reads and file identity
* fix(apk-signature): handle deflate EOF and repair verifier bounds
* fix(apk-signature): recognize internal pipeline cancellation at EOF
* perf(release-exposure): stream PE CodeView/PDB inspection over FileHandle (#13896)
* perf(release-exposure): stream PE CodeView/PDB inspection over FileHandle
* fix(release-exposure): share and bound PE CodeView parsing
* refactor(server): simplify contractToolBindings types and handler dispatch (#13912)
* perf(macho): streamline slice selection diagnostics (#13905)
* fix(macho): preserve retained magic from valid FAT ranges (#13910)
* perf(pe): stream PE load-config inspection over FileHandle (#13901)
* perf(pe): stream PE load-config inspection over FileHandle
* fix(pe): admit empty section tables and batch TLS callback reads
* perf(elf): stream ELF note inspection over FileHandle (#13904)
* perf(elf): stream ELF note inspection over FileHandle
* fix(elf): validate full header extents and reuse aliased note reads
* fix(macho): keep header reads inside declared slices (#13913)
* perf(v8): stream V8 code cache inspection over FileHandle (#13907)
* fix(macho): correct encryption range VM mapping (#13918)
* perf(elf): stream kernel module inspection over FileHandle (#13917)
* perf(elf): stream kernel module inspection over FileHandle
* test(elf): exercise streamed kernel module reads and finalization
* refactor(providers): share offlineArtifactFailureDialect across offline providers (#13921)
* test(macho): consolidate fixed header and extent proofs (#13919)
* perf(macho): bound positional command string probes (#13925)
* refactor(server): replace server.close and onclose monkey-patching with lifecycle hooks (#13882)
* refactor(server): replace server.close and onclose monkey-patching with lifecycle hooks
* fix(mcp): keep deferred runtime cleanup out of protocol close
* test(mcp): verify materialized runtime hooks close once
* fix(cli): defer artifact AnalysisView loading until requested
* test(macho): consolidate native path framing proofs (#13926)
* perf(elf): stream ELF dependency inspection over FileHandle (#13915)
* perf(elf): stream ELF dependency inspection over FileHandle
* fix(elf): share dependency hash parsing and bound string reads
* perf(elf): reuse cached prefixes for short dependency names
* refactor(server): extract debugger and instrumentation tool bindings (#13909)
* refactor(server): extract debugger and instrumentation tool bindings
* test(server): track extracted debugger bindings in reverse tools coverage
* fix(cli): defer artifact AnalysisView loading until requested
(cherry picked from commit
|
||
|
|
8e49a4f8b9 |
refactor(recordings): share producer failure classification (#14470)
* refactor(recordings): share producer failure classification * refactor(recordings): keep classification with the provider failure owner * refactor(recordings): keep catalog limits with their providers * refactor(process): remove the unused fixed command budget path (#14481) |
||
|
|
8d881cef7b |
refactor(verifiers): share installed skill checks across three clients (#14521)
* refactor(verifiers): share installed skill validation across three clients * refactor(verifiers): reuse setup checks for Grok and OMP * refactor(verifiers): keep setup reuse with its existing change |
||
|
|
4f839e6a8f | refactor(verifiers): share package fixture home settings (#14523) | ||
|
|
b5219e7d93 | test(clients): reuse setup verification for three more clients (#14460) | ||
|
|
0069feeccf | fix(ci): shard exact test specifications before execution (#14499) | ||
|
|
f5f6bb1861 | refactor(verifiers): share the model fixture request reader (#14520) | ||
|
|
a2fd2d7d30 |
refactor(views): share fixed page budget errors (#14479)
* refactor(views): share fixed page budget errors * test(architecture): count the shared view error constructor * test(views): relocate the fixed-page refusal inventory |
||
|
|
02c420939d | perf(ci): query static diagnostics by artifact name (#14476) | ||
|
|
60af9ef6b3 |
refactor(verifiers): share whole-file SHA-256 hashing (#14475)
* refactor(verifiers): share whole-file SHA-256 hashing * fix(verifiers): type the streamed digest input |
||
|
|
fda73b9f24 | test(clients): share verifier message text search (#14443) | ||
|
|
b3ae717188 |
chore(deps): update tsrs to 7.1.0-beta.tsrs2 (#14433)
* chore(deps): update tsrs to 7.1.0-beta.tsrs2 * fix(ci): keep typed lint on the configured Go backend |
||
|
|
15d5944ab7 | perf(ci): keep health report changes on portable checks (#14430) | ||
|
+15 |
299c592b63 |
fix(cli)!: spell a target failure's recovery with CLI commands and options (#14289)
* feat(errors)!: add the TargetFailure model, its projection table and conformance registry
Introduce one domain-owned TargetFailure value whose kind alone derives
the public code, category, retryability, recovery and details, for CLI
and MCP alike. Selected-file malformed and truncated refusals are the
first area on it: AnalysisMalformedTargetError is replaced by
AnalysisTargetFailureError, and ParseFailure's byte-structure variants
are TargetFailure variants rather than a parallel type.
The shared stableArtifactParserFailureCli loop is replaced by a
declarative registry (tests/support/targetFailure/readers/*.ts) and one
generated suite that runs every registered case through the CLI and MCP.
BREAKING CHANGE: selected-file malformed and truncated refusals add
details.failure_kind, and a truncated target's remediation now says to
re-acquire the complete file instead of choosing another target. Codes
are unchanged. Affected operations: every operation that refuses a
selected file's malformed or truncated bytes, including the ELF, PE,
Mach-O, DWARF, Go, Rust, BEAM, pyc, devicetree, Apple IPS, kernel
module, binary hardening, managed PE/CLI and IL2CPP readers.
* test(managed): name the target failure error in the merged status test
* docs(reference): name the error CSV instead of linking a non-page file
* fix(tests): expect the path reason for non-regular dyld inputs
#14225 refuses a non-regular dyld input as ArtifactReaderFailure("path");
dylibFileLifetime still expected "format" and fails on main's shard 9.
* fix(tests): expect io, invariant and path where #14225 reclassified
stableArtifact expected "format" for an impossible descriptor byte count
(now io) and an invalid chunk size (now InternalInvariantError);
directoryArtifactReaderOpen expected "format" for a non-file entry (now
path, the same change as #14238). All three fail on main.
* fix(errors)!: raise container reader byte faults as malformed or truncated targets
Delete the ambiguous `format` reason from ArtifactReaderFailure and
ArtifactOperationError. Each container reader now raises its owner's
fact once, through malformedArtifact / truncatedArtifact, with format,
offset, field and measured extents. Short reads inside a measured extent
are read-coverage integrity failures, path-kind refusals are `path`,
foreign or recovery-requiring inputs are `unsupported`, host tool output
is `io`, and REA defects are InternalInvariantError.
The trace, NTFS journal, release exposure, web capture, native macOS and
web artifact adapters project the reader's parsed facts as
AnalysisTargetFailureError instead of invalid_request. Inventory
malformed, truncated, unsupported and cancelled reasons take their code
from the TargetFailure projection table, so a truncated container is
unsupported_target with failure_kind "truncated" on both paths.
BREAKING CHANGE: inventory_artifact, inspect_artifact, extract_artifact,
analyze_javascript_application, inspect_desktop_application,
inspect_keyed_archive, inspect_asset_catalog, inspect_nuget_nupkg,
trace_dylib_resolution, trace_web_module_imports and
trace_web_source_location report damaged container bytes as
unsupported_target (details.reason "malformed" or "truncated", with
failure_kind and format) instead of artifact_operation_failed with
reason "format", and a truncated container as unsupported_target instead
of truncated. inspect_playwright_trace, inspect_ntfs_journal,
audit_release_exposure, the web capture inspection operations and the
caller-selected import and source maps report damaged selected bytes as
unsupported_target instead of invalid_request. The `format` reason no
longer appears in details.reason.
* test(artifacts): expect target failure codes in compiled CLI and MCP suites
* fix(errors)!: refuse malformed SQLite, pwntools and EVM inputs as target failures
The SQLite engine's `format` reason is renamed to `malformed` at its
owner (SQLITE_INSPECTION_REASONS), and its refusal becomes an
AnalysisTargetFailureError at the selected path with format "sqlite".
The pwntools and EVM worker replies keep their wire reason "format",
which their workers define, and the adapters translate it once into a
malformed target failure with the profile's format (elf, elf-core,
evm-bytecode) instead of an invalid_format argument issue. SQLite joins
the target-failure conformance registry.
BREAKING CHANGE: inspect_sqlite_database, inspect_binary_layout,
inspect_recorded_crash and inspect_evm_interface report a selected
file's malformed bytes as unsupported_target with details.failure_kind
"malformed", format_failure, format and path, instead of invalid_request
with an invalid_format issue on path.
* fix(errors): give the integrity kind a schema-valid code and list the reference page
artifact_integrity_mismatch's projection schema requires declared and
calculated digests, which a TargetFailure of kind integrity does not
carry, so the kind now projects artifact_operation_failed with category
integrity_mismatch. The model test validates every kind's projection
against analysisErrorProjectionSchema. The reference page joins the
documentation sidebar.
* fix(artifacts): report a short carrier read as a changed file and keep unsupported desktop probes local
A Bun or Node SEA short read inside a range already checked against the
measured size meant the file changed, not that it was truncated. The
carrier range reader and Bun's readExact now raise read-coverage
integrity for it, and keep 'outside the file' as the truncated case.
DesktopFileInspection records an unsupported managed-metadata probe as a
row issue again, so later file checks still run.
* test(errors): expect target failure facts in the pwntools and EVM reply suites
The literal-replacement scenario now reads the failure's detail instead
of an issues[] message, and a malformed reply wrapped by cleanup failure
reports category unsupported_target.
* test(errors): register PE DOS-signature and truncated IPS refusals and drop their per-command copies
The non-MZ PE imports and load-config cases (PE32/PE32+, ZZ and high-bit
signatures) and the truncated Apple IPS body move into the conformance
registry, which runs them through the CLI and MCP and now also checks
that a refusal leaves the selected file unchanged. The per-command tests
keep only their valid-image controls.
* test(sqlite): drop the malformed-database provider test the conformance registry covers
inspect_sqlite_database/not-a-database in the target-failure registry runs
the same non-SQLite bytes through the CLI and MCP, asserts the malformed
target facts and checks the selected file is unchanged.
* feat(errors)!: make failure_kind the identifier and derive code and retry from it
Apply the owner review on #14239 to the TargetFailure model:
- remove details.format_failure; failure_kind is the only identifier;
- give integrity, conflict and io their own codes
(target_integrity_mismatch, input_conflict, host_io_failed) and derive
inventory malformed, truncated and unsupported codes from the same table;
- add a retry hint (none, backoff, after_change) derived from the kind,
with io refined by its transient errno fact; retryable stays the
unchanged-retry flag and is true exactly for backoff;
- rename the limit-cut result code and category truncated to partial;
- drop cancelled and resource from the target kinds and spell
identifiers in American English (unrecognized);
- return a target failure a tool handler throws as a projected isError
result instead of letting the SDK flatten it to text.
BREAKING CHANGE: details.format_failure is removed (read
details.failure_kind). The truncated result code and category are now
partial. Target integrity failures report target_integrity_mismatch,
host read failures host_io_failed and disagreeing inputs input_conflict.
Inventory operations (inventory_artifact, inspect_artifact,
extract_artifact and the other inventory callers) report truncated
container bytes as unsupported_target. Every target failure carries a
top-level retry hint.
* test(sqlite): expect a malformed target for non-database bytes in the CLI suite
* fix(artifacts): keep changed-file short reads, invalid offsets and EOF declarations apart
PyInstaller reads inside the measured size, and .NET bundle manifest
refills, now raise read-coverage integrity on a zero-byte read instead of
truncated. A .NET bundle field and a Godot PCK directory entry that extend
past the file are truncated (with offset and extents) instead of
malformed. An absent or invalid ASAR packed offset is malformed; only a
valid range past the archive is truncated. The .NET manifest string
offset is reported in file coordinates.
* fix(pwntools): report a short ELF header as a truncated target
The layout and recorded-crash workers raise a distinct truncated reason
when the file ends inside the ELF identification or header, and the
decoder projects it as failure_kind truncated instead of inferring it
from the message.
* fix(errors)!: report managed coverage gaps and IL2CPP pair conflicts as target failures
Managed readers interpret an issue code once, in managedIssueTargetFailure:
a coverage gap is an unsupported target, every other rule violation is a
malformed target, and the inventory metadata status is derived from that
same fact. managedInspectionTargetFailure now returns only
AnalysisTargetFailureError.
An IL2CPP binary that parses but does not link to its metadata is a
conflict target failure that lists both inputs and blames neither, in
place of an invalid_request with two issue entries. Metadata version 108
is an unsupported target. The CLI spells each conflict input's field by
the command's option name.
BREAKING CHANGE: inspect_managed_artifact, inspect_managed_members,
inspect_managed_native_boundaries and the managed comparison operations
report unsupported metadata or signature forms as an
AnalysisTargetFailureError (failure_kind unsupported, format pe-cli,
field, offset) instead of a bare unsupported target. inspect_il2cpp_metadata
reports a binary/metadata pair that does not link as code input_conflict
with failure_kind conflict and details.inputs, instead of invalid_request
with details.issues, and metadata version 108 with failure_kind
unsupported.
* fix(artifacts): verify the carrier before blaming a short read on the bytes
The NTFS $MFT decoder, positional members (FIT, uImage, Bun, Deno) and
.NET bundle members now re-verify the source before reporting a short
stream as malformed, so a file that changed during the read reports the
change. The truncation site builds the model's measured extent.
* fix(errors)!: report inventory refusals as target failures of the selected path
An inventory, inspection or extraction refused damaged or unsupported
container bytes as an ArtifactOperationError whose reason repeated the
format owner's kind. It carried no path or retry hint, so the conformance
registry could not express container cases.
translateArtifactFailure now takes the selected path and returns the
reader's TargetFailure as an AnalysisTargetFailureError. The malformed,
truncated and unsupported reasons, their classification rows and their
presentation branch are deleted from ArtifactOperationError. Readers'
unsupported refusals carry their format facts through unsupportedArtifact.
Container cases move into the conformance registry, which now opens the
target first for session tools such as inspect_artifact.
BREAKING CHANGE: inventory_artifact, inspect_artifact, extract_artifact and
the bundle readers report a refused container as a target failure of
details.path with a top-level retry. details.reason is the owner's
description and details.detail is removed.
* docs(il2cpp): describe pair conflicts as input_conflict with both inputs
* docs(android): name unsupported_target for truncated boot image structures
* fix(errors)!: report a target that changed during the read as failure_kind changed
Inventory integrity failures whose check means the target moved under the
read (container, member and unpacked-entry identity, read coverage,
traversal coverage) now take the model's changed projection: code
artifact_changed, retry backoff and details.failure_kind changed. A
selected target that no longer matches the one the session admitted gets
its own admitted-identity check and keeps its reopen recovery.
BREAKING CHANGE: inventory_artifact, inspect_artifact, extract_artifact and
the other inventory operations report a target that changed during the
read as artifact_changed (retryable, failure_kind changed) instead of
artifact_operation_failed. Admission-identity refusals report
integrity_check admitted-identity instead of container-identity.
* test(artifacts): raise the cleanup fixture's decode refusal with its format facts
* fix(errors)!: report unsupported and unrecognized targets on the TargetFailure model
AnalysisUnsupportedTargetError carried a free-text reason and remediation
beside the TargetFailure model, so unsupported refusals had no format,
failure_kind or retry hint, and their recovery was prose written at each
producer.
The class is deleted. Producers raise unsupportedTarget or
unrecognizedTarget with the owner's format, and consumers read
targetFailureOfKind. The projection table renders the recovery and names
the operations the owner lists in related.operations. The foreign-bytes
identity loop moves into the conformance registry.
BREAKING CHANGE: unsupported and unrecognized targets report
failure_kind, format and retry. Their remediation comes from the
target-failure table; producer-written remediation sentences are folded
into details.reason or replaced by details.related_operations.
* test(artifacts): expect admitted-identity for selections replaced before admission
A selected source replaced before admission fails the admitted-identity check rather than container-identity since the changed/admitted split.
* test(go): name the fixture and result when an MZ carrier is not refused through MCP
* style: format the migrated target-failure tests
* test(errors): expect the PE readers' native-binary format label for foreign bytes
* fix(cli)!: spell a target failure's recovery with CLI commands and options
The target-failure recovery named MCP tools even when the CLI printed it,
and it could not name another provider. The projection table now renders
the owner's alternative operations and providers through an adapter
spelling: MCP by tool name and open_binary argument, the CLI by command
and --provider. The CLI output layer re-renders only the table's own text,
so appended guidance is kept.
BREAKING CHANGE: CLI target-failure remediation names commands (for
example `rea inspect-plist`) instead of MCP tool names, and errors gain
details.related_providers when the owner names a provider.
* test(verify): expect target failures for damaged ELF, core and EVM inputs in real-provider verifiers
The binary-layout, recorded-crash and EVM verifiers still expected invalid_input for malformed or truncated selected bytes. The pwntools and EVM adapters now report those as unsupported_target with failure_kind; a missing path remains invalid_input.
* test(web): expect the partial code for a refused source-map admission
The limit-cut code is partial; this Windows-lane test arrived from main with the old truncated spelling.
* fix(workers)!: name malformed worker replies by the model's kind (#14292)
* fix(workers)!: name malformed worker replies by the model's kind
The pwntools, EVM, UEFI LZMA, source-map and historical-capture workers
replied with reason "format" for bytes that break their format, a second
vocabulary for the TargetFailure kind. The workers and their reply schemas
now use "malformed" at the source, including the pwntools Python bridge
and its tests. pwndbg never sent "format", so its schema drops it.
The pwntools decoder maps the worker's malformed and truncated replies to
the target failure of the same kind in one branch.
BREAKING CHANGE: worker reply reason "format" is renamed "malformed" in
the pwntools, EVM, UEFI LZMA, source-map and capture decoder protocols.
* test(go): expect loader-equivalent PE header facts in the MZ diagnostics (#14293)
#14253 made the static PE readers read the optional header at its fixed
offsets and admit a declared directory count below 16, as the Windows
loader does. The Go MZ diagnostic fixtures still expected the older
refusals, so inspect_go_binary MCP and CLI diagnostics failed on main.
A short SizeOfOptionalHeader with an unknown magic at the fixed offset
is now an unsupported optional header, and a PE declaring one data
directory is admitted and keeps its build information, which the MCP
test now asserts.
* fix(tests): damage Deno PE resource framing the loader-equivalent reader reads
#14253 walks resource trees at their RVA whatever the directory Size
declares, so shrinking Size no longer made the 65,535-language table
malformed and the case reported the entry allowance instead. Point the
type directory's entry at a language directory outside the file-backed
resource bytes: its header cannot be read, which the reader reports as
malformed before counting rows against the allowance.
* test(go): check build information in a one-directory PE32 fixture (#14303)
* test(pe): distinguish unsupported DOS input from truncated input (#14302)
* ci: measure portable runner time for recorded selection predictions (#14304)
* ci: validate workflow anchors with actionlint 1.7.12 (#14298)
* ci: wait for static checks before broad PR test shards (#14299)
* ci: validate workflow anchors with actionlint 1.7.12
* ci: wait for static checks before broad PR test shards
* ci: record affected-test predictions above the live cutoff (#14300)
* ci: compare frozen selections with observed test failures (#14301)
* chore(deps): bump markdownify from 1.2.3 to 1.2.4 in /website (#14227)
Bumps [markdownify](https://github.com/matthewwithanm/python-markdownify) from 1.2.3 to 1.2.4.
- [Release notes](https://github.com/matthewwithanm/python-markdownify/releases)
- [Commits](https://github.com/matthewwithanm/python-markdownify/compare/1.2.3...1.2.4)
---
updated-dependencies:
- dependency-name: markdownify
dependency-version: 1.2.4
dependency-type: direct:production
update-type: version-update:semver-patch
...
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
* chore(deps): bump rcssmin from 1.2.2 to 1.3.0 in /website (#14229)
Bumps [rcssmin](https://github.com/ndparker/rcssmin) from 1.2.2 to 1.3.0.
- [Changelog](https://github.com/ndparker/rcssmin/blob/master/CHANGES)
- [Commits](https://github.com/ndparker/rcssmin/compare/1.2.2...1.3.0)
---
updated-dependencies:
- dependency-name: rcssmin
dependency-version: 1.3.0
dependency-type: direct:production
update-type: version-update:semver-minor
...
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
* fix(ci): retry recorded crash dependency acquisition without stale index cache (#14076)
Co-authored-by: ShuaixinHuang <ShuaixinHuang@users.noreply.github.com>
* ci: publish the portable build cache only for selected consumers (#14307)
* ci: run the verified actionlint release binary (#14309)
* chore(deps): bump pyyaml from 6.0.3 to 6.0.4 in /website (#14228)
Bumps [pyyaml](https://github.com/yaml/pyyaml) from 6.0.3 to 6.0.4.
- [Release notes](https://github.com/yaml/pyyaml/releases)
- [Changelog](https://github.com/yaml/pyyaml/blob/6.0.4/CHANGES)
- [Commits](https://github.com/yaml/pyyaml/compare/6.0.3...6.0.4)
---
updated-dependencies:
- dependency-name: pyyaml
dependency-version: 6.0.4
dependency-type: direct:production
update-type: version-update:semver-patch
...
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
* refactor(views): reuse invalid-view results and row selectors (#14314)
* refactor(domain): share record and graph parsing across input paths (#14321)
* ci: shallow-checkout the classifier for qualification runs (#14312)
* refactor(tests): consolidate repeated CLI capture and fixture construction (#14311)
* refactor(tests): consolidate repeated CLI capture and fixture construction
* test(cli): keep overlapping schema and help cases in their existing PR
* refactor(application): consolidate configuration and observation helpers (#14322)
* refactor(application): consolidate configuration and observation helpers
* refactor(config): leave optional launch parsers to their existing change
* refactor(tooling): share verifier fixture and lint helpers (#14318)
* refactor(tooling): share verifier fixture and lint helpers
* test(clients): retain tool messages in verifier model substitutes
* build(deps): bump write-file-atomic from 7.0.0 to 8.0.0 (#8134)
* perf(nuget): stream .nupkg ZIP over FileHandle instead of buffering full archive (#13835)
* perf(nuget): stream .nupkg ZIP over FileHandle instead of buffering full archive
Closes #13834
* fix(nuget): check artifact stability after format rejection
* refactor(kuna): extract KunaSingleFunctionCache from KunaSessionClient (#13863)
Closes #13862
* perf(har): reuse normalized Base64 for retained response bodies (#13847)
Co-authored-by: hhang <169027046+xu91102@users.noreply.github.com>
* refactor(application): migrate 7 standalone format services onto executeArtifactInspection (#13861)
Closes #13860
* refactor: prune 5 redundant single-call wrapper modules (#13807)
* refactor: prune 5 redundant single-call wrapper modules
* chore(ci): remove deleted providerEnvironment.ts from Stryker and CI scope configs
* fix(ci): retarget provider environment mutation coverage
* refactor(application): migrate 3 remaining artifact services onto executeArtifactInspection (#13867)
* refactor(rizin): extract RizinDebugEvidence from RizinDebugSessionManager (#13823)
* refactor(rizin): extract RizinDebugEvidence from RizinDebugSessionManager
* refactor(rizin): remove unused evidence imports
* fix(ci): follow extracted Rizin evidence in mutation checks
* docs: codify pagination, schema-flatness, DDIA, and flat-ownership guidance in tool-design docs and skills (#13865)
* docs: codify pagination, schema-flatness, DDIA, and flat-ownership guidance in tool-design docs and skills
Closes #13864
* docs: name the current provider operation runner
* feat(frida): add optional limit and offset paging to list_frida_processes (#13854)
* feat(frida): add optional limit and offset paging to list_frida_processes
Closes #13853
* fix(frida): stabilize paged process discovery
* docs(frida): scope paging claims to shipped discovery
* refactor(application): unify 5 pass-through analysis services into ProviderOperationService (#13856)
Closes #13855
* refactor(cli): extract contractCommandRunners from contractCommand (#13869)
* feat(tools): add optional limit and offset paging to find_xrefs_to_name (#13858)
* feat(tools): add optional limit and offset paging to find_xrefs_to_name
Closes #13857
* fix(tools): preserve xref discovery coverage in paged results
* feat(adb): add optional limit and offset paging to list_adb_features and list_adb_services (#13873)
* feat(adb): add optional limit and offset paging to list_adb_features and list_adb_services
* test(adb): verify feature and service paging guidance
* refactor(cli): extract contractCliSchemaProjection and contractCliDocumentDescription (#13871)
* fix(dwarf): reject PE long section names when PointerToSymbolTable is zero (#13889)
* perf(macho): streamline legacy rebase run marking (#13881)
* perf(erlang): stream BEAM IFF inspection over FileHandle (#13886)
* perf(erlang): stream BEAM IFF inspection over FileHandle
* fix(erlang): retain only decoded BEAM code headers
* refactor(kuna): extract KunaSessionEvidence from KunaSessionClient (#13879)
* refactor(kuna): extract KunaSessionEvidence from KunaSessionClient
* refactor(kuna): remove stale session evidence imports
* fix(objc): preserve class import reader failures (#13892)
* refactor(server): extract desktop build tool bindings (#13891)
* refactor(server): collapse inspect bindings and extract desktopBuildToolBindings
* fix(mcp): restore contract-checked inspect bindings
* fix(macho): preserve legacy bind stream bounds and target scope (#13874)
* fix(macho): preserve legacy bind stream bounds and target scope
* fix(macho): report unresolved legacy bind targets in coverage
* test(macho): consolidate legacy bind target coverage
* perf(pe): stream PE certificates over FileHandle (#13884)
* perf(pe): stream PE certificates over FileHandle
* fix(pe): share certificate table admission across readers
* perf(apple-ips): stream Mach-O join headers over FileHandle (#13894)
* perf(apple-ips): stream Mach-O join headers over FileHandle
* fix(apple-ips): retain only verified Mach-O joins
* perf(objc): streamline exact class identity projection (#13897)
* perf(pe): stream PE resource inspection over FileHandle (#13899)
* perf(pe): stream PE resource inspection over FileHandle
* fix(pe): bound streamed icon-group reads and restore lifetime coverage
* perf(swift): streamline symbol inventory classification (#13902)
* perf(apk-signature): stream APK signature inspection over FileHandle (#13877)
* perf(apk-signature): stream APK signature inspection over FileHandle
* fix(apk-signature): preserve bounded reads and file identity
* fix(apk-signature): handle deflate EOF and repair verifier bounds
* fix(apk-signature): recognize internal pipeline cancellation at EOF
* perf(release-exposure): stream PE CodeView/PDB inspection over FileHandle (#13896)
* perf(release-exposure): stream PE CodeView/PDB inspection over FileHandle
* fix(release-exposure): share and bound PE CodeView parsing
* refactor(server): simplify contractToolBindings types and handler dispatch (#13912)
* perf(macho): streamline slice selection diagnostics (#13905)
* fix(macho): preserve retained magic from valid FAT ranges (#13910)
* perf(pe): stream PE load-config inspection over FileHandle (#13901)
* perf(pe): stream PE load-config inspection over FileHandle
* fix(pe): admit empty section tables and batch TLS callback reads
* perf(elf): stream ELF note inspection over FileHandle (#13904)
* perf(elf): stream ELF note inspection over FileHandle
* fix(elf): validate full header extents and reuse aliased note reads
* fix(macho): keep header reads inside declared slices (#13913)
* perf(v8): stream V8 code cache inspection over FileHandle (#13907)
* fix(macho): correct encryption range VM mapping (#13918)
* perf(elf): stream kernel module inspection over FileHandle (#13917)
* perf(elf): stream kernel module inspection over FileHandle
* test(elf): exercise streamed kernel module reads and finalization
* refactor(providers): share offlineArtifactFailureDialect across offline providers (#13921)
* test(macho): consolidate fixed header and extent proofs (#13919)
* perf(macho): bound positional command string probes (#13925)
* refactor(server): replace server.close and onclose monkey-patching with lifecycle hooks (#13882)
* refactor(server): replace server.close and onclose monkey-patching with lifecycle hooks
* fix(mcp): keep deferred runtime cleanup out of protocol close
* test(mcp): verify materialized runtime hooks close once
* fix(cli): defer artifact AnalysisView loading until requested
* test(macho): consolidate native path framing proofs (#13926)
* perf(elf): stream ELF dependency inspection over FileHandle (#13915)
* perf(elf): stream ELF dependency inspection over FileHandle
* fix(elf): share dependency hash parsing and bound string reads
* perf(elf): reuse cached prefixes for short dependency names
* refactor(server): extract debugger and instrumentation tool bindings (#13909)
* refactor(server): extract debugger and instrumentation tool bindings
* test(server): track extracted debugger bindings in reverse tools coverage
* fix(cli): defer artifact AnalysisView loading until requested
(cherry picked from commit
|
||
|
|
38bf511a50 |
fix(errors)!: report unsupported and unrecognized targets on the TargetFailure model (#14281)
* feat(errors)!: add the TargetFailure model, its projection table and conformance registry Introduce one domain-owned TargetFailure value whose kind alone derives the public code, category, retryability, recovery and details, for CLI and MCP alike. Selected-file malformed and truncated refusals are the first area on it: AnalysisMalformedTargetError is replaced by AnalysisTargetFailureError, and ParseFailure's byte-structure variants are TargetFailure variants rather than a parallel type. The shared stableArtifactParserFailureCli loop is replaced by a declarative registry (tests/support/targetFailure/readers/*.ts) and one generated suite that runs every registered case through the CLI and MCP. BREAKING CHANGE: selected-file malformed and truncated refusals add details.failure_kind, and a truncated target's remediation now says to re-acquire the complete file instead of choosing another target. Codes are unchanged. Affected operations: every operation that refuses a selected file's malformed or truncated bytes, including the ELF, PE, Mach-O, DWARF, Go, Rust, BEAM, pyc, devicetree, Apple IPS, kernel module, binary hardening, managed PE/CLI and IL2CPP readers. * test(managed): name the target failure error in the merged status test * docs(reference): name the error CSV instead of linking a non-page file * fix(tests): expect the path reason for non-regular dyld inputs #14225 refuses a non-regular dyld input as ArtifactReaderFailure("path"); dylibFileLifetime still expected "format" and fails on main's shard 9. * fix(tests): expect io, invariant and path where #14225 reclassified stableArtifact expected "format" for an impossible descriptor byte count (now io) and an invalid chunk size (now InternalInvariantError); directoryArtifactReaderOpen expected "format" for a non-file entry (now path, the same change as #14238). All three fail on main. * fix(errors)!: raise container reader byte faults as malformed or truncated targets Delete the ambiguous `format` reason from ArtifactReaderFailure and ArtifactOperationError. Each container reader now raises its owner's fact once, through malformedArtifact / truncatedArtifact, with format, offset, field and measured extents. Short reads inside a measured extent are read-coverage integrity failures, path-kind refusals are `path`, foreign or recovery-requiring inputs are `unsupported`, host tool output is `io`, and REA defects are InternalInvariantError. The trace, NTFS journal, release exposure, web capture, native macOS and web artifact adapters project the reader's parsed facts as AnalysisTargetFailureError instead of invalid_request. Inventory malformed, truncated, unsupported and cancelled reasons take their code from the TargetFailure projection table, so a truncated container is unsupported_target with failure_kind "truncated" on both paths. BREAKING CHANGE: inventory_artifact, inspect_artifact, extract_artifact, analyze_javascript_application, inspect_desktop_application, inspect_keyed_archive, inspect_asset_catalog, inspect_nuget_nupkg, trace_dylib_resolution, trace_web_module_imports and trace_web_source_location report damaged container bytes as unsupported_target (details.reason "malformed" or "truncated", with failure_kind and format) instead of artifact_operation_failed with reason "format", and a truncated container as unsupported_target instead of truncated. inspect_playwright_trace, inspect_ntfs_journal, audit_release_exposure, the web capture inspection operations and the caller-selected import and source maps report damaged selected bytes as unsupported_target instead of invalid_request. The `format` reason no longer appears in details.reason. * test(artifacts): expect target failure codes in compiled CLI and MCP suites * fix(errors)!: refuse malformed SQLite, pwntools and EVM inputs as target failures The SQLite engine's `format` reason is renamed to `malformed` at its owner (SQLITE_INSPECTION_REASONS), and its refusal becomes an AnalysisTargetFailureError at the selected path with format "sqlite". The pwntools and EVM worker replies keep their wire reason "format", which their workers define, and the adapters translate it once into a malformed target failure with the profile's format (elf, elf-core, evm-bytecode) instead of an invalid_format argument issue. SQLite joins the target-failure conformance registry. BREAKING CHANGE: inspect_sqlite_database, inspect_binary_layout, inspect_recorded_crash and inspect_evm_interface report a selected file's malformed bytes as unsupported_target with details.failure_kind "malformed", format_failure, format and path, instead of invalid_request with an invalid_format issue on path. * fix(errors): give the integrity kind a schema-valid code and list the reference page artifact_integrity_mismatch's projection schema requires declared and calculated digests, which a TargetFailure of kind integrity does not carry, so the kind now projects artifact_operation_failed with category integrity_mismatch. The model test validates every kind's projection against analysisErrorProjectionSchema. The reference page joins the documentation sidebar. * fix(artifacts): report a short carrier read as a changed file and keep unsupported desktop probes local A Bun or Node SEA short read inside a range already checked against the measured size meant the file changed, not that it was truncated. The carrier range reader and Bun's readExact now raise read-coverage integrity for it, and keep 'outside the file' as the truncated case. DesktopFileInspection records an unsupported managed-metadata probe as a row issue again, so later file checks still run. * test(errors): expect target failure facts in the pwntools and EVM reply suites The literal-replacement scenario now reads the failure's detail instead of an issues[] message, and a malformed reply wrapped by cleanup failure reports category unsupported_target. * test(errors): register PE DOS-signature and truncated IPS refusals and drop their per-command copies The non-MZ PE imports and load-config cases (PE32/PE32+, ZZ and high-bit signatures) and the truncated Apple IPS body move into the conformance registry, which runs them through the CLI and MCP and now also checks that a refusal leaves the selected file unchanged. The per-command tests keep only their valid-image controls. * test(sqlite): drop the malformed-database provider test the conformance registry covers inspect_sqlite_database/not-a-database in the target-failure registry runs the same non-SQLite bytes through the CLI and MCP, asserts the malformed target facts and checks the selected file is unchanged. * feat(errors)!: make failure_kind the identifier and derive code and retry from it Apply the owner review on #14239 to the TargetFailure model: - remove details.format_failure; failure_kind is the only identifier; - give integrity, conflict and io their own codes (target_integrity_mismatch, input_conflict, host_io_failed) and derive inventory malformed, truncated and unsupported codes from the same table; - add a retry hint (none, backoff, after_change) derived from the kind, with io refined by its transient errno fact; retryable stays the unchanged-retry flag and is true exactly for backoff; - rename the limit-cut result code and category truncated to partial; - drop cancelled and resource from the target kinds and spell identifiers in American English (unrecognized); - return a target failure a tool handler throws as a projected isError result instead of letting the SDK flatten it to text. BREAKING CHANGE: details.format_failure is removed (read details.failure_kind). The truncated result code and category are now partial. Target integrity failures report target_integrity_mismatch, host read failures host_io_failed and disagreeing inputs input_conflict. Inventory operations (inventory_artifact, inspect_artifact, extract_artifact and the other inventory callers) report truncated container bytes as unsupported_target. Every target failure carries a top-level retry hint. * test(sqlite): expect a malformed target for non-database bytes in the CLI suite * fix(artifacts): keep changed-file short reads, invalid offsets and EOF declarations apart PyInstaller reads inside the measured size, and .NET bundle manifest refills, now raise read-coverage integrity on a zero-byte read instead of truncated. A .NET bundle field and a Godot PCK directory entry that extend past the file are truncated (with offset and extents) instead of malformed. An absent or invalid ASAR packed offset is malformed; only a valid range past the archive is truncated. The .NET manifest string offset is reported in file coordinates. * fix(pwntools): report a short ELF header as a truncated target The layout and recorded-crash workers raise a distinct truncated reason when the file ends inside the ELF identification or header, and the decoder projects it as failure_kind truncated instead of inferring it from the message. * fix(errors)!: report managed coverage gaps and IL2CPP pair conflicts as target failures Managed readers interpret an issue code once, in managedIssueTargetFailure: a coverage gap is an unsupported target, every other rule violation is a malformed target, and the inventory metadata status is derived from that same fact. managedInspectionTargetFailure now returns only AnalysisTargetFailureError. An IL2CPP binary that parses but does not link to its metadata is a conflict target failure that lists both inputs and blames neither, in place of an invalid_request with two issue entries. Metadata version 108 is an unsupported target. The CLI spells each conflict input's field by the command's option name. BREAKING CHANGE: inspect_managed_artifact, inspect_managed_members, inspect_managed_native_boundaries and the managed comparison operations report unsupported metadata or signature forms as an AnalysisTargetFailureError (failure_kind unsupported, format pe-cli, field, offset) instead of a bare unsupported target. inspect_il2cpp_metadata reports a binary/metadata pair that does not link as code input_conflict with failure_kind conflict and details.inputs, instead of invalid_request with details.issues, and metadata version 108 with failure_kind unsupported. * fix(artifacts): verify the carrier before blaming a short read on the bytes The NTFS $MFT decoder, positional members (FIT, uImage, Bun, Deno) and .NET bundle members now re-verify the source before reporting a short stream as malformed, so a file that changed during the read reports the change. The truncation site builds the model's measured extent. * fix(errors)!: report inventory refusals as target failures of the selected path An inventory, inspection or extraction refused damaged or unsupported container bytes as an ArtifactOperationError whose reason repeated the format owner's kind. It carried no path or retry hint, so the conformance registry could not express container cases. translateArtifactFailure now takes the selected path and returns the reader's TargetFailure as an AnalysisTargetFailureError. The malformed, truncated and unsupported reasons, their classification rows and their presentation branch are deleted from ArtifactOperationError. Readers' unsupported refusals carry their format facts through unsupportedArtifact. Container cases move into the conformance registry, which now opens the target first for session tools such as inspect_artifact. BREAKING CHANGE: inventory_artifact, inspect_artifact, extract_artifact and the bundle readers report a refused container as a target failure of details.path with a top-level retry. details.reason is the owner's description and details.detail is removed. * docs(il2cpp): describe pair conflicts as input_conflict with both inputs * docs(android): name unsupported_target for truncated boot image structures * fix(errors)!: report a target that changed during the read as failure_kind changed Inventory integrity failures whose check means the target moved under the read (container, member and unpacked-entry identity, read coverage, traversal coverage) now take the model's changed projection: code artifact_changed, retry backoff and details.failure_kind changed. A selected target that no longer matches the one the session admitted gets its own admitted-identity check and keeps its reopen recovery. BREAKING CHANGE: inventory_artifact, inspect_artifact, extract_artifact and the other inventory operations report a target that changed during the read as artifact_changed (retryable, failure_kind changed) instead of artifact_operation_failed. Admission-identity refusals report integrity_check admitted-identity instead of container-identity. * test(artifacts): raise the cleanup fixture's decode refusal with its format facts * fix(errors)!: report unsupported and unrecognized targets on the TargetFailure model AnalysisUnsupportedTargetError carried a free-text reason and remediation beside the TargetFailure model, so unsupported refusals had no format, failure_kind or retry hint, and their recovery was prose written at each producer. The class is deleted. Producers raise unsupportedTarget or unrecognizedTarget with the owner's format, and consumers read targetFailureOfKind. The projection table renders the recovery and names the operations the owner lists in related.operations. The foreign-bytes identity loop moves into the conformance registry. BREAKING CHANGE: unsupported and unrecognized targets report failure_kind, format and retry. Their remediation comes from the target-failure table; producer-written remediation sentences are folded into details.reason or replaced by details.related_operations. * test(artifacts): expect admitted-identity for selections replaced before admission A selected source replaced before admission fails the admitted-identity check rather than container-identity since the changed/admitted split. * test(go): name the fixture and result when an MZ carrier is not refused through MCP * style: format the migrated target-failure tests * test(errors): expect the PE readers' native-binary format label for foreign bytes * test(verify): expect target failures for damaged ELF, core and EVM inputs in real-provider verifiers The binary-layout, recorded-crash and EVM verifiers still expected invalid_input for malformed or truncated selected bytes. The pwntools and EVM adapters now report those as unsupported_target with failure_kind; a missing path remains invalid_input. * test(web): expect the partial code for a refused source-map admission The limit-cut code is partial; this Windows-lane test arrived from main with the old truncated spelling. * fix(artifacts): keep refusal facts on DMG verdicts and the selected bundle path hdiutil's "image not recognized" verdict raised the unsupported reason without the owner's facts, so the inventory translation treated it as a reader defect. It now carries an unsupported dmg target failure, and the reader-failure constructor requires facts for every target reason. A bundle resource refusal names the caller's selected bundle path rather than its resolved target. The real-provider verifiers and the Android, source-location acceptance tests expect the model's target-failure categories and codes. * test(errors): assert unsupported refusals' kind and format, and align verifiers and the Electron guide * test(errors): check the MCP target failure as the text clients receive The stdio transport removes the private structured carrier from every isError result, so the conformance suite asserted a field that never reaches clients and failed every case. The projected diagnostic is checked from the JSON text instead. * test(errors): raise main's new unsupported-target fixtures through the model * test(artifacts): expect artifact_changed when selected bytes change after inventory Bundle resources replaced after open and unselected JavaScript sources rewritten after inventory now fail a change check, so they report artifact_changed with retry backoff rather than artifact_operation_failed. * fix(errors): report a session digest mismatch as admitted-identity The digest the session admitted does not change when the same request is repeated, so targetDigestChangedFailure was inviting a backoff retry that fails the same way. It now names admitted-identity, which stays artifact_operation_failed and not retryable, and tells the caller to reopen. Co-authored-by: morluto <morluto@users.noreply.github.com> * fix(artifacts): classify unused PyInstaller compressed input as layout zlib stops at the first complete stream, so a declared span that arrives intact but is not fully consumed is trailing junk or a second stream, not a file that changed. A source that ends before that span stays read-coverage. The cached-carrier test replaces the file with a different size so a shared timestamp cannot hide the rewrite. Co-authored-by: morluto <morluto@users.noreply.github.com> * test(applications): expect unsupported_target for a damaged trace stream A trace member whose CRC fails is a malformed zip target. The partial Evidence assertion now checks that code, failure_kind and format. Co-authored-by: morluto <morluto@users.noreply.github.com> * test(artifacts): assert Android refusal kinds and drop the SEA registry case details.reason is the owner's description, so the boot-image refusals assert failure_kind and format. A malformed SEA blob inside an ELF stays an outer-format inventory with a recognition limitation, which the Node SEA reader tests already cover, so it is not an inspect_artifact refusal. Co-authored-by: morluto <morluto@users.noreply.github.com> * fix(artifacts): pass the selected path into translated target failures translateArtifactFailure names the caller-selected path on a format refusal. Directory inspection and a retained artifact scope both know that path and now supply it. Co-authored-by: morluto <morluto@users.noreply.github.com> * fix(artifacts): charge global pax records against the tar metadata budget Repeated pax global headers were copied into one map without a charge, so each header could stay inside the extended-header allowance while the map grew without a bound. The retained metadata budget is charged for the merged map's keys, values and entries before that map is allocated. Co-authored-by: morluto <morluto@users.noreply.github.com> * test(dylib): expect admitted-identity when the opened target is replaced The session keeps the digest it admitted, so replacing the executable and repeating trace_dylib_resolution is not a retryable container change. Co-authored-by: morluto <morluto@users.noreply.github.com> * style: format the inventory path translation and conformance suite * fix(artifacts): keep the unsupported-target migration in files the inventory merge replaced * test(errors): expect target failures for ZIP inventory refusals and input_conflict for an unlinked IL2CPP pair * test(artifacts): expect a malformed target failure for an ISO 9660 directory cycle * test(web): expect a malformed target failure on the captured source path * test(artifacts): expect a malformed ZIP target failure for a corrupt Zstandard member * test(javascript): read the owner's input facts from details.reason and recovery from the projection * test(iso9660): assert the malformed target failure fields details.reason is the owner's description. The compiled CLI refusal is identified by failure_kind and format. Co-authored-by: morluto <morluto@users.noreply.github.com> * test(errors): assert selection and unsupported view fields A desktop root that is not a directory is a selection failure, so the CLI reports invalid_request. An analysis view the parent cannot supply is unsupported evidence; the tests read failure_kind, format, field and related_operations. Co-authored-by: morluto <morluto@users.noreply.github.com> * fix(errors): keep binary plist UID facts on unsupported targets Pass the reader's UnsupportedBinaryPlistUidError failure through instead of rebuilding a bplist refusal that drops field and undecodedContent. Co-authored-by: morluto <morluto@users.noreply.github.com> * test(errors): keep oversized binary plist UID facts on keyed archives Assert the reader projects format, field, and undecoded content from the parser failure instead of a rebuilt bplist refusal. Co-authored-by: morluto <morluto@users.noreply.github.com> --------- Co-authored-by: Cursor Agent <cursoragent@cursor.com> Co-authored-by: morluto <morluto@users.noreply.github.com> |
||
|
|
a61ff39c9a |
fix(errors)!: refuse malformed SQLite, pwntools and EVM inputs as target failures (#14268)
* feat(errors)!: add the TargetFailure model, its projection table and conformance registry Introduce one domain-owned TargetFailure value whose kind alone derives the public code, category, retryability, recovery and details, for CLI and MCP alike. Selected-file malformed and truncated refusals are the first area on it: AnalysisMalformedTargetError is replaced by AnalysisTargetFailureError, and ParseFailure's byte-structure variants are TargetFailure variants rather than a parallel type. The shared stableArtifactParserFailureCli loop is replaced by a declarative registry (tests/support/targetFailure/readers/*.ts) and one generated suite that runs every registered case through the CLI and MCP. BREAKING CHANGE: selected-file malformed and truncated refusals add details.failure_kind, and a truncated target's remediation now says to re-acquire the complete file instead of choosing another target. Codes are unchanged. Affected operations: every operation that refuses a selected file's malformed or truncated bytes, including the ELF, PE, Mach-O, DWARF, Go, Rust, BEAM, pyc, devicetree, Apple IPS, kernel module, binary hardening, managed PE/CLI and IL2CPP readers. * test(managed): name the target failure error in the merged status test * docs(reference): name the error CSV instead of linking a non-page file * fix(tests): expect the path reason for non-regular dyld inputs #14225 refuses a non-regular dyld input as ArtifactReaderFailure("path"); dylibFileLifetime still expected "format" and fails on main's shard 9. * fix(tests): expect io, invariant and path where #14225 reclassified stableArtifact expected "format" for an impossible descriptor byte count (now io) and an invalid chunk size (now InternalInvariantError); directoryArtifactReaderOpen expected "format" for a non-file entry (now path, the same change as #14238). All three fail on main. * fix(errors)!: raise container reader byte faults as malformed or truncated targets Delete the ambiguous `format` reason from ArtifactReaderFailure and ArtifactOperationError. Each container reader now raises its owner's fact once, through malformedArtifact / truncatedArtifact, with format, offset, field and measured extents. Short reads inside a measured extent are read-coverage integrity failures, path-kind refusals are `path`, foreign or recovery-requiring inputs are `unsupported`, host tool output is `io`, and REA defects are InternalInvariantError. The trace, NTFS journal, release exposure, web capture, native macOS and web artifact adapters project the reader's parsed facts as AnalysisTargetFailureError instead of invalid_request. Inventory malformed, truncated, unsupported and cancelled reasons take their code from the TargetFailure projection table, so a truncated container is unsupported_target with failure_kind "truncated" on both paths. BREAKING CHANGE: inventory_artifact, inspect_artifact, extract_artifact, analyze_javascript_application, inspect_desktop_application, inspect_keyed_archive, inspect_asset_catalog, inspect_nuget_nupkg, trace_dylib_resolution, trace_web_module_imports and trace_web_source_location report damaged container bytes as unsupported_target (details.reason "malformed" or "truncated", with failure_kind and format) instead of artifact_operation_failed with reason "format", and a truncated container as unsupported_target instead of truncated. inspect_playwright_trace, inspect_ntfs_journal, audit_release_exposure, the web capture inspection operations and the caller-selected import and source maps report damaged selected bytes as unsupported_target instead of invalid_request. The `format` reason no longer appears in details.reason. * test(artifacts): expect target failure codes in compiled CLI and MCP suites * fix(errors)!: refuse malformed SQLite, pwntools and EVM inputs as target failures The SQLite engine's `format` reason is renamed to `malformed` at its owner (SQLITE_INSPECTION_REASONS), and its refusal becomes an AnalysisTargetFailureError at the selected path with format "sqlite". The pwntools and EVM worker replies keep their wire reason "format", which their workers define, and the adapters translate it once into a malformed target failure with the profile's format (elf, elf-core, evm-bytecode) instead of an invalid_format argument issue. SQLite joins the target-failure conformance registry. BREAKING CHANGE: inspect_sqlite_database, inspect_binary_layout, inspect_recorded_crash and inspect_evm_interface report a selected file's malformed bytes as unsupported_target with details.failure_kind "malformed", format_failure, format and path, instead of invalid_request with an invalid_format issue on path. * fix(errors): give the integrity kind a schema-valid code and list the reference page artifact_integrity_mismatch's projection schema requires declared and calculated digests, which a TargetFailure of kind integrity does not carry, so the kind now projects artifact_operation_failed with category integrity_mismatch. The model test validates every kind's projection against analysisErrorProjectionSchema. The reference page joins the documentation sidebar. * fix(artifacts): report a short carrier read as a changed file and keep unsupported desktop probes local A Bun or Node SEA short read inside a range already checked against the measured size meant the file changed, not that it was truncated. The carrier range reader and Bun's readExact now raise read-coverage integrity for it, and keep 'outside the file' as the truncated case. DesktopFileInspection records an unsupported managed-metadata probe as a row issue again, so later file checks still run. * test(errors): expect target failure facts in the pwntools and EVM reply suites The literal-replacement scenario now reads the failure's detail instead of an issues[] message, and a malformed reply wrapped by cleanup failure reports category unsupported_target. * test(errors): register PE DOS-signature and truncated IPS refusals and drop their per-command copies The non-MZ PE imports and load-config cases (PE32/PE32+, ZZ and high-bit signatures) and the truncated Apple IPS body move into the conformance registry, which runs them through the CLI and MCP and now also checks that a refusal leaves the selected file unchanged. The per-command tests keep only their valid-image controls. * test(sqlite): drop the malformed-database provider test the conformance registry covers inspect_sqlite_database/not-a-database in the target-failure registry runs the same non-SQLite bytes through the CLI and MCP, asserts the malformed target facts and checks the selected file is unchanged. * feat(errors)!: make failure_kind the identifier and derive code and retry from it Apply the owner review on #14239 to the TargetFailure model: - remove details.format_failure; failure_kind is the only identifier; - give integrity, conflict and io their own codes (target_integrity_mismatch, input_conflict, host_io_failed) and derive inventory malformed, truncated and unsupported codes from the same table; - add a retry hint (none, backoff, after_change) derived from the kind, with io refined by its transient errno fact; retryable stays the unchanged-retry flag and is true exactly for backoff; - rename the limit-cut result code and category truncated to partial; - drop cancelled and resource from the target kinds and spell identifiers in American English (unrecognized); - return a target failure a tool handler throws as a projected isError result instead of letting the SDK flatten it to text. BREAKING CHANGE: details.format_failure is removed (read details.failure_kind). The truncated result code and category are now partial. Target integrity failures report target_integrity_mismatch, host read failures host_io_failed and disagreeing inputs input_conflict. Inventory operations (inventory_artifact, inspect_artifact, extract_artifact and the other inventory callers) report truncated container bytes as unsupported_target. Every target failure carries a top-level retry hint. * test(sqlite): expect a malformed target for non-database bytes in the CLI suite * fix(artifacts): keep changed-file short reads, invalid offsets and EOF declarations apart PyInstaller reads inside the measured size, and .NET bundle manifest refills, now raise read-coverage integrity on a zero-byte read instead of truncated. A .NET bundle field and a Godot PCK directory entry that extend past the file are truncated (with offset and extents) instead of malformed. An absent or invalid ASAR packed offset is malformed; only a valid range past the archive is truncated. The .NET manifest string offset is reported in file coordinates. * fix(pwntools): report a short ELF header as a truncated target The layout and recorded-crash workers raise a distinct truncated reason when the file ends inside the ELF identification or header, and the decoder projects it as failure_kind truncated instead of inferring it from the message. * fix(artifacts): verify the carrier before blaming a short read on the bytes The NTFS $MFT decoder, positional members (FIT, uImage, Bun, Deno) and .NET bundle members now re-verify the source before reporting a short stream as malformed, so a file that changed during the read reports the change. The truncation site builds the model's measured extent. * docs(android): name unsupported_target for truncated boot image structures * fix(errors)!: report a target that changed during the read as failure_kind changed Inventory integrity failures whose check means the target moved under the read (container, member and unpacked-entry identity, read coverage, traversal coverage) now take the model's changed projection: code artifact_changed, retry backoff and details.failure_kind changed. A selected target that no longer matches the one the session admitted gets its own admitted-identity check and keeps its reopen recovery. BREAKING CHANGE: inventory_artifact, inspect_artifact, extract_artifact and the other inventory operations report a target that changed during the read as artifact_changed (retryable, failure_kind changed) instead of artifact_operation_failed. Admission-identity refusals report integrity_check admitted-identity instead of container-identity. * test(artifacts): expect admitted-identity for selections replaced before admission A selected source replaced before admission fails the admitted-identity check rather than container-identity since the changed/admitted split. * test(go): name the fixture and result when an MZ carrier is not refused through MCP * test(verify): expect target failures for damaged ELF, core and EVM inputs in real-provider verifiers The binary-layout, recorded-crash and EVM verifiers still expected invalid_input for malformed or truncated selected bytes. The pwntools and EVM adapters now report those as unsupported_target with failure_kind; a missing path remains invalid_input. * test(web): expect the partial code for a refused source-map admission The limit-cut code is partial; this Windows-lane test arrived from main with the old truncated spelling. * test(errors): check the MCP target failure as the text clients receive The stdio transport removes the private structured carrier from every isError result, so the conformance suite asserted a field that never reaches clients and failed every case. The projected diagnostic is checked from the JSON text instead. * test(artifacts): expect artifact_changed when selected bytes change after inventory Bundle resources replaced after open and unselected JavaScript sources rewritten after inventory now fail a change check, so they report artifact_changed with retry backoff rather than artifact_operation_failed. * fix(errors): report a session digest mismatch as admitted-identity The digest the session admitted does not change when the same request is repeated, so targetDigestChangedFailure was inviting a backoff retry that fails the same way. It now names admitted-identity, which stays artifact_operation_failed and not retryable, and tells the caller to reopen. Co-authored-by: morluto <morluto@users.noreply.github.com> * fix(artifacts): classify unused PyInstaller compressed input as layout zlib stops at the first complete stream, so a declared span that arrives intact but is not fully consumed is trailing junk or a second stream, not a file that changed. A source that ends before that span stays read-coverage. The cached-carrier test replaces the file with a different size so a shared timestamp cannot hide the rewrite. Co-authored-by: morluto <morluto@users.noreply.github.com> * test(applications): expect unsupported_target for a damaged trace stream A trace member whose CRC fails is a malformed zip target. The partial Evidence assertion now checks that code, failure_kind and format. Co-authored-by: morluto <morluto@users.noreply.github.com> * test(dylib): expect admitted-identity when the opened target is replaced The session keeps the digest it admitted, so replacing the executable and repeating trace_dylib_resolution is not a retryable container change. Co-authored-by: morluto <morluto@users.noreply.github.com> --------- Co-authored-by: Cursor Agent <cursoragent@cursor.com> Co-authored-by: morluto <morluto@users.noreply.github.com> |
||
|
|
ef4945cd01 |
fix(evm): report the locked EVMole engine version (#14407)
* fix(evm): report the locked EVMole engine version * fix(evm): keep engine provenance in provider evidence * fix(evm): supervise offline verifier commands through cleanup |
||
|
|
af06970015 | perf(ci): check recent runs first for a trusted baseline (#14403) | ||
|
|
e896f60540 |
feat(artifacts)!: inventory and extract ISO 9660 disc images offline (#13290)
feat(artifacts)!: inventory and extract ISO 9660 disc images offline Add an offline iso9660 artifact format. inspect-artifact and extract-artifact (and the MCP tools) read the volume descriptors and one directory tree, list each file and directory as an occurrence, and extract stored file bytes without mounting the image or calling a host tool. Traversal limits are exposed via artifact_limits.iso9660. BREAKING CHANGE: artifactReaderLimitsSchema now requires iso9660 (descriptor_count, directory_depth, record_count, directory_bytes, path_bytes), so saved Evidence records containing effective_limits from prior versions without iso9660 fail parseInventoryPage validation and must be re-inspected. |
||
|
|
42bbf33f2d |
fix(ci): preserve CodeQL PR checkout history and exclude non-shipped verifiers (#14385)
* fix(ci): preserve CodeQL PR checkout history and exclude non-shipped verifiers * test(ci): verify planCodeqlLanguages excludes non-shipped verifiers |
||
|
|
f145aca28f | perf(ci): defer failure artifacts until main comparison is possible (#14379) | ||
|
|
c718143643 |
perf(ci): warm caches on main push and run scheduled fast main sweeps (#14383)
* perf(ci): warm caches on main push and run scheduled fast main sweeps * fix(ci): preserve checkout history and fail-closed baseline/sweep gates |
||
|
|
229ba77b1a |
perf(ci): trace fixed-ceiling baselines and owned bridge sources in PR test selection (#14375)
* perf(ci): trace fixed-ceiling baselines and owned bridge sources in PR test selection * test(ci): cover all bridge owner groups and non-packaging missing owners |
||
|
|
56cf15566e |
feat(artifacts)!: inspect and compare directories by a content-addressed root digest (#14270)
* feat(artifacts)!: inspect and compare directories by a content-addressed root digest
inspect_artifact takes an optional path and inspects it without the open
session target; a directory is inventoried in place. compare_artifacts
accepts {kind:"path",path} on either side. open_binary is unchanged and
still refuses ordinary directories with directory_requires_file.
The inventory owner computes a versioned tree digest (rea-directory-tree
v1) from the walk it already performs: SHA-256 over length-prefixed
records of each member's NFC path, kind and content digest, sorted by
path bytes. Symlink targets are recorded and not followed; FIFOs,
sockets and devices are recorded by kind. A walk that a limit or an
unreadable member stops reports root_digest partial with no digest.
BREAKING CHANGE: subject.identity gains a directory kind
{kind:"directory",algorithm:"rea-directory-tree",version:1,sha256}. A
directory inventory's subject and root sha256 are its tree digest, and a
partial walk's subject is {kind:"unknown",reason:"not-observed"}.
inspect_artifact no longer requires an open target. Directory symlink
occurrences record link_target and compare by it.
* fix(artifacts): hash exact directory names and keep failed inspection cleanup retryable
- The tree digest encodes each member's exact stored name bytes instead
of an NFC path, so names that differ only in normalization stay two
members and swapping their contents changes the identity.
- A directory inspection whose readers cannot be released retains its
scope in the caller's lifetime (the MCP session, the CLI session or
the comparison's resource scope), so a later close retries it. The
one-shot session of a path-selected file is retained the same way.
- compare_artifacts keeps a completed left inventory as an argument
observation when the right side fails.
- A summary of a partial directory inventory, whose subject is unknown,
resolves to its exact parent and compares with unknown coverage.
- The directory identity reference is in the site navigation, and the
CLI boundary test passes the comparison command its environment.
* fix(evidence): treat complete directory identities as artifact subjects in claims and digest filters
verify_reconstruction required a file subject for every structural
source, so a structural-artifact claim over two complete directory
inventories stayed unknown even when compare_artifacts confirmed a
difference. Artifact claims now accept a file or directory identity;
function claims remain file-only.
get_evidence_bundle's target_sha256 filter compared only file subjects,
so a directory's returned tree digest matched no records. It now
matches the digest of a file or directory subject.
* fix(artifacts): resolve a selected directory against the caller's cwd
A relative directory selection such as "." reached the directory route
unresolved, so the subject's local_path was the relative spelling.
The directory route now uses the caller path owner, as target admission
does for files, and records the absolute path.
The CLI acceptance test that pinned "inspect-artifact ." to
directory_requires_file now expects the inventoried empty directory,
and the macOS bundle verifier asserts the .app directory's tree-digest
identity instead of a file format.
* fix(artifacts): address PR #14270 review findings on partial roots, CLI evidence delivery, cleanup retry, and tool effects
* fix(artifacts): collect linked source closure for comparison exports
* fix(artifacts): require matching root digest schemes before comparing root hashes
* fix(artifacts): compare stored directory filenames across normalization forms
|
||
|
|
d8aadcc69b |
feat(ghidra): admit RISC-V ilp32f ELF with a derived calling convention (#8401)
* feat(ghidra): record the RISC-V float-ABI calling-convention decision Decision D3 (#7477), provisional: admit ELF32 soft-float (ilp32) RISC-V images through a lane that keeps the pinned RISCV:LE:32:default language and corrects the calling convention in the bridge. This commit is the contract only; admission is unchanged. - The domain owns the e_flags float-ABI vocabulary and parses .riscv.attributes and Tag_RISCV_arch into a declared, absent or unavailable ISA declaration. - The Ghidra profile owns the lane table (class and float ABI), lane ids built from fields, the ilp32-prototype-v1 policy and its __rea_ilp32 prototype, and the extensions Ghidra 12.1.4 decodes with p-code. - The session handshake accepts the bridge's calling-convention report. - docs/ghidra-riscv.md keeps the decision record and per-ABI policies for ilp32 and ilp32f; a test keeps it in step with the tables. - tests/conformance/c/riscv-float-abi.c is the source the policies were measured on. * feat(ghidra): admit RISC-V ilp32 ELF with a derived calling convention ESP32-C2, C3, C5, C6, C61, H2 and H21 builds are ELF32 soft-float (ilp32) images, which the RISC-V lane refused at its double-float check. Ghidra 12.1.4's generic RV32 compiler specification models ilp32d, so its stock prototype would read float and double arguments from fa0-fa7. - Target resolution reads the one SHT_RISCV_ATTRIBUTES section through the same bounded ELF declaration reader as range validation, and records Tag_RISCV_arch as declared, absent or unavailable. - Admission selects a lane from the class and float-ABI table. The soft-float lane also requires an RV32I Tag_RISCV_arch that declares only extensions Ghidra decodes with p-code; the refusal names any others (Zcb, Zcmp, Zcmt, Zb*, xesp*). - Soft-float profiles commit float_abi, arch, riscv_calling_convention ilp32-prototype-v1 and the lane elf32-exec-le-soft-float-generic-v1. Double-float profiles are unchanged. - ReaGhidraRiscvCallingConvention.java runs after analysis. It derives __rea_ilp32 from the default prototype without floating-point entries and rules, with fs0-fs11 killed by calls, self-checks its storage and assigns it to every non-thunk function, external function and function definition. Its report is written last. - The provider client requires that report exactly when the profile commits the policy, before any operation, and keeps it as session limitations and caller-project history. ELF32 single-float (ilp32f), quad-float and ELF64 soft- or single-float images stay refused, now with a reason built from the lane table. * test(ghidra): verify RISC-V ilp32 against real Ghidra verify:ghidra:riscv now also builds tests/conformance/c/riscv-float-abi.c with ESP32-C3's -march=rv32imc_zicsr_zifencei -mabi=ilp32, typed with DWARF and linked again with --strip-all. Every allocated section of the stripped image must keep its address and bytes. - riscv-checks.mjs holds the ilp32 storage of each fixture function together with the words the compiler's call site writes there. An LLVM objdump reading of the caller must find every word at its stated location: an unaligned named double, the a7/stack split, two floats in an integer pair, a large structure by reference, aligned variadic pairs and an indirect call. - Through CLI and stdio MCP, the soft-float builds must report the soft-float lane and ilp32-prototype-v1, __rea_ilp32 with exactly that storage (one integer word per location when stripped), caller pseudocode that passes the source constants and names no floating-point register, the prototype outcome in retained Evidence, and decoded fence.i and csrr. - The RV32 double-float image relabelled as soft-float, refused before, is admitted through the new lane. RV64 soft-float, single-float and unsupported bits are refused with their reasons. - riscv-checks.test.ts runs the checks offline against recorded LLVM and Ghidra output, including Ghidra's stock ilp32d prototypes as a negative control. * fix(ghidra): pass RISC-V ilp32 values over 8 bytes by reference The psABI passes any value wider than 2 x XLEN by reference, scalars included. __rea_ilp32 converted only structures and unions over 8 bytes to pointers, so a long double (16 bytes) was joined into a1-a4. Measured on Ghidra 12.1.4, rea_riscv_abi_quad(long double value, int sel) read value from a4:4,a3:4,a2:4,a1:4 and sel from a5, where clang passes a pointer in a1 and sel in a2. - ReaGhidraRiscvCallingConvention.java now has one derivation driven by a per-policy row (floating-point entry size, preserved floating-point registers). Every policy inserts a rule before the input list's final join that converts any value of 9 bytes or more to a pointer; a return that size already becomes a caller buffer. The self-check requires a 16-byte value to pass by reference. - The fixture gains rea_riscv_abi_quad. The call-site oracle now checks the words the by-reference pointers point at, for the large structure and the long double, and the recorded data comes from an LLVM 19 build. - docs/ghidra-riscv.md: the decision record and the ilp32 policy row. ilp32-prototype-v1 keeps its id: no release carries it yet. * feat(ghidra): record the RISC-V ilp32f calling-convention decision Decision D3 (#7477), provisional, gains its ilp32f row: ELF32 images that declare the single-float ABI are admitted through the lane elf32-exec-le-single-float-generic-v1 with policy ilp32f-prototype-v1 and the __rea_ilp32f prototype, keeping the pinned RISCV:LE:32:default language. - The lane table gains the row, and admission requires the F extension in Tag_RISCV_arch beside the decoded-extension check. - docs/ghidra-riscv.md records how the one-float-one-integer rule is realised: the shared derivation's row limits float entries to 4 bytes, keeps fs0-fs11 preserved and adds Ghidra 12.1.4's join_dual_class with fillalternate for structures of up to 8 bytes. The prototype is the only thing that assigns storage: a check of every typed function and function-pointer type against the psABI refuses the image when one uses a shape the prototype misplaces (a float with two shorts, a pointer or a union, _Float16, packed or over-aligned float structures). float _Complex, which Ghidra imports as a qword, stays unmodelled. Custom storage for typed functions and an unverified-signature admission are recorded alternatives. - The session report for ilp32f can carry the bridge's refusal instead of the outcome; the handshake turns it into the user-facing reason. - tests/conformance/c/riscv-float-abi.c gains single-float-only shapes and a refused variant; the ilp32 build's code is unchanged. Until the bridge implements the policy (next commit), its post-analysis script rejects the new policy id and REA refuses ilp32f sessions. * feat(ghidra): apply the RISC-V ilp32f calling convention in the bridge ReaGhidraRiscvCallingConvention.java gains ilp32f-prototype-v1 as a row of its one derivation: float entries limited to 4 bytes, fs0-fs11 preserved, and structures that Ghidra's dual-class join splits between register files. The ilp32 row and its checks are unchanged. - For that row the derivation inserts, before the input and output lists' final join, a rule giving structures of up to 8 bytes join_dual_class with fillalternate. The shared rule still passes values of 9 bytes or more by reference. - The self-check also pins the storage of a float, double, two-float and float-and-int signature, and requires fs0-fs11 preserved. - After assigning the prototype to every function and function definition, the script compares the storage class it gives each signature type, as a first argument or return, with the psABI's from the flattened fields. It checks every typed function and every definition a pointer type refers to. When any signature uses a shape the prototype misplaces, the report carries a refusal naming up to eight signatures instead of the outcome, and REA refuses the session with that reason. The launcher test covers both policy ids. * test(ghidra): verify RISC-V ilp32f against real Ghidra verify:ghidra:riscv now also builds tests/conformance/c/riscv-float-abi.c with ESP32-H4's -march=rv32imafc_zicsr_zifencei -mabi=ilp32f, typed with DWARF and linked again with --strip-all, and a typed build with REA_RISCV_ABI_UNMODELLED that the bridge must refuse. - riscv-checks.mjs holds per-ABI tables: the ilp32 and ilp32f storage of each fixture function with the words its caller's call site writes there (and, for by-reference values, the words the pointer points at), the callers, and the indirect calls. Stripped builds record where Ghidra's inference differs from one word per typed location. - The objdump call-site oracle now follows fa registers (flw, fsw, fmv.w.x) and tracks stack memory per byte, so word loads see byte and halfword stores, across both callers. - Through CLI and stdio MCP the single-float builds must report the lane, ilp32f-prototype-v1 and __rea_ilp32f with the table's storage, including float-and-integer structures both ways round, float registers running out, long double by reference and an indirect float-and-integer call. - riscv-isa-probe.S adds fmv.w.x and fmv.x.w when the build has F. - The unmodelled build opens, then its first analysis call over MCP and the CLI fails with the bridge's reason naming its three signatures: a function passing a three-field structure, a _Float16 function and a function-pointer type passing the three-field structure. - Header mutations: RV32 double-float relabelled single-float is admitted; the soft-float image relabelled single-float lacks F and is refused; RV64 lp64f and high bits are refused. * test(ghidra): check RISC-V lane limitations by their facts The limitation tests froze a full explanatory sentence, the note count and array positions, so a harmless rewording failed them: the pattern Greptile flagged on #7486. Assert the facts the notes must carry instead: the pinned language, the static-linkage boundary, one note naming the declared ABI, the ABI the pinned language models and the prototype REA applies, and the declared ISA. * test(ghidra): check the ilp32f limitations by their facts Like the ilp32 tests, the ilp32f test froze its explanatory sentence, the note count and array positions. Assert one note naming the declared ilp32f ABI, the modelled ilp32d and the applied `__rea_ilp32f` prototype, and the declared ISA. * test(ghidra): check return storage in stripped RISC-V ilp32 builds The stripped branch of assertRiscvIlp32Storage compared parameter storage only, so an inferred return that lost the high word of a register pair, such as rea_riscv_abi_wide at a0:4 instead of a1:4,a0:4, still passed. Stripped returns must now use the typed build's storage, or none when the result goes through caller memory. Recovered type names are still not compared: a test accepts other type names and refuses the dropped high word. * docs(ghidra): record decision D3 as decided in #7477 * fix(ghidra): flatten RISC-V arrays and bit-fields as the psABI does The ilp32f signature check flattened a by-value type differently from GCC and Clang in two shapes. A nonzero array of empty C++ classes added no fields, so struct { E e[1]; char c; float f; } looked like a char and a float, and the policy admitted a float-and-integer split for a value both compilers pass in two integer registers. A bit-field was bounded by its declared type, so a float beside unsigned long long b : 1 used the integer convention, and the image was refused although __rea_ilp32f places it as the compilers do. An array element with no fields now makes the array use the integer convention, and a bit-field counts by its width. Arrays are also classified once per element type, so an array of empty structures no longer costs one visit per element, and a refusal keeps its counts and at most eight shortened examples instead of every description. The unmodelled build gains a C++ source with the empty-class array, which the refusal must name, and a bit-field function it must not. * fix(ghidra): refuse flexible array members in ilp32f signatures A float beside a flexible array member flattened to a single float, so the policy admitted fa0 for a value Clang passes in a0. Ghidra imports the member as a trailing array without elements, which the walk skipped as a zero-length member. A trailing array without elements now makes the value use the integer convention. Ghidra imports a trailing [0] the same way, and Clang passes that in fa0, so such a structure fails closed too. The unmodelled build gains a flexible-array function the refusal must name. * docs(ghidra): state that hidden-reference C++ classes are not modelled Compilers pass a C++ class with a non-trivial copy constructor or destructor through a hidden pointer, but Ghidra 12.1.4 keeps only its fields, and GCC 14.2 writes no DW_AT_calling_convention, so the ilp32f check cannot detect such a signature. Sessions now state this as a limitation, and the guide lists it as not modelled. * fix(ghidra): refuse ilp32f shapes and D hardware the prototype misplaces A flexible array that starts inside a structure's padding passed the offset check, so its float took fa0 where GCC and Clang use a0. The position among the members now decides. A bare array in a signature can only be a GNU vector, which uses the integer convention, so the policy stops flattening it. With D the ABI preserves only the low 32 bits of fs0-fs11 and Ghidra's model preserves all 64, so the lane refuses d and zcd. Ghidra's import erases float _Complex, a vector inside a structure and _Atomic, so ilp32f sessions now state those limits. * fix(ghidra): refuse ilp32f values Ghidra left untyped Ghidra's DWARF import gives an encoding it does not map an untyped byte, word, dword or qword, so float _Complex, which takes two float registers, showed as an integer in a0 and a1. The policy cannot know such a value's class, so it now refuses any value of up to 8 bytes that holds one, alone or inside a structure. The session limitation no longer lists complex values. * docs(ghidra): match the RISC-V verification notes to the lane * fix(ghidra): refuse padded untyped RISC-V values An over-aligned structure of one float _Complex is 16 bytes, so the 8-byte guard let it fall through to a reference, although GCC and Clang pass it in fa0 and fa1. Decide on the bytes the fields hold, which is what the float convention limits, not on the padded length. * fix(ghidra): walk each RISC-V field type once The held-bytes and untyped checks revisited a nested type for every member, so a chain of structures that each hold two of the last one cost about 2^29 calls before any size check. One cached walk now answers both, once per type. * fix(ghidra): refuse ilp32f values whose bytes may hide a bit-field DWARF omits unnamed bit-fields of nonzero width, which the psABI counts: Clang 19 passes struct { float f; unsigned : 1; } in fa0 and a0, and a following int in a1, while Ghidra sees one float in 8 bytes. A value with a float whose structure has bytes that no member and no natural alignment padding explain now has an unknown class, so the policy refuses the image. Over-aligned structures of up to 8 bytes are refused too. verify:ghidra:riscv's unmodelled build passes such a structure. * perf(ghidra): cache the ilp32f layout checks per type, document padding unexplainedBytes and naturalAlignment recomputed nested types on every chain, so a deeper nesting cost quadratically more. Both now keep one result per stripped DataType, as held() does. The guide now states that an unnamed bit-field in natural padding, as in struct { char c; unsigned : 1; float f; }, leaves no DWARF trace: Clang 19 passes it in a0 and a1 but the lane admits it with the float in fa0. Refusing every padded float value would also refuse common layouts. * fix(ghidra): refuse ilp32f union parameters that may be transparent A transparent union passes as its first member, but DWARF does not record the attribute: Clang 19 passes union { struct { float f; } s; unsigned u; } with transparent_union in fa0, while Ghidra and the psABI class see an ordinary union in a0, so the lane admitted wrong storage. A union parameter whose first member would take a float register now refuses the policy, unless Clang would ignore the attribute: a floating-point first member, or another member of a different size or alignment. Returns are unaffected. verify:ghidra:riscv's unmodelled build passes one such union and three ordinary ones. * fix(ghidra): refuse ilp32f float parameters of old-style C definitions Callers of an old-style (K&R) definition such as float f(x) float x; promote the argument to double: Clang 19 passes it in integer registers and narrows it with __truncdfsf2. DWARF still declares a float and only omits DW_AT_prototyped, which Ghidra 12.1.4's DWARF import drops, so the lane placed it in fa0. When a typed signature has a float parameter, the script now reads DWARF again for C subprograms without DW_AT_prototyped and refuses the policy for their float parameters. C++ and other languages never mark the attribute and are not checked. verify:ghidra:riscv's unmodelled build passes one such definition. * fix(ghidra): admit a direct C++ empty-class member in an ilp32f structure Ghidra imports a C++ empty class as a one-byte structure without components, so the unexplained-bytes check counted its byte as an omitted field. A structure such as `struct S { E e; char c; float f; }` was then UNKNOWN and refused the whole ilp32f image, although GCC 14.2 (ESP-IDF) and Clang 21.1.8 ignore the member when flattening and pass S in a0 and fa0, the storage the derived float-and-integer rule gives it. The check now treats a one-byte structure without components as that storage. A nonzero array of empty classes still uses the integer convention and stays refused. The unmodelled fixture gains rea_riscv_abi_member, which the real-Ghidra verifier requires to be admitted, and the guide names the shape. * fix(ghidra): refuse RISC-V functions compiled from a language without the C psABI Both RISC-V calling-convention policies apply a C psABI prototype to every function, so code from a language with another calling convention, such as Rust's default ABI, was silently given the wrong storage. Before either policy installs its prototype, the bridge now reads the image's DWARF once and refuses the image when a compile unit outside C, C++ and assembly, or one without DW_AT_language, defines a function with code, naming each language. The same pass collects the old-style C definitions the ilp32f check needs, which were read lazily before. This also changes main's ilp32 policy, which had no refusal path. Code that no DWARF compile unit describes cannot be checked, and every session that applies a policy now states that limitation. * test(verify): refuse RISC-V fixtures whose C compile units are labelled Rust The real RISC-V lane rewrites the DW_AT_language of each C compile unit in the typed soft- and single-float builds to Rust, with a bounds-checked reader of the units' abbreviations, and checks that each policy refuses the image and names the language. The unlabelled builds are the controls. * fix(ghidra): refuse ilp32f values whose register fields do not start their parts The psABI puts each flattened field of a structure passed in float registers at bit 0 of its own register, while __rea_ilp32f's dual-class join gives each register a 4-byte part of the value as laid out in memory. Both agree only when every such field starts its part. A C++ empty member keeps its byte although the psABI ignores it as a field, so the char of struct { E e; char c; float f; } passes in bits 0-7 of a0 while the prototype reads bits 8-15; the policy compared only storage classes, which match, and admitted it. Flattening now records each field's bit position, and a value whose float-register fields do not each start their own part is refused, which also covers packed layouts and bit-fields above bit 0. The unmodelled fixture's caller now shows where the compiler puts that char. * docs(ghidra): keep RISC-V guide focused on ABI rules and compatibility --------- Co-authored-by: morluto <76467478+morluto@users.noreply.github.com> |
||
|
|
185700f496 |
fix(ci): search older successful timing runs within budget (#14363)
* fix(ci): search older successful timing runs within budget * test(ci): align inherited Mach-O assertion with main * test(ci): cover reviewed retry stopping conditions * docs(ci): describe timing history pagination and lookup budget --------- Co-authored-by: ShuaixinHuang <ShuaixinHuang@users.noreply.github.com> Co-authored-by: ShuaixinHuang <197200901+ShuaixinHuang@users.noreply.github.com> |
||
|
|
d15068e2b4 |
fix(ci): keep static diagnostics for each workflow attempt (#14360)
* fix(ci): keep static diagnostics for each workflow attempt * test(ci): verify artifact retrieval for static-check retries * docs(ci): explain static diagnostic names on reruns --------- Co-authored-by: ShuaixinHuang <ShuaixinHuang@users.noreply.github.com> Co-authored-by: ShuaixinHuang <197200901+ShuaixinHuang@users.noreply.github.com> |
||
|
|
a19b3dbaab |
fix(windows): recover from a corrupt Node header cache (#14259)
Co-authored-by: ShuaixinHuang <ShuaixinHuang@users.noreply.github.com> Co-authored-by: ShuaixinHuang <197200901+ShuaixinHuang@users.noreply.github.com> |
||
|
|
5411689a5c |
fix(ci): recheck pull request eligibility during health scans (#14365)
* fix(ci): recheck pull request eligibility during health scans * test(ci): align inherited Mach-O assertion with main * test(ci): check retained run evidence after PR eligibility changes --------- Co-authored-by: ShuaixinHuang <ShuaixinHuang@users.noreply.github.com> Co-authored-by: ShuaixinHuang <197200901+ShuaixinHuang@users.noreply.github.com> |
||
|
|
a9e34a4aae | fix(ci): bound browser runtime fixture source readiness (#14364) | ||
|
|
8a77faf842 |
fix(ci): reject incomplete merged test timing reports (#14352)
* fix(ci): reject incomplete merged test timing reports * test(ci): align inherited Mach-O assertion with main --------- Co-authored-by: ShuaixinHuang <ShuaixinHuang@users.noreply.github.com> Co-authored-by: ShuaixinHuang <197200901+ShuaixinHuang@users.noreply.github.com> |
||
|
|
a85859e147 |
feat(pe): inspect x64 exception-directory function ranges (#14254)
* feat(pe): inspect x64 exception-directory function ranges Add inspect_pe_unwind_ranges, a provider-free reader of the PE32+ exception directory (.pdata). It reports each RUNTIME_FUNCTION's begin, end and unwind RVAs, whether the entry starts a function or is a chained fragment (UNW_FLAG_CHAININFO or an indirect unwind RVA), the chain's parent and primary entry, and empty, unsorted, overlapping, unmapped or unresolvable entries as explicit issues. Counts cover every entry while kind, offset and limit select the page. It reads headers through the shared PE image owner without changing its admission. Failures use the existing PE failure projection. Refs #14181 * chore(pe): record the unwind-ranges advertised schema and cursor skill * fix(pe): index chain parents, map the whole exception directory and keep high RVAs unsigned An unsorted table looked up every chain parent with a linear scan, and chain resolution did not yield, so a crafted table could stall the server. Parents are now found through one begin-RVA order and the pass yields to cancellation. The file-backed check covers every declared directory byte, including trailing bytes, and clearing the indirect bit keeps RVAs at or above 0x80000000 unsigned. * fix(pe): bound unwind reads and report unreadable codes, mismatched parents and unsorted overlaps Unwind data is visited in ascending RVA order, so the windowed reader moves forward and reads each region about once whatever the table order. A primary entry whose declared code array leaves the file-backed bytes is unknown (unwind_codes_unmapped), and its header facts are kept. A chain parent must match the whole RUNTIME_FUNCTION; an entry with the same begin but another end or unwind RVA is chain_parent_mismatch. Order and overlap are checked separately. The guide moves under docs/guides/native, and its route is unchanged. * fix(pe): index whole RUNTIME_FUNCTION records for chain parents Entries sharing a begin RVA were scanned for every parent lookup. The table is now ordered once by (begin, end, unwind), and a parent is a binary search for the exact record, with a second search for a begin mismatch. * test(pe): register the unwind-ranges provider lifecycle coverage The provider lifecycle registry needs one entry per provider id. Add rea-pe-unwind-ranges with its public CLI/MCP workflow and a typed resource and cancellation failure test. * test(cli): record inspect-pe-unwind-ranges in the completion goldens * fix(pe): keep a verified unwind report through cleanup failure and check the directory before its allowance A report completed before final close failed was replaced by the file hash. The provider now records the verified report and the shared PE failure projection retains it, as the ELF readers do. The entry allowance now applies only after the directory is shown file-backed, so an oversized count that leaves the file is a malformed target. * chore(pe): register the exception-directory entry allowance as a pending fixed ceiling |
||
|
|
225a19ae7a |
feat(artifacts): inventory and extract stored and gzip-compressed tar archives (#14245)
* feat(artifacts): inventory and extract stored and gzip-compressed tar archives Recognize POSIX ustar and GNU tar headers, plain or as the first block of a gzip member, as the new tar artifact format, so Linux release tarballs and Unity .unitypackage files inventory and extract like ZIP archives. The tar reader walks every header once, applying pax path, linkpath and size records, GNU long names and the ustar prefix. Regular files, directories and symlinks are occurrences with typeflag, mode, owner, mtime and link target; devices, FIFOs, hard links and sparse members are traversal omissions. Gzip members are read by forward decompression with an idle stream reused for in-order opens, and every decompressed byte is charged to artifact_limits.expanded_bytes. A later corrupt header, a truncated member or gzip stream, and non-zero bytes after the end marker keep the members read so far with unknown coverage and an explicit end_state; a first block with the ustar magic and a bad checksum is refused with that reason. Fixes #14177 * docs(compare): name tar-entry among the compared format metadata kinds * fix(tar): keep complete members and header facts across tar edge cases - Charge omitted devices, FIFOs and links to the retained-metadata allowance. - Probe a small gzip tar without verifying its trailer, and feed the final trailer to zlib separately so data before a bad CRC stays readable; queue decompressed output so a later failure cannot drop it. - Decode negative GNU base-256 numbers; only mtime may be negative. - Apply pending pax records only to the next member, never to extension headers, and let an empty pax value delete the keyword. - Push a member once its data is complete, then skip its padding. - Treat a cut-off zero block as truncation, not an end marker. - Stop with malformed partial coverage, not a refusal, when a later header declares an unsafe size. * fix(tar): charge gzip expansion as zlib produces it The decompressed-output queue charged the plaintext-work allowance only when the reader took a chunk, so bytes queued for an idle reader were not bounded by artifact_limits.expanded_bytes. Each chunk is now charged in the data handler before it is queued; an exhausted allowance stops the inflater, and the queued, already-charged bytes are served before the limit failure. * fix(tar): validate numeric pax records and probe gzip past its header fields - A pax size, uid, gid or mtime record that does not parse now stops the walk as malformed at that member, keeping earlier members, instead of silently falling back to the header field. - The gzip-wrapped tar probe skips the RFC 1952 FEXTRA, FNAME, FCOMMENT and FHCRC fields before applying its 2 KiB compressed-data bound, so a long name or comment no longer hides the archive. |
||
|
|
789ca04125 |
fix(pe)!: bound static readers by the bytes they read, not file size (#14262)
* fix(pe)!: share one loader-equivalent PE header owner across static readers Resources and certificates now admit headers through readPeImage, and resources map RVAs through the shared file-backed mapping. The owner reads the optional header at fixed offsets, caps data directories at 16, and lets a PE signature at e_lfanew override a DOS relocation table. Export, import, TLS and resource directories are read at their RVA whatever Size declares. Disregarded declarations are reported in header_anomalies. BREAKING CHANGE: import and delay-import walks continue to the null descriptor past a short directory Size instead of stopping with a malformed_entry issue, and inspect-pe-resources reports an unsupported optional-header magic as unsupported_target. * fix(pe): keep valid DOS relocation tables owning e_lfanew Only a relocation table that describes no DOS load module yields e_lfanew to a PE signature; update MZ/PE conformance to the shared owner. * fix(pe)!: bound static readers by the bytes they read, not file size max_file_bytes now counts the header prefix and every positional read of headers, directory tables and their referenced ranges. The identity pass that hashes the whole file is bounded only by a fixed whole-file ceiling: 4 GiB minus one byte for the PE-only readers, whose file offsets are 32-bit, and 512 MiB for hardening and exports. An exhausted allowance is a capacity refusal with a typed parameter details.limit. BREAKING CHANGE: max_file_bytes no longer refuses a large file whose reads fit; an exhausted read allowance reports resource capacity instead of file-size, and only a file above the fixed ceiling reports file-size. * fix(pe): walk resource trees within file-backed bytes and cite TLS reads The resource walk is bounded by the file-backed run from the directory RVA rather than its Size, and a Size that ends before the bytes walked is a directory_size_below_structure anomaly. The TLS result carries structure_location for the structure read past a short Size, and Evidence cites it. * test(pe): assert a refused read never reaches the descriptor * test(pe): use a resource cycle as damage now that a short Size is read * fix(pe): read resource trees past an oversized Size and keep damaged MZ headers malformed An oversized resource Size is reported without requiring its unused bytes to map. A Windows-header candidate is malformed when the DOS module is also invalid, and the guide states that a valid DOS relocation table owns e_lfanew. * feat(pe): report image_base and IAT slot VAs in static PE results (#14263) * feat(pe): report image_base and IAT slot VAs in static PE results Every static PE result reports the optional-header image_base once as a hex VA, and import rows add iat_va beside iat_rva so a slot goes straight to xrefs. Fields name their space as rva, va or file_offset; the new fields are optional so saved Evidence still parses, and the imports service rejects an iat_va that disagrees with image_base plus iat_rva. * fix(pe): document iat_va for rebased databases and test VA rejection iat_va is relative to the file's ImageBase; a rebased provider database needs its own base plus iat_rva. Cover the service rejection of a slot VA that disagrees with image_base plus iat_rva. * chore(pe): register the forwarded whole-file ceiling and shrink refusal baselines |
||
|
|
fd09e2b9a1 |
fix(limits)!: let inspect_pcap_capture take producer_limits for its snapshot and TShark output (#14280)
* fix(limits)!: let inspect_pcap_capture take producer_limits for its snapshot and TShark output inspect_pcap_capture kept private copies of the producer budgets that inspect_packet_capture already exposes. It now accepts producer_limits with input_bytes (the streamed capture snapshot, default 2 GiB) and output_bytes (each TShark JSON pass, default 8 MiB, at most the fixed 128 MiB decoded-JSON allowance). Refusals report details.limit for the parameter instead of a fixed ceiling. The decoded-JSON expansion and retained-fact allowances stay fixed because raising them needs a streaming decoder; the version and summary probe capture is reclassified as protocol. Part of #14237 BREAKING CHANGE: an inspect_pcap_capture refusal at the snapshot or TShark JSON budget reports details.limit for producer_limits.input_bytes or producer_limits.output_bytes and no longer carries details.refusal fixed_ceiling. * fix(limits): keep the DNS pass's producer limit and cover raised pcap budgets When only the DNS wire-identity pass exceeds producer_limits.output_bytes, the partial summary now records dns_identity_limit with the parameter, effective value, default and range. The pcap output budget is documented as combined stdout and stderr, as producer_limits.output_bytes is elsewhere. Acceptance covers TShark output above the old 8 MiB ceiling in both passes. |