Commit Graph

728 Commits

Author SHA1 Message Date
Kaoru0822 5afd8a850b fix(plist): keep character references beyond Unicode literal
Reserving the __proto__ placeholder decodes the whole document, so
<![CDATA[&#x110000;]]> or a comment with an out-of-range reference
threw a RangeError, and every XML plist reader failed on a valid
document. References beyond U+10FFFF now stay as written. The XML
decoder still rejects them outside comments and CDATA.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-07 08:12:59 +00:00
Kaoru0822 6729ee7636 fix(plist): report omitted __proto__ entries in signatures and Interface Builder
#885 decodes XML plists that contain a __proto__ key by omitting those
entries, but signature entitlements and Interface Builder plists dropped
the omission count. inspect_signature returned an entitlement set that
looked complete, and archive_decode stayed complete. Both now report the
omission: a signature limitation, and a partial archive_decode facet with
reason dictionary_entries_omitted and a per-document limitation.

The placeholder that stands in for __proto__ was reserved against the raw
XML text, so an entity-encoded key such as &#95;&#95;rea_prototype_key__
decoded to the placeholder and was omitted as if it were __proto__. The
placeholder is now reserved against the decoded text.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-07 07:51:37 +00:00
Kaoru0822 faaee693d5
Merge pull request #885 from morluto/fix/plist-prototype-keys
fix(plist): read XML plists containing a __proto__ key
2026-10-07 00:46:50 -07:00
Kaoru0822 05f43ed388
Merge pull request #877 from morluto/fix/javascript-computed-xhr-method
fix(javascript): keep XHR and client endpoints that receiver spellings hid
2026-10-07 00:46:23 -07:00
ysopwnable b808e2d6bb
refactor(provider): declare deep capabilities from source (#892) 2026-10-07 15:41:50 +08:00
ysopwnable dd114d3980
refactor(binary): group session selection and snapshot ownership (#886) 2026-10-07 15:05:29 +08:00
Kaoru0822 ab985c6a10
Merge pull request #880 from morluto/fix/native-macho-echoed-paths
fix(native): keep echoed Mach-O paths out of load commands and symbols
2026-10-07 00:02:14 -07:00
Kaoru0822 e32028d1b5 fix(javascript): keep bare relative URLs for computed-method XHR
`xhr.open(method, "api/users")` is a same-origin request, but the
computed-method fallback required an absolute URL or a path prefix.
Keep the literal unless it is provably not a URL: a Node fs open flag,
a reserved browsing-context name, or a call on a receiver spelled as a
browsing context or document.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-07 00:01:16 -07:00
ysopwnable 01be082e9e
feat(browser): trace captured website module imports (#879)
* feat(browser): trace captured website module imports

Compose verified exported scripts, inert native import syntax and a narrow
Chromium resolution port. Preserve query/fragment identity, import-map context,
all reported capture candidates and explicit unknown execution. Share named
CLI/MCP contracts and retain native reports, diagnostics and cleanup failures.

Add focused boundary regressions and a real module-loading oracle to the
existing conditional Chrome lane. No captured application code is executed
by module tracing, and no selected website asset is refetched.

Refs #851, #774

Assisted-by: Yukari (gensokyo-skills:yukari-boundary-analysis)
Assisted-by: Kogasa (gensokyo-skills:kogasa-surprise-testing)

* fix(browser): preserve module contexts and source bindings

Keep capture completeness inline, validate actual source text against its
digest, and separate unsupported URL contexts from malformed input.
Use the importer origin for native module resolution and the selected map
base independently, including mixed HTTP/HTTPS and escaped HTML attributes.

Refs #851, #774

Assisted-by: Yukari (gensokyo-skills:yukari-boundary-analysis)
Assisted-by: Kogasa (gensokyo-skills:kogasa-surprise-testing)
2026-10-07 14:59:52 +08:00
Iwakurakaoru0822 a08be51e9f fix(plist): read XML plists containing a __proto__ key
The `plist` XML decoder throws on the legal dictionary key `__proto__`
(its CVE-2022-22912 guard). An app whose XML Info.plist held such an
entry could not be opened at all ("app has no readable
CFBundleExecutable"), and entitlements, XML keyed archives, and
Interface Builder plists failed the same way. On the plutil JSON route,
validation silently dropped the key from `inspect_plist` results.

Decode XML plists through a shared reader that substitutes such keys
before the decoder runs, then omits and counts those entries.
`inspect_plist` and `inspect_keyed_archive` report the omission as a
limitation instead of failing or dropping it silently.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-06 23:58:59 -07:00
ysopwnable 507e8b3c7b
refactor(firmware): group layered source and verification (#878) 2026-10-07 14:44:52 +08:00
Iwakurakaoru0822 e3e7664665 fix(javascript): keep literal-method and URL-literal requests on aliased receivers
Merge main (#874) and resolve the endpoint heuristics together. Receiver
spellings do not prove bindings: `parent.open("GET", "/api")` may be a
local XHR, `new Headers()` may be an imported client, and
`api.headers.get("/v1/x")` may be a nested client.

A literal HTTP method is read as XHR on any receiver; the browsing-
context exclusion now applies only to computed methods. A get/delete
literal that is a URL or path stays an endpoint even when the receiver
is spelled as a keyed collection.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-06 23:44:34 -07:00
Kaoru0822 c371d6e1e9
Merge pull request #871 from morluto/fix/javascript-template-literal-static-strings
fix(javascript): read substitution-free templates as exact strings
2026-10-06 23:42:52 -07:00
Kaoru0822 14f9b3d931
Merge pull request #875 from morluto/fix/native-plist-selection-failures
fix(native): report why a selected plist cannot be inspected
2026-10-06 23:42:14 -07:00
Iwakurakaoru0822 37fe105ba1 fix(native): keep echoed Mach-O paths out of load commands and symbols
otool and dyld_info print the operand path before a slice's records,
and the Mach-O parsers read that header as output. A file name holding
`Load command` blocks or `(from lib)` lines therefore added a forged
LC_MAIN entrypoint, corrupted the Mach header fields, and injected
imports and exports into `inspect_macho`.

Strip the exact echoed operand header (`<path>:`, `<path> (architecture
<arch>):`, `<path> [<arch>]:`) before parsing. Output without that
header, such as replayed captures, is parsed unchanged.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-06 23:40:35 -07:00
Iwakurakaoru0822 00f707b250 fix(javascript): filter keyed-collection receivers only for get/delete
The collection APIs share only `get` and `delete` with HTTP clients, so
`api.headers.post("/v1/headers")` and `api.searchParams.request("/s")`
keep their endpoints.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-06 23:34:47 -07:00
Iwakurakaoru0822 ae849a7281 fix(javascript): never read window or document open as XHR
`window.open(url, "/preview")` has a computed first argument and a
path-shaped browsing-context name, so the computed-method XHR fallback
reported the target name as an endpoint. Browsing-context and document
`open` calls never take an XHR method and request URL; skip them.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-06 23:32:50 -07:00
Iwakurakaoru0822 5738a0cf8c fix(native): report plist permission denials as access failures
A regular plist that the host refuses to open made both plutil
conversions fail, which was reported as an undecodable property list.
Open the file before running plutil and report EACCES/EPERM as a
target access failure naming the path.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-06 23:31:14 -07:00
Iwakurakaoru0822 eb68761eb0 fix(javascript): keep keyed-collection reads out of endpoints
Static endpoint extraction read the first literal argument of any call
named get, post, put, patch, delete, or request as an HTTP request URL.
Reads of a provable keyed collection also became network endpoints in
application and web bundle analysis: `new URLSearchParams(...).get("q")`,
`response.headers.get("content-type")`, `new Map().get("key")`, and
`url.searchParams.get("page")`.

Skip these calls only when the receiver is a constructed Map, WeakMap,
Set, WeakSet, Headers, FormData, or URLSearchParams, or a platform
`headers`/`searchParams` property. Any other receiver may still be an
HTTP client with a base URL, so `api.get("users")` keeps its endpoint.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-06 23:28:19 -07:00
Iwakurakaoru0822 602d0021d4 fix(javascript): keep computed-method XHR request URLs
A computed XHR method, as in `xhr.open(method, "/api")`, no longer
discarded an endpoint that main reports. Keep the URL when it is an
HTTP(S)/WebSocket URL or a path; fs flags and window targets such as
`r` and `_blank` still produce no endpoint.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-06 23:25:48 -07:00
Iwakurakaoru0822 0674facd46 fix(native): report why a selected plist cannot be inspected
`inspect_plist` turned a missing selected plist, a directory, or a file
that is not a property list into a generic execution failure that
advised retrying and running `rea doctor`. A bare Mach-O without
Contents/Info.plist failed the same way.

Check the resolved path before running plutil and keep plutil's decode
diagnostic. A caller-selected path now fails as invalid input naming
the path and the reason; a missing default Info.plist is unavailable for
the target. The CLI no longer sends Contents/Info.plist as an explicit
selection, so its default matches the MCP default.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-06 23:16:13 -07:00
ysopwnable 8e8921d40c
refactor(android): group layered source and verification (#873) 2026-10-07 14:09:57 +08:00
Kaoru0822 63e0822cc7
Merge pull request #872 from morluto/fix/javascript-xhr-open-endpoints
fix(javascript): read open() endpoints only from XHR method/URL pairs
2026-10-06 23:09:13 -07:00
Kaoru0822 cfd2b0c75d
Merge pull request #870 from morluto/fix/keyed-archive-uid-named-keys
fix(artifacts): read keyed archive dictionaries keyed UID as dictionaries
2026-10-06 23:03:09 -07:00
Iwakurakaoru0822 1be370543f fix(javascript): read open() endpoints only from XHR method/URL pairs
Static endpoint extraction treated any `.open(_, "literal")` call as
`XMLHttpRequest.open(method, url)`. In application and web bundle
analysis, `fs.open("/tmp/data.txt", "r")` became the network endpoint
`r` and `window.open(url, "_blank")` became the endpoint `_blank`.

Read the URL only when the first argument is a literal HTTP method: a
standard method in any case, or an uppercase extension token such as
WebDAV `PROPFIND`.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-06 23:02:58 -07:00
Kaoru0822 dd90965058
Merge pull request #868 from morluto/fix/swift-demangle-arguments
fix(native): pass Swift symbols to swift-demangle as operands
2026-10-06 23:00:45 -07:00
Iwakurakaoru0822 77cf757103 fix(javascript): read substitution-free templates as exact strings
Static application analysis read call arguments only from quoted string
literals. A template literal without substitutions denotes the same
exact string, yet `fetch(`https://x`)`, `localStorage.setItem(`k`)`,
`new Worker(`./w.js`)`, and `require(`./dep.js`)` produced no endpoint,
an unnamed storage node, or an unresolved reference expression instead
of the facts their quoted spellings produce. Electron IPC and data-effect
readers already accepted these templates.

Read substitution-free templates in the shared static string and
argument readers so both spellings produce the same graph.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-06 22:58:43 -07:00
ysopwnable 021ba690b0
refactor: give Inspector its own capability directory (#869) 2026-10-07 13:53:25 +08:00
Iwakurakaoru0822 01779a6f61 Merge remote-tracking branch 'origin/main' into fix/swift-demangle-arguments
# Conflicts:
#	docs/product-catalog.json
#	docs/verification/managed-conformance-manifest.json
#	skills/reverse-engineer-anything/SKILL.md
#	src/generatedMcpToolCatalog.ts
2026-10-06 22:47:23 -07:00
Iwakurakaoru0822 35c82b93eb fix(artifacts): read keyed archive dictionaries keyed UID as dictionaries
Foundation encodes `encode(_:forKey: "UID")` as a `$top` dictionary
whose single key is `UID`. The keyed archive projection treated every
one-key `UID`/`CF$UID` dictionary as a reference marker, so that root
became a malformed reference and the real link to its object was lost.

Treat a one-key dictionary as a UID only when its value is a number,
matching the binary decoder's UID shape and Foundation's XML `CF$UID`
rule; otherwise descend into it as an ordinary dictionary.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-06 22:46:16 -07:00
Iwakurakaoru0822 6c88094da4 fix(native): pass Swift symbols to swift-demangle as operands
`swift-demangle` parsed a symbol beginning with `-` as an option, so
`-help` replaced the results with usage text and the call failed as
unreadable output. A symbol containing a line feed split into extra
output records, and the CRLF-tolerant parser stripped a carriage return
that belonged to the final symbol.

Pass the symbols after `--`, split records on the LF the demangler
emits, and reject multi-line symbols in the shared CLI/MCP input schema.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-06 22:40:19 -07:00
morluto e0fd8207a1
feat(application): wire Android and Apple inventory graph tools (#852)
* feat(application): wire Android and Apple inventory graph tools

Expose project_android_application_graph and project_apple_application_graph
through CLI and MCP so authenticated inventory Evidence can be projected
without a provider launch.

* fix(application): use producer root occurrence IDs in graph examples

Catalog examples constructed root occurrence IDs from artifact_id +
logical_path, but inventory validation authenticates "." with
{ root: root_artifact_id }. Align the examples and regenerate catalogs
after rebasing onto main (application family count 11).

---------

Co-authored-by: Cursor Agent <cursoragent@cursor.com>
2026-10-07 13:34:48 +08:00
morluto da0970672d
refactor(domain): split Interface Builder keyed-archive parse from graph builder (#859)
* refactor(domain): split Interface Builder keyed-archive parse from graph builder

* fix(domain): drop unused Interface Builder type re-exports

Knip failed Static checks because the split re-exported object and
connection types that no caller imported.

---------

Co-authored-by: Cursor Agent <cursoragent@cursor.com>
2026-10-07 13:30:25 +08:00
morluto 676959ecb5
refactor(native): split Apple dispatch metadata decode facets (#855)
Extract Mach-O/FAT selection, Objective-C class/method/ivar decode, and
Swift conformance/witness facets so AppleDispatchMetadata stays a thin
orchestrator without changing decode semantics.

Co-authored-by: Cursor Agent <cursoragent@cursor.com>
2026-10-07 13:22:31 +08:00
morluto b7df5b7805
refactor(ghidra): extract createClient and load-image attestation (#856)
Move AnalysisClient construction into GhidraProviderClient and the DOS
load-image attestation path into GhidraLoadImageAttest so GhidraProvider
stays a thin candidate adapter without behavior changes.

Co-authored-by: Cursor Agent <cursoragent@cursor.com>
2026-10-07 13:22:23 +08:00
Kaoru0822 4aa2b60c1d
fix(native): keep echoed codesign paths out of signature fields (#865)
codesign echoes the executable path and signing identifier verbatim,
and an ad hoc identifier derives from the file name. A file name with
line breaks added forged Authority lines, a signed file named after
codesign's unsigned message was reported unsigned, and path text could
supply entitlements. Parse display fields after the exact echoed path
and identifier, classify unsigned output by exit status, and read
requirements and entitlements from stdout.

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-07 13:20:12 +08:00
Kaoru0822 4e17be5705
fix(setup): read an OpenCode V2 server named type as a table entry (#866)
Only a string type is the V1 entry discriminator; a native mcp.servers
table may hold a server object named type.

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-07 13:20:02 +08:00
ysopwnable bb19c9477e
refactor: colocate investigation record implementation (#867) 2026-10-07 13:18:39 +08:00
Kaoru0822 f608127635
Merge pull request #843 from morluto/fix/exact-empty-graph-identities
fix(javascript): keep exact empty values in graph identities
2026-10-06 22:11:07 -07:00
Kaoru0822 957069d14d
Merge pull request #864 from morluto/fix/opencode-v2-servers
fix(setup): register OpenCode V2 configurations in mcp.servers
2026-10-06 22:07:29 -07:00
Kaoru0822 93091abb4d
Merge pull request #863 from kaoru0822-kitauji/fix/smol-toml-advisory
fix(deps): remediate smol-toml advisories
2026-10-06 22:04:59 -07:00
Kaoru0822 c57f1b74e0
Merge pull request #857 from morluto/fix/app-xml-plist-executable
fix(target): decode app Info.plist executables with an XML parser
2026-10-06 22:04:47 -07:00
N0zoM1z0 3427593daf
build: verify resolved module boundaries (#862) 2026-10-07 13:02:28 +08:00
Iwakurakaoru0822 bddeb634b5 fix(errors): report union input issues at the union's path
Zod reports union branch issues relative to the union, so a missing
union-typed argument such as trace_application_feature's seed was
reported at the request root, once per branch.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-06 22:02:25 -07:00
Kaoru0822 3b92a2bced
fix(native): keep integral plist reals beyond the JSON range as reals (#860)
plutil's JSON spells an integral <real> such as 9007199254740992 like an
<integer>, so the JSON path labeled it an exact integer. When the JSON
holds an unsafe integral number, read element types from plutil's XML
conversion; numbers whose origin stays ambiguous are reported as decoded
with an explicit limitation.

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-07 13:01:26 +08:00
morluto 8b9940a7b5
refactor(cli): split core analysis command registrar (#858)
Extract binary overview/procedure and native load-image/annotation
registrars so coreAnalysisCommands stays a thin wiring entry point.

Co-authored-by: Cursor Agent <cursoragent@cursor.com>
2026-10-07 13:00:38 +08:00
Iwakurakaoru0822 b6d9acca63 Merge remote-tracking branch 'origin/main' into fix/exact-empty-graph-identities
# Conflicts:
#	docs/product-catalog.json
#	docs/verification/managed-conformance-manifest.json
#	skills/reverse-engineer-anything/SKILL.md
#	src/generatedMcpToolCatalog.ts
2026-10-06 22:00:37 -07:00
morluto 2d4a910fcd
fix: preserve native UI failure reasons and dedupe version literals (#854)
Keep adapter/OS helper failures in diagnostics instead of replacing them
with a canned remediation sentence. Share browserVersionSchema, Node
support prose, and JADX heap/remediation constants so release pins stay
authoritative.

Co-authored-by: Cursor Agent <cursoragent@cursor.com>
2026-10-07 13:00:24 +08:00
Iwakurakaoru0822 35e5508fd0 fix(javascript): advertise the exact empty seed rule and match empty API keys
Express the empty-seed rule as a JSON-Schema-representable union, so
the advertised trace_application_feature schema rejects what the
server rejects, and match context-bridge seeds on the exact api_key.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-06 22:00:14 -07:00
Iwakurakaoru0822 69d8afefc1 fix(setup): register OpenCode V2 configurations in mcp.servers
OpenCode V2 reads native server entries from mcp.servers, and a native
entry takes precedence over a V1 mcp.<name> entry. After OpenCode
migrated a configuration, setup wrote an ignored V1 entry, status
reported REA as missing, and uninstall left the native entry in place.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-06 21:58:20 -07:00