Eating my own cooking: Ghost Search v4.0 — a Tor-only onion search app that just went through the same evidence gate I built for other people's submissions

Two weeks ago I posted here about [the review lane I built for a volunteer app-store queue]( Generation is cheap, gating is the work: 48 hours building an anti-slop review lane for open-source app submissions ) — the one where agents collect device evidence, a second agent re-verifies claims against primary artifacts, an orchestrator arbitrates, and nothing posts without a human GO. That lane exists because a maintainer left his standard “please help test those MRs” note on **my** merge request.

This is the follow-up nobody asked for: the app in that merge request now ships v4.0.0, and instead of asking for trust, I ran it through the same discipline — external audit, bytecode-level verification, real-device leak testing, reproducible-build packaging — and I’d like people to try to break it.

Full disclosure of incentives, since the lane’s whole point is declared interests: the lane was never pure altruism. My submission was sitting in the same queue, and the fastest legitimate way to move it was helping clear the queue in front of it. Self-interest built the tooling; the question this post asks is whether the tooling — and the app — hold up anyway.

## What Ghost Search is

An Android onion-search client (`org.darknetcrawler.mobile`, MIT, [Codeberg]( sookoothaii/digital-spyglass-android: Privacy-focused Tor search app for Android — MIT licensed, F-Droid reviewed - Codeberg.org )) with product axioms that are architectural constraints, not marketing:

- **Tor-only transport.** All engine traffic goes through Orbot’s SOCKS5 at `127.0.0.1:9050` with RFC 1929 per-search circuit isolation. No clearnet fallback. Ever.

- **RAM-only.** Queries, results, session state live in memory; purged on screen-off, process death, or panic wipe. Three non-sensitive preferences are the only persisted state.

- **No backend, no accounts, no telemetry, no ads, no analytics.**

- **Anti-forensic posture:** `FLAG_SECURE` screenshot blocking, atomic panic wipe (Tor cookies, WebView cache/storage, zero-overwrite of app dirs, `finishAndRemoveTask`, process kill), PanicKit responder.

- **v3 `.onion` integrity:** the app validates the 56-char base32 label *cryptographically* (SHA3-256 checksum per rend-spec-v3) and flags vanity-prefix clones against a canonical engine registry — because in onion space, a lookalike domain is a phishing vector, not a typo.

## What “evidence-first” means for my own app

Same rule as the lane: claims point at artifacts, not at my confidence.

- **Independent multi-round audit.** A separate model (DeepSeek) audited the release across 65 findings — from redirect-handling edge cases to dead dependencies. The final pass closed 65/65, each with a file-level or test-level proof.

- **Bytecode-level silence.** `dexdump -d` across the entire release `classes.dex`: **zero** `android.util.Log` and `PrintStream.print*` calls in any package. The app cannot leak a query into logcat because it physically cannot log.

- **Real-device leak test.** On a Samsung SM-G998B (Android 15): full logcat capture during install→launch→search with a canary query string — 8,858 lines, **0** occurrences of the canary, **0** `.onion` hosts, **0** cookie values, **0** console output from the app process.

- **Protocol-level tests.** Beyond unit tests, the Tor HTTP plugin is exercised against a local SOCKS5 `ServerSocket` mock: RFC 1929 auth negotiation, `ATYP=DOMAINNAME` remote DNS, clearnet-redirect blocking on every hop, `Sec-Fetch-Site` transitions, chunked-trailer parsing, strict 2 MB body cap. 9/9 JUnit, 245/245 Vitest including a fast-check property-fuzz harness over the parsers and onion-verification paths.

- **Reproducible build.** The F-Droid metadata uses `Binaries:` + `AllowedAPKSigningKeys`: F-Droid builds from source, copies my signature onto its build, and the APK verifies byte-identical. Every dependency is now pinned to exact versions with `bun install --frozen-lockfile` enforced.

## The honest weaknesses (yes, this section is mandatory)

- **Emulator detection is advisory.** `Build.*` heuristics catch casual sandboxes, not a determined analyst. I don’t claim anti-root or anti-Frida — a compromised device owns the RAM.

- **TLS can’t be audited from the outside.** I prove *where* traffic goes and *what the code sends*; payload confidentiality is Tor’s job, not mine.

- **Single-device testing.** Everything above ran on one Android 15 device. `minSdk 24` covers a decade of WebView and TLS-stack variance I haven’t touched.

- **Parallel fan-out is a metadata sink.** Thirteen engines see the same query within seconds — separate SOCKS circuits don’t decorrelate timing or query length. Not deanonymization, but distinguishable from a lone Tor Browser user. Engine *selection* itself is a stable cross-session fingerprint.

- **The HTTP fingerprint is close, not perfect.** `Sec-Fetch-*` follows Tor Browser 14 / Firefox 128 ESR, but there are no `Sec-CH-UA` client hints and header ordering isn’t byte-identical to a real Firefox request.

- **Rebuild not yet clean-room verified.** Dependency pinning + `bun install --frozen-lockfile` are in place and F-Droid CI verified an earlier release byte-identically, but I haven’t rebuilt the v4.0.0 APK myself in a fresh environment. If you do and it diverges, that’s the first real reproducibility bug.

- **No overlay protection on Android ≤11.** `setHideOverlayWindows()` needs API 31; on older versions tapjacking protection simply doesn’t exist — platform gap, not a regression.

- **The threat model is self-written.** `docs/GHOST_V4_SECURITY_ARCHITECTURE.md` has an explicit “Known Limitations & Residual Risks” chapter — but a model reviewed only by its author is a hypothesis, not a conclusion.

- **F-Droid isn’t live yet.** Metadata merged two days ago; the first build+verify cycle is still in the queue. Until it publishes, the APK is distributed via Codeberg releases only.

## What I’m asking for

Concretely, because “feedback welcome” is a null statement. The asks split in two — what only an external reviewer can answer, and what you can verify yourself.

**Needs external eyes (I wrote the code, I can’t audit my own assumptions):**

1. **Adversarial protocol review.** `PianoTorHttpPlugin.java` — SOCKS5/redirect enforcement, ~600 lines + local-socket harness. Sharpest checks: is `isValidOnionUrl()` enforced *before* socket connect, and on *every* redirect hop (a valid .onion → clearnet `Location` must die)? Does the cookie jar stay silent across host changes? Do `Content-Length` + `Transfer-Encoding` co-existing take the safe path? And when Tor delivers a clearnet redirect (compromised exit), does the fail-closed path surface as an *error*, not as a silent “no results”?

2. **Threat-model critique.** Where does the anonymity set break? What did the doc normalize that a second reader wouldn’t — e.g. the assumption that Orbot binds SOCKS5 to localhost only (LAN-mode Orbot breaks transport isolation at the root)?

3. **Onion registry provenance.** The 13 canonical engine addresses need checking against *official* sources (engine homepages, upstream repos — not stale mirror lists, which is where I sourced them). If one is wrong, that’s a spoof-detection failure hiding in my own constants.

**You can verify yourself (concrete pass/fail):**

4. **Rebuild byte-identically.** Fresh environment, no Gradle cache: `binaries` APK vs your build. Divergence = first real reproducibility bug.

5. **Different devices.** Android ≤12 / non-Samsung ROM (GrapheneOS especially — `tun\d+` interface heuristic may differ): does `FLAG_SECURE`, panic wipe (`run-as ls` on `app_webview/`/`cache/`), and VPN gate (`TRANSPORT_VPN` present?) behave the same? A 4-case test matrix is in `REVIEW.md`.

`REVIEW.md` in the repo has the full checklist — every item above broken into atomic pass/fail steps so a review produces a protocol, not vibes.

Everything needed is public: source, the architecture/threat-model doc, `SECURITY.md` with a reproducible **Evidence** section (commands + expected outputs), `RUNBOOK.md` for incident handling, and the release APK with published SHA-256. The review lane I described earlier is also public ([fdroid-workflow]( sookoothaii/fdroid-workflow: Reproducible F-Droid review-requested queue lane: static evidence -> real-device test -> PCAPdroid network capture -> independent agent verification -> operator-gated GitLab notes. Every claim backed by an artifact; the method is the artifact. - Codeberg.org )) if you want to inspect the method that produced the notes, not just the app. This app and that lane are the same project from two sides: the lane audits other people’s submissions; here the same gate was pointed at my own.

The lane’s premise was that verification — not generation — is the scarce resource. This app is the same premise turned inward: don’t believe the claims, check the artifacts. If something doesn’t survive your check, that’s exactly what I want to hear.

For now, I tried a few quick experiments:


What I tested, and the useful boundaries it exposed

I took the specific checks in your Ghost Search v4.0 post as a starting point and tested the Tor HTTP transport in PianoTorHttpPlugin.java. I compiled the pinned Java plugin with minimal Capacitor stubs, exercised it through a local mock SOCKS5/HTTP server, repeated the tests in a separate CPU-only Colab environment, and inspected the published v4.0.0 APK with JADX. This was not an Android security audit, and the tests did not contact live onion services.

Positive control: a redirect from an allowed v3 .onion address to a clearnet destination was rejected. Three boundaries need attention: an already percent-encoded URL was encoded again; incomplete HTTP responses could return successfully; and 307/308 redirects rewrote POST to GET. These are repeatable observations from specific code paths and fixtures, not evidence of Tor leakage, broken anonymity, or behavior across all Android devices.

Test Observation Evidence boundary
.onion to clearnet redirect Rejected before following the new destination JVM fixture; matching guard appears in APK decompilation
Already-encoded query, q=a%20b Request target became q=a%2520b JVM replay on two pinned source snapshots; corresponding construction visible in APK
Content-Length: 100, body short, then EOF Returned 200 with short JVM replay; full APK completion path not yet established
Chunked body missing final 0 chunk Returned 200 with available body JVM replay; full APK completion path not yet established
307/308 redirect after POST Next request used GET JVM replay; related APK redirect logic inspected
Coexisting Content-Length and Transfer-Encoding One split-response fixture ended with Truncated chunk body An error in this case, not proof of request smuggling

The snapshots were the v4.0.0 commit and one main commit, not whatever main may contain later. The v4.0.0 release APK fetched in Colab was 1,852,694 bytes and matched SHA-256 3a05ef72a069fd45bfcbf0417a06652d3c6de3fbe9622e256caf90e9620d29a1. That identifies the inspected artifact; it is not an independent reproducible build. JADX recovered the target plugin among 1,262 Java files, with four reported decompilation errors. The recovered excerpts support some source-to-APK comparisons, not a complete APK execution trace.

A small default route

For a low-cost regression pass, keep the destination-blocking case as a positive control, then check:

  1. Request-target preservation: a query containing a space or non-ASCII character, as generated by the real JS engine adapter, should arrive at the mock server with the intended encoding after exactly one logical encoding step.
  2. Response completion: declared-length premature EOF and missing chunk terminators should be distinguishable from fully received 200 responses, rather than becoming ordinary search results.
  3. Redirect policy: 303 can switch to GET as appropriate, while 307/308 should preserve method semantics only where forwarding the original body is authorized. A cross-host redirect may need a stricter policy than an ordinary browser.
  4. Registry provenance: keep structurally valid onion addresses distinct from operator-verified canonical addresses before using the latter as a phishing/spoofing trust anchor.

All four begin with local fixtures, without live onion traffic. If a newer commit behaves differently, keep the fixed-source result as regression history.

1. URL encoding: preserve the caller's request target

The observed transformation

The transport constructs an ASCII request target from a parsed URL, using a multi-component URI constructor. In the source-derived JVM test, already-escaped input was escaped again:

Input query                         Captured request target
q=cat                               /search?q=cat
q=a%20b                             /search?q=a%2520b
q=%E6%97%A5                         /search?q=%25E6%2597%25A5
q=%2520                             /search?q=%252520
q=café                              /search?q=caf%C3%A9

The Japanese-character example distinguishes one UTF-8 encoding pass from re-escaping %. An intentionally escaped percent such as %2520 is valid; the question is whether the transport unexpectedly adds another layer.

The search adapters use encodeURIComponent() for query values. Java’s official URI documentation says its multi-argument constructors quote %, while the single-string constructor preserves valid existing escapes. Passing an encoded value back through new URI(..., path, query, ...) is therefore a cross-layer contract mismatch, not a Java defect. The corresponding construction also appears in the APK’s decompiled plugin, but I did not observe an Android UI search’s actual request line.

Why this may affect search results

On a single URL-decoding pass, a%2520b means the literal text a%20b, not a b. Double decoding might mask that for some engines, so user-visible impact depends on the engine and real UI-to-native path. This can resemble a retrieval or ranking problem; checking request bytes first avoids revisiting search-quality work unnecessarily.

A focused local test can cover cat, a b, 日, a&b, literal %, an encoded path slash, and an invalid percent escape. Record three separate values: the original user input, the complete URL produced by JS, and the exact request line received after the mock SOCKS handshake. Then decode the captured query once and compare it with the caller’s intent. No live onion lookup is needed.

Possible interface contracts

There are at least two coherent options:

  • JS owns URL encoding: JS sends a complete valid URL; Java validates protocol and v3-onion authority and preserves its raw path/query when constructing the HTTP request target.
  • Java owns URL encoding: JS passes structured, unescaped components; Java encodes once and sends the result.

The JS-owned option may require fewer changes, but it still needs scheme/host checks, safe request-line construction, and malformed-input rejection. Using getRawQuery() alone will not help if another component constructor re-quotes %. Assert the actual transmitted bytes.

A practical test matrix:

Input Main question
q=cat Does plain ASCII remain unchanged?
q=a%20b, q=%E6%97%A5 Are pre-existing escapes preserved?
q=100%25, q=a%26b Is a literal percent or embedded ampersand still one query value?
q=a+b Are + and space semantics defined, rather than silently conflated?
/a%2Fb?q=x Does an escaped path separator remain a path component?
q=%ZZ, encoded CR/LF Is malformed or dangerous input safely rejected rather than turned into HTTP headers?

For a branch-style interpretation:

Captured request target preserves intended escapes?
  Yes: check actual engine decoding and search behavior separately.
  No: identify whether JS supplied an already-encoded URL.
      If yes, fix the single-owner encoding boundary and add a regression.
      If another runtime path bypasses the tested serializer, narrow scope.
2. HTTP response completeness: make partial data distinguishable from success

Two small premature-end cases

A local mock SOCKS5 endpoint returned controlled HTTP/1.1 bytes. These two cases are especially informative:

HTTP/1.1 200 OK
Content-Length: 100
Connection: close

short

After the body short, the server closed the connection, far short of the advertised 100 bytes. The source-level test nevertheless produced OK:200:short.

The second fixture used chunked framing:

HTTP/1.1 200 OK\r\n
Transfer-Encoding: chunked\r\n
\r\n
5\r\n
hello\r\n
[EOF here; no 0\r\n\r\n terminal chunk]

The source-level output was again OK:200:hello. The control with a properly terminated chunked body also returned OK:200:hello, which shows why checking only the result text would miss the distinction. Both fixed source snapshots and the Colab replay reproduced these cases. These were not instrumented tests of the running APK, and the saved JADX excerpt does not prove the complete response-framing path in the release binary.

A 200 OK status and decodable body do not prove message completion. RFC 9112 Section 6.3 defines body-length framing; Section 8 covers incomplete messages. With a valid Content-Length, the indicated octets must arrive. A chunked response must include its terminating zero-sized chunk and trailer termination. EOF or timeout is not a substitute for those conditions.

Three completion rules, not one generic EOF rule

A compact implementation approach is to decide the applicable framing mode after parsing and validating the headers, then keep its completion state explicit:

Framing mode Completion criterion Premature EOF
Valid Content-Length: N Exactly N message-body octets received Incomplete/error
Valid final Transfer-Encoding: chunked All chunks, terminal zero chunk, and trailer termination parsed Incomplete/error
Legitimate close-delimited response Connection closes after body where no other length rule applies Normal completion under that framing mode

This is a fixture-level table, not a complete HTTP parser specification: HEAD, 1xx/204/304, CONNECT and framing precedence require separate treatment where supported. The essential distinction is a valid end under the selected framing versus an unexpected transport end.

The tested Java reader tracks contentLength and isChunked but can parse buffered bytes after premature EOF, and some timeout paths also proceed after partial data. A narrow improvement is to retain explicit completion state and reject unfinished framed bodies before returning ordinary search content.

The related CL/TE test has a different result

For one split response containing both Content-Length and Transfer-Encoding, the harness raised Truncated chunk body: an error, not a successful parse. This fixture is not evidence of request smuggling or generalized fail-open behavior. RFC 9112 still gives useful precedence and rejection rules for broader coverage; this client-side test does not establish a server/intermediary exploit.

Useful later regression cases include conflicting lengths, malformed chunk sizes, incomplete trailers, varying read segmentation, and a body that hits MAX_BODY before completing. The size cap must not turn an unfinished framed response into success. These are follow-ups, not results established by the two reproduced EOF fixtures.

Distinguish failure from an empty search

The user-visible consequence is conditional. If a partial HTML document parses as a few results, the UI may treat missing results as poor engine coverage. If it parses nothing, a transport failure may look like a legitimate empty search. Neither inference is supported merely by the response status. A cleaner boundary would pass a typed success/error to the search layer, where the UI can distinguish a completed search with no matches from an incomplete HTTP fetch.

Possible outcomes of a local regression:

Complete framed response: success with expected body.
Premature EOF, fixed length: incomplete-response error.
Premature EOF, chunked: incomplete-response error.
Valid close-delimited body: success under documented conditions.
Body cap reached before message complete: bounded-size error, not 200.
Read timeout before completion: timeout/incomplete error, not 200.
3. Redirects, method preservation, cookies, and destination authorization

The local result

The same small SOCKS5 fixture returned redirects after a POST. The next request was captured directly:

303 after POST: POST /submit, then GET /follow
307 after POST: POST /submit, then GET /follow
308 after POST: POST /submit, then GET /follow

The 303 result can be expected for a browser-style redirect. However, RFC 9110, Section 15.4.8 and Section 15.4.9 define 307 and 308 as method-preserving redirects. The fixed Java implementation sets the method to GET and clears the POST body after a followed redirect without distinguishing those statuses. Related logic was visible in the released APK’s targeted JADX excerpt. Whether any current search-engine CAPTCHA flow depends on a 307/308 POST is a separate, still-unverified question.

I would avoid treating “make every redirect automatically forward the original POST” as the full fix. There are two distinct decisions:

  1. HTTP method semantics: does the redirect status require or permit rewriting POST to GET?
  2. Request authorization: is it appropriate to send the original POST body, query parameters, and cookies to the new destination?

In Ghost’s privacy model, the second question may legitimately be stricter than a generic HTTP library. The correct behavior can be to reject a cross-host POST redirect rather than either silently rewriting it or automatically resubmitting potentially sensitive data to another onion service.

A minimal policy matrix

Case Candidate behavior What the test should establish
Same-origin 303 after POST Switch to GET according to chosen semantics Body not resent accidentally
Same-origin 307/308 after POST Preserve POST and body, if supported Method and bytes retained
Cross-origin 307/308 after POST Reject or require explicit authorization No silent disclosure to a new host
.onion to clearnet redirect Reject before connecting No second socket to the forbidden destination
Relative redirect within an allowed onion Resolve then revalidate target No bypass via URL resolution
Redirect chain beyond the configured hop limit Report a defined redirect error No indefinite retry or silent empty result

The 301/302 compatibility policy should likewise be explicit. Relative locations and encoded query values should pass the same destination and request-target validation on every hop.

Cookie separation and origin changes

The Java plugin has a cookie jar keyed by host. That is a relevant starting protection, but the interesting evidence is at the actual redirect boundary: does a cookie received from engine A appear on a request to engine B? A local fixture can set distinguishable cookies on the first response, issue a same-host redirect followed by a cross-host redirect, and capture the Cookie header on each request. It should also observe the final purge boundary between searches, rather than assuming that a per-host map alone proves a full search-session lifetime.

A useful positive control

The clearnet redirect case is worth reporting alongside the anomalies. My local test saw an explicit Blocked redirect outside v3 .onion domain failure, not a second successful HTTP request. The source validates an initial URL before connecting and the resolved redirect destination before the next fetch. The APK excerpt includes the same rejection string. This is evidence supporting that particular fail-closed destination path. It is not a complete leak test covering every API, WebView navigation route, or Orbot configuration.

Native call.reject(...) and a visible UI error are separate observations: the JS layer may catch, retry, or aggregate a failure. A controlled redirect with both native and UI logging would settle the explicit error versus empty result question.

4. Canonical onion provenance and the threat model

Valid address is not verified operator

I independently checked the thirteen labels in the CANONICAL_ONION_REGISTRY against the Tor v3 address encoding rule. All thirteen passed the format, version-byte, and checksum checks in that small Python test. The Tor specification explains how these addresses encode an Ed25519 public key, checksum, and version. That is meaningful evidence of a well-formed address. It does not prove that the address is operated by Ahmia, TorDex, Torch, or another named search provider.

This distinction is particularly important because a registry used by detectOnionSpoof gives registered addresses a stronger semantic status than a normal list of search candidates. In a changing onion ecosystem, an address copied from a mirror directory may be syntactically valid and even reachable while the operator attribution remains uncertain. The lookup’s existence, current reachability, claimed brand, and first-party ownership proof should be four separate fields.

A useful provenance ladder, from stronger to weaker evidence, might be:

  1. A service operator’s authenticated official website, signed release/document, or maintained upstream repository explicitly names the onion address; an Onion-Location declaration can help where available.
  2. A dated, operator-controlled channel explicitly links the address to the service, with a credible continuity trail.
  3. Multiple independent public directories agree on an address, but there is no identified first-party confirmation.
  4. A mirror list or community mention provides an address without sufficient provenance.
  5. The address only passes the cryptographic format test, or appears in an old artifact without an owner claim.

Operators can rotate keys, go offline, or maintain multiple endpoints. Missing Onion-Location is not evidence of fraud. These categories preserve an evidence trail; they are not absolute trust scores.

In the checked sources, Ahmia has stronger first-party confirmation. A TorDex-branded site matched another registry entry, but that alone did not independently establish the operator’s identity. The remaining entries should not be presented as independently owner-verified by the checksum test. The author’s request for D1 provenance remains substantially open. I would rather leave an entry marked INCONCLUSIVE than promote a plausible directory address to a phishing-protection anchor without a trail.

One practical design separation

The registry might benefit from separating two use cases:

  • A discovery/coverage list, where a currently useful but not fully attributed endpoint may still be queried under a suitable caution and availability policy.
  • A first-party-supported canonical list, which is allowed to say that a different address might be impersonating an identified provider.

This avoids the undesirable choice between discarding useful search coverage and silently turning weak provenance into a strong security label. A small record can make the boundary reviewable:

engine_id:       <stable local identifier>
onion_address:   <56-character v3 address>
format_valid:   PASS | FAIL
owner_evidence:  FIRST_PARTY | MULTI_SOURCE | DIRECTORY_ONLY | UNKNOWN
provenance_url:  <source naming this exact address>
checked_at:      <UTC date>
status:          CANONICAL | DISCOVERY_ONLY | RETIRED | INCONCLUSIVE

Keep old entries dated and evidence links retrievable when keys rotate. Vanity-prefix resemblance is a heuristic, not proof of impersonation.

The threat-model document and independent review

The forum post and REVIEW.md point to docs/GHOST_V4_SECURITY_ARCHITECTURE.md. I could not retrieve that path from the pinned v4.0.0 revision or the sampled main snapshot, and a later check of the public main path also returned 404. That is a documentation-location observation, not a conclusion that the model never existed or that the architecture is unsupported. The document may have moved, been stored elsewhere, or been published later. An updated direct link, or the relevant text committed alongside the release evidence, would remove a practical blocker for outside reviewers.

Once available, I would look for a few explicit assumptions and failure boundaries rather than trying to judge the model as a whole:

  • The app needs Orbot to be running and reachable on a designated SOCKS endpoint. What is the failure behavior when Orbot is absent, restarting, on a different port, or deliberately configured to listen beyond loopback?
  • The app’s VPN gate, its local SOCKS connection, and the actual Tor routing are related but distinct observables. Which one is sufficient to allow a query, and how is a stale or ambiguous state handled?
  • Per-search SOCKS authentication can provide a circuit-isolation input; it does not erase correlations in timing, query text, sizes, or engine selection when the same query is sent to multiple services.
  • The Tor-only search transport does not automatically prove that every embedded WebView navigation, other Android component, or external link follows that same transport path.
  • RAM-only application state, WebView storage behavior, screenshot prevention, backup settings, screen-off cleanup, and panic wipe are separate claims with separate observation methods.

The post already recognizes the correlation introduced by parallel queries and stable engine selection. This is a coverage-versus-metadata trade-off, not a newly demonstrated Tor leak.

Minimal decision branch

Address passes v3 checksum?
  No: reject or mark invalid format.
  Yes: look for a first-party attribution source.
      Verified: eligible for the canonical/anti-spoof trust anchor.
      Unverified but useful: discovery list, with provenance status.
      Contradictory or changed: suspend the canonical label and re-check.

Threat-model assumption externally testable?
  Yes: attach environment and an expected failure case.
  No: document the limitation and avoid a stronger guarantee.

This supplies useful review work without asking the maintainer to prove every negative proposition before a forum reply can proceed.

5. Build reproducibility, Android evidence, and what the probe cannot settle

What the APK check establishes

The matching APK SHA-256 establishes which release was inspected, not that a second builder reproduced it. The R1 question in REVIEW.md concerns an independent build from source and comparison under a documented toolchain. See F-Droid reproducible-build guidance.

Lockfile pinning helps; toolchains, JDK/Gradle, timestamps, signing, packaging, and comparison procedures also matter. A documented independent build would answer a different question from the downloaded-APK hash. This HTTP probe need not expand into that build project.

The targeted JADX run is useful in a different way. It ties some Java source observations to an identifiable release binary. It produced 1,262 Java source files and four decompilation errors; the target plugin was among the recovered files. In particular, the URI reconstruction and 307/308 POST-to-GET behavior have corroborating source and decompiled-code evidence. The fixed-length/chunked completion behavior was reproduced in source-level execution, but the saved binary excerpts were not a complete trace of that path. I would not silently upgrade it to an APK-runtime observation.

What needs an actual Android environment

The author’s device matrix covers lifecycle, system services, and ROM behaviors that this JVM test cannot reach. A later staged test could use:

Area Cheapest useful observation Remaining limit
FLAG_SECURE and Recents Capture attempt on one different Android API/device No universal guarantee across all ROMs
Orbot absent/restarting Search blocked, visibly classified, no fallback Needs actual network/transport observation for stronger claims
VPN interface detection Record observed interface/transport status on alternate ROM Interface naming is environment-specific
Panic wipe Inspect app/WebView directories before and after controlled exit/wipe Abrupt termination and forensic recovery remain separate
Logcat canary Fixed query with timestamped log collection A zero-match log is not proof of zero possible leakage
New release rebuild Independent build with pinned toolchain and artifact comparison Release hash alone cannot establish this

OWASP’s WebViews guidance distinguishes browser storage surfaces. Calling a purge routine, observing cleared directories, and demonstrating behavior after abrupt termination are different levels of evidence. For RAM-only claims, record the component and termination mode actually tested.

One testing trap: non-root PCAPdroid uses Android VPNService, so it can conflict with an Orbot VPN-mode setup. A capture that changes the VPN arrangement may no longer test the original routing. Record whether capture used root mode, an external observer, or a separate proxy, and whether Orbot remained in the intended configuration.

A bounded interpretation

My results cover local socket protocol handling and selected APK implementation evidence. They do not verify device storage cleanup, screenshot defenses, actual Orbot routing, network-level anonymity, or the full F-Droid build path. Keeping those as separately named checks is useful even when a future device test passes.

6. How to keep the results reusable

A compact evidence receipt makes it possible to distinguish a later fix from a test-environment difference:

Check: HTTP_CL_PREMATURE_EOF
Source: Ghost v4.0.0, a8accb197b5136fb70773a88c8d20fe5d0b2245f
Runner: Java transport + local SOCKS5/HTTP mock
Input: 200; Content-Length: 100; body "short"; then EOF
Expected: incomplete-response error
Observed: OK:200:short
Replicated: source-level JVM test and CPU Colab
APK: download hash matched; full completion path not checked
Android device: not tested

A URL case should retain the full JS-built URL and the captured HTTP request line. A redirect case should retain the source and destination hosts, status, original and final method/body, cookie headers, and number of attempted socket connections. A registry case should retain the first-party URL and verification date. Small receipts like these preserve the result even if a later version fixes it.

The main references are the pinned v4.0.0 source, transport plugin, and review checklist. For independently maintained contracts, see the Java URI API, RFC 9112, RFC 9110, Tor onion-address specification, and F-Droid reproducible builds. Standards support the expected semantics; pinned code and captured fixtures support claims about Ghost. They are different kinds of evidence.

The practical takeaway: keep the successful clearnet-redirect control; give JS/native URL encoding one clear owner; distinguish incomplete framed responses from successful search results; apply both method semantics and destination policy to 307/308; and separate valid onion-address syntax from verified operator provenance. These are small, testable improvements compatible with the Tor-only design, not conclusions about Android-wide anonymity or reproducible builds. A newer implementation or device trace can change the finding without making the regression fixture less useful.

Three findings confirmed, reproduced, fixed, regression-tested — and shipped. The loop closed on a release, not a comment: v4.0.1 (vc11) is out on Codeberg with the fixes; 15/15 JUnit green on the transport suite.

Check: URL_DOUBLE_ENCODING

Source: v4.0.0, a8accb197b / confirmed on main

Runner: local SOCKS5/HTTP mock

Observed before: GET /search?q=a%2520b (re-escaped %, as you found)

Fix: toAsciiRequestTarget preserves caller escapes — JS is the single

 encoding owner; raw non-ASCII UTF-8-encoded, controls fail closed.

Observed after: GET /search?q=a%20b, /search?q=%E6%97%A5 verbatim.

Regression: testRequestTargetPreservesPreEncodedQueryFromJs

Check: HTTP_CL_PREMATURE_EOF / CHUNKED_MISSING_TERMINATOR

Observed before: OK:200:short and OK:200:hello, as you reported.

Fix: explicit completion state — CL underrun, missing terminal chunk,

 and body-cap hit before end of stream are now Incomplete/bounded-size

 errors, never 200 with partial HTML.

Regression: 2 dedicated tests; the MAX_BODY test now asserts the cap error.

Check: REDIRECT_307_308_POST_TO_GET

Fix: your two-decision split applied — method semantics AND request

 authorization. 301/302/303 -> GET; 307/308 preserve method+body

 same-origin; a cross-host redirect carrying a request body is

 rejected (stricter than a generic client, right call for this model).

Regression: 3 tests covering preserve / reject / rewrite.

Two process points adopted: the evidence receipt is now the reporting template in REVIEW.md, and the PCAPdroid/VPNService conflict is noted — capture method must be part of the fixture or the routing under test changes.

On registry provenance — agreed, structurally valid ≠ operator-verified. Tiering the 13 entries into canonical vs. best-effort with provenance_url per row is the next item.

One honest boundary: the receipts describe main + v4.0.1. The released v4.0.0 APK still contains the three behaviors as you measured them — no silent upgrade of the artifact you inspected.

This is exactly the loop the lane runs on other people’s submissions — receipt in, fix out, regression left behind. Thank you for the rigor.