mirror of
https://github.com/morluto/rea.git
synced 2026-11-03 12:35:26 +00:00
1851f1fcfd70879b9ca58a8536727fa476abbecc
12
Commits
| Author | SHA1 | Message | Date | |
|---|---|---|---|---|
|
|
26525706fc |
feat(managed): decode ldstr user strings in member inspection (#2162)
* feat(managed): decode ldstr user strings in member inspection
inspect_managed_members reported every ldstr operand as a bare 0x70 token,
so an analyst could see that a method loads a literal but not which one.
Answering "where is this path or key used" required a second tool.
Read the optional #US stream and add a top-level user_strings inventory:
each distinct token loaded by an inspected method body, once, in token
order, with its #US file offset and decoded UTF-16 value. Instruction
anchors and normalized CIL digests keep their build-local tokens. A missing
#US stream or malformed item is reported against its token as partial
coverage. Evidence recorded before this field reads user_strings as null.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* fix(managed): collect user strings only from ldstr
A malformed ldtoken can carry a 0x70 token, which the operand decoder
classifies as a string operand. Only ldstr loads a literal, so collect
user strings by opcode.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* fix(managed): admit user-string tokens and failures before collecting them
Charge each distinct ldstr token to the decode budget before adding it to
the collection set, and admit each #US failure before retaining it. A
missing #US stream is now one stream-level issue rather than one per
token.
Document why the #US terminal flag is not validated: Mono and Roslyn
assemblies disagree with ECMA-335 II.24.2.4 and the runtime ignores it.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* docs(managed): describe missing #US reporting and the unvalidated flag byte
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* test(managed): cover #US items that run past the stream end
An odd length whose payload crosses the end of #US, and a two-byte
length prefix that starts on the last #US byte, are both rejected as
"User string leaves #US" beside a readable literal. The test fails if
that bounds check is removed.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* fix(managed): report reserved #US length prefixes as string failures
The compressed-length reader shared by #Blob and #US hard-coded
invalid-blob and "Metadata blob" for a reserved prefix, so a malformed
user string was published as a blob failure. The caller now names the
item it reads: #Blob keeps its code and message, and #US reports
invalid-string.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* fix(managed): append member inspection issues without argument spreading
inspectManagedMembersBytes gathered every producer's issues with
issues.push(...list), passing one argument per issue. A large malformed
input, such as hundreds of thousands of distinct bad ldstr operands or
MemberRef rows, overflows the stack with an untyped RangeError instead of
returning partial coverage. All six sites now use
appendManagedParseIssues, which appends one issue at a time.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* fix(managed): classify truncated #US and #Blob length prefixes by item
A two- or four-byte compressed-length prefix cut off by the end of the
artifact went through the generic range check and was reported as
invalid-row. The prefix reader now uses the item's own code for both
reserved and truncated prefixes: invalid-string for #US, invalid-blob for
#Blob. The unused generic range helper is removed.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* fix(managed): retain user-string terminal flag conformance issues
* test(managed): write ECMA-335 #US terminal flags and cover flag issues
|
||
|
|
98d8470d36 |
fix(io): consolidate managed snapshots and retain cleanup ownership
Reuse managed snapshot admission and hashing in sequential path comparisons, retaining caller paths and completed inspection Evidence on later failure. Preserve exact failed-close owners alongside typed read and cancellation failures, and retry them through caller-owned resource scopes. Require canonical Hopper lease identities, remove signed offset coercion, and repair stale setup cleanup expectations that failed CI. |
||
|
|
554cb45f7f |
fix(managed): bound transient CIL by decoded instruction count (#1822)
fix(managed): charge transient CIL by decoded instructions |
||
|
|
30787297d4 |
fix(managed): charge retained member facts instead of decoding bounds (#1768)
* fix(managed): charge retained member facts instead of decoding bounds inspect_managed_members returned no types or methods for ordinary assemblies: Newtonsoft.Json 13.0.3 (netstandard2.0, 705 KB) exceeded the 64 MiB representation budget. Each method body reserved 256 bytes per IL byte and each signature 256 bytes per blob byte before decoding, and those worst-case bounds were never returned, so the budget scaled with total IL size rather than with the retained output. The final projection admission also charged every decoded string at six bytes per character and every scalar at 32 bytes, about eight times its JSON size. Bound IL, exception-clause and signature decoding with a transient admission that does not consume capacity, then reserve the decoded body or signature that is actually retained. Projection admission now charges the exact UTF-8 JSON bytes of decoded strings, keys and scalars; escaped and multibyte text still counts at its encoded size. Newtonsoft.Json now yields 496 types, 4185 methods and 18846 call edges. Assemblies whose retained facts exceed the budget, such as the 2.3 MB System.Private.ServiceModel 4.7.0, remain unavailable. * fix(managed): bound concurrent decoding and count JSON bytes in place Review follow-up. A method's IL bound and its exception-section bounds were each checked against the same remaining capacity although their bookkeeping is live at the same time, so 40 MiB of IL plus 40 MiB of exception clauses passed a 64 MiB budget. Transient admissions now accumulate until the method body or signature is built, and reserve respects bounds that are still live. Projection admission also serialized each decoded string to measure it, which could allocate about six times a near-limit string before the check. It now counts the exact escaped UTF-8 bytes without building the JSON text. * fix(managed): admit derived call and field edges as they are built Review follow-up. Released IL bounds no longer stand in for the call and field-access records that edges() derives from anchors. Each record is now admitted before the graph grows further, so a crafted assembly cannot materialize the whole derived graph before the representation guard fails. * fix(managed): admit derived caller names before building them Review follow-up. The caller name of call and field-access records was interpolated per anchor before any admission saw it. It is now built once per method, after its exact JSON size, counted from the type and member names, has been admitted. |
||
|
|
0f0d6e4d43 |
fix(managed): budget decoding before representation expansion
Validation: integrated changes passed formatting, typecheck, lint, resolved module-boundary verification and git diff --check. Tests and real-provider workflows were not run. |
||
|
|
63bf91405c |
refactor!: enforce canonical evidence and provider boundaries
Deliver complete Evidence directly through MCP with required nullable analysis profiles and immutable per-server delivery settings. Bind selected environments at construction and require typed cleanup outcomes with retained retry ownership. Remove test-only routing, duplicate session and snapshot metadata, producer-field repairs, and ambiguous provider arguments. Separate artifact byte identity from occurrence classification and retain typed source-map and partial native facts across CLI, MCP, and verifier consumers. BREAKING CHANGE: obsolete Evidence envelopes, session aliases, incomplete snapshots, and missing normalized producer facts are no longer accepted. |
||
|
|
bda4ada7fb |
fix(dotnet): validate managed metadata and CIL boundaries (#938)
* perf(dotnet): reuse decoded metadata rows * test(dotnet): preserve expanded fixture metadata * style(dotnet): format metadata inventory * fix(dotnet): bound method bodies to PE section data * fix(dotnet): derive fixture metadata index widths * fix(dotnet): validate managed metadata bounds * test(dotnet): cover large metadata ReadyToRun layout * fix(dotnet): validate exception instruction boundaries * fix(dotnet): report invalid metadata coded indexes * fix(dotnet): clarify MemberForwarded null diagnostics * fix(dotnet): honor complete CIL and EH boundaries * fix(dotnet): validate metadata identity rows and offsets |
||
|
|
cf061159ab |
fix: integrate 14 approved fix PRs (668,671,673,675,678-681,685-690) (#705)
* fix(javascript): preserve array index positions Signed-off-by: RudyCelekli <47457359+rudycelekli@users.noreply.github.com> * fix(javascript): respect object property overwrite order Signed-off-by: RudyCelekli <47457359+rudycelekli@users.noreply.github.com> * test(javascript): cover uncertain spread discriminants Signed-off-by: RudyCelekli <47457359+rudycelekli@users.noreply.github.com> * fix(javascript): keep nonfinite values outside JSON lattice Signed-off-by: RudyCelekli <47457359+rudycelekli@users.noreply.github.com> * fix(dotnet): keep non-CIL method implementations unknown Signed-off-by: RudyCelekli <47457359+rudycelekli@users.noreply.github.com> * test(package): separate CIL reconstruction from native imports Signed-off-by: RudyCelekli <47457359+rudycelekli@users.noreply.github.com> * fix(javascript): invalidate values on nontrivial binding writes Signed-off-by: RudyCelekli <47457359+rudycelekli@users.noreply.github.com> * fix(artifacts): align native DMG mount and detach lifecycle Signed-off-by: RudyCelekli <47457359+rudycelekli@users.noreply.github.com> * fix(browser): retain all literal worker import arguments Signed-off-by: RudyCelekli <47457359+rudycelekli@users.noreply.github.com> * fix(native): preserve final demangled symbol whitespace Signed-off-by: RudyCelekli <47457359+rudycelekli@users.noreply.github.com> * fix(dotnet): preserve C identifier underscores in native matching Signed-off-by: RudyCelekli <47457359+rudycelekli@users.noreply.github.com> * fix(browser): respect metadata key and overwrite semantics Signed-off-by: RudyCelekli <47457359+rudycelekli@users.noreply.github.com> * fix(javascript): keep optional parameter input unknown Signed-off-by: RudyCelekli <47457359+rudycelekli@users.noreply.github.com> * fix(dotnet): report observed method metadata changes Signed-off-by: RudyCelekli <47457359+rudycelekli@users.noreply.github.com> * docs(dotnet): synchronize generated conformance skill digest Signed-off-by: RudyCelekli <47457359+rudycelekli@users.noreply.github.com> * fix(browser): reject malformed indexed source-map offsets Signed-off-by: RudyCelekli <47457359+rudycelekli@users.noreply.github.com> * fix(native): preserve numeric-looking Mach-O identifiers Signed-off-by: RudyCelekli <47457359+rudycelekli@users.noreply.github.com> * docs: regenerate catalogs for integrated fix batch * docs: regenerate catalogs after merging main (#702) --------- Signed-off-by: RudyCelekli <47457359+rudycelekli@users.noreply.github.com> Co-authored-by: RudyCelekli <47457359+rudycelekli@users.noreply.github.com> |
||
|
|
b5e98915c6 |
fix(tools)!: simplify direct invocation and harden boundary contracts (#555)
Remove REA permission grants, scope ceilings, approval confirmations, and inert settings. Preserve selected local evidence, accept caller-chosen commands and paths, and report actual runtime failures. Harden provider results, schema serialization, snapshot evidence binding, archive paths, source maps, native screenshots, managed EH parsing, and cancellation cleanup. Regenerate tool metadata and document direct invocation. BREAKING CHANGE: Removed permission configuration and policy commands, approval fields, filesystem scope inputs, and fixed confirmation options. Process capture inherits the host environment and accepts command names; callers must refresh tool schemas and migrate removed fields. |
||
|
|
dfad09e3b5 | refactor(managed): derive inspection from PE CLI extents | ||
|
|
0d96275b68 | refactor: return complete tool results inline | ||
|
|
3e61a63a10 | refactor: split oversized analysis workflows |