Skip to content

fix(analysis-view): harden shared inline Evidence admission - #3065

Closed
Zhong-fan wants to merge 11 commits into
morluto:mainfrom
Zhong-fan:fix/analysis-view-inline-accessors
Closed

Zhong-fan wants to merge 11 commits into
morluto:mainfrom
Zhong-fan:fix/analysis-view-inline-accessors

Conversation

@Zhong-fan

@Zhong-fan Zhong-fan commented Oct 14, 2026 •

Copy link
Copy Markdown
Contributor

Summary

Share inline Evidence admission across analysis views so malformed local representations return typed errors before schema parsing or authentication. Reject executable traversal hooks without allocating a key list for every array element.

Fixes #2589.

Problem and expected behavior

A throwing normalized_result getter originally escaped summary/capture inspection. The upstream accessor check duplicates API-surface traversal and can still run Proxy reflection traps or enumerate an entire array before budget rejection. Array iterator/map/constructor hooks and function-valued metadata can execute during downstream validation.

Inline Evidence must be checked before parsing, without invoking caller traversal hooks. Ordinary portable Evidence must continue to authenticate and project without source mutation.

Change and scope

Use one shared admission owner for summary, capture and API-surface inline inputs. Remove the duplicate application traversal. Keep API-surface representation reservations in the existing accumulator; summary/capture use structural admission.

Reject Proxies and functions before reflection. Require standard arrays, inspect indexes incrementally, and reject own iterator/map/constructor overrides with fixed-size checks. Ignored named/symbol array metadata stays inert under the existing JSON cloning semantics. Retained Evidence lookup is unchanged.

Merged fixed main 500e32399a3bc827e17fb4adaa97db3bc0df29b5, preserving its CI-baseline fixes from #3080 and follow-ups. Superseded branch repairs were removed; the final diff is five files. No workflow, threshold or deadline changes.

This is an ordinary validation fix within the contribution scope; a new target capability or authority decision is not applicable.

Contract and boundary impact

  • Owner/earliest changed stage: borrowed inline analysis-view data admission, before parsing/authentication.
  • CLI/MCP/tool catalog: unchanged contracts; both adapters call the shared service.
  • Providers/platforms: no new provider behavior. Verified with Node24.18.0/npm11.16.0 on Windows x64 and WSL Linux, using separate locked dependencies.
  • Evidence/provenance: output, links, parent identities and original source data remain preserved. Admission does not clone, freeze or mutate borrowed input.
  • Target selection/authority/cleanup: no new interaction or ownership rule.
  • Generated metadata/package/installation: unchanged.

Expected effects:

  • Read existing files or captured data.
  • Launch or attach to a process.
  • Inject instrumentation or run scripts/code.
  • Change process memory, registers, files, or configuration.
  • Contact network services.
  • Recover protected code or work around protections.
  • Documentation or usability only; no target interaction.
  • Not sure yet; investigation or maintainer guidance needed.

Evidence and regression coverage

Root/nested/hidden/indexed getters; array hooks/prototypes; callable constructors; ordinary/revoked/callable Proxies; cycles, aliases, source preservation, authenticated ignored metadata and API-surface budgets. Valid-Evidence success checks are retained.

Three independent agents reviewed the final five-file diff and consumers after conflict resolution. Independent probes confirm zero getter/Proxy-trap calls, stable parent Evidence IDs and bounded array descriptor inspection. The delayed instance-field counterexample in the superseded JavaScript resolver no longer reproduces with the retained main implementation: worker specifier stays unknown, while an unrelated-write control still resolves normally.

Previous CI 38508711978 passed source/static/build and real-browser/recovery lanes, but failed three shard5 tests: browser comparison schema projection, SAZ input-limit error category and Hopper fixture process visibility. All three failures were reproduced locally at d4731b0. Current main supplies their fixes; final-head full suites pass without weakening runtime rejection, input bounds or ownership assertions.

Compiled CLI and SDK MCP tests exercise HAR decoding, retained/inline views and continued server use. Executable object fixtures cannot cross their JSON transport; source tests cover that local input boundary.

  • Observed, derived and inferred claims remain distinguishable.
  • Artifact identity, provenance and failed attempts remain preserved.
  • Unsupported, incomplete, unavailable or uncertain outcomes remain visible.

Validation performed

Final head: 953c4019641b8bb6763bbde95c52f4de156b45ad.

  • npm run check:ci: passed, including typecheck, lint/module boundaries, formatting, Knip, metadata, duplication/TODO checks and architecture guards.
  • Linux npm run test:fast: 504 files, 7375 passed, 8 skipped; exit0, 102.26s. Executed from an exact archive of this commit on the Linux filesystem.
  • Linux npm run test:focused -- tests/boundary/mcp/browserComparisonInput.test.ts tests/boundary/browser/sazWebCapture.test.ts tests/process-global/cleanLinuxHopperRuntime.test.ts tests/boundary/cli/analysisViewCli.test.ts tests/boundary/mcp/analysisViewMcp.test.ts tests/boundary/mcp/webNetworkCaptureMcp.test.ts: 44 passed, 1 skipped, six files; 55.97s.
  • Windows npm run test:focused -- tests/boundary/browser/cdpSvgXlinkHref.test.ts tests/boundary/cli/analysisViewCli.test.ts tests/boundary/mcp/analysisViewMcp.test.ts tests/boundary/mcp/webNetworkCaptureMcp.test.ts: 31 passed, four files; actual Chrome, compiled CLI and SDK MCP; 41.89s. Process-only TEMP/TMP point inside the checkout.
  • git diff --check: passed; tracked tree clean.
  • Windows CLI used the verified native artifact from upstream run38490448169. Its native sources/build script still match this head; SHA256 3ca4fcfe5eb39f13f0250e23de0f38c6cfd33616c664a436cd69ef3f013ac9e2.

Final-head remote CI 38515685028 completed successfully at head 953c4019641b8bb6763bbde95c52f4de156b45ad: all five test shards, Source tests, static/docs/build/native-package checks, Portable tests and CI required passed. Optional lanes skipped by the current change classifier are not claimed as executed. Historical CI results are identified above.

Compatibility, safety, and release

No migration or package changes for ordinary JSON Evidence. Executable local representations fail admission; ignored array metadata follows JSON omission semantics.

Actual Windows/Linux CLI and SDK MCP workflows passed, along with real Chrome tests. Hopper tests use controlled process fixtures; no live Hopper/Ghidra/IDA engine acceptance is claimed.

This is input validation, not arbitrary JavaScript containment or a whole-input hard heap limit. Ordinary-object key enumeration predates this change; summary/capture do not acquire an API-surface representation budget.

Before merge

  • Concrete issue and expected behavior identified.
  • Scope and authority resolved within existing boundaries.
  • Focused final diff and Conventional Commit title.
  • Related issue linked.
  • Tests cover changed behavior and meaningful failures.
  • Owning contracts updated; generated metadata unchanged.
  • Public CLI/MCP workflows exercised.
  • Final diff checked for secrets, unrelated cleanup and unsupported claims.

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 14, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-10-14T00:49:46.279106Z 4272af6 PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@greptile-apps

greptile-apps Bot commented Oct 14, 2026 •

Copy link
Copy Markdown
Contributor

RetriggerConfidence Score: 5/5

[High impact] The PR appears safe to merge; no new actionable defect was established.

Summary

The PR gives inline Evidence one shared admission check before parsing and authentication.

  • Inline Evidence is checked before every analysis view is parsed.

No new actionable issue was established. The previous threads were unnumbered, so no numbered previous-finding entries were supplied.

Diagram

%%{init: {'theme': 'neutral'}}%%
flowchart TD
  A[Inline Evidence] --> B[Shared admission]
  B -->|Rejected| C[Typed error]
  B -->|Accepted| D[Parse and authenticate]
  D --> E[Project selected view]
  F[Retained Evidence lookup] --> E
  G[API-surface accumulator] -->|Reserve bytes during admission| B
Loading

Reviews (7) · Last reviewed commit: "chore: merge main and retire superseded ..." · Reviewed by Greptile

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 4272af60d8

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex usage limits have been reached for code reviews. Please check with the admins of this repo to increase the limits by adding credits.
Repo admins can enable using credits for code reviews in their settings.

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex usage limits have been reached for code reviews. Please check with the admins of this repo to increase the limits by adding credits.
Repo admins can enable using credits for code reviews in their settings.

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex usage limits have been reached for code reviews. Please check with the admins of this repo to increase the limits by adding credits.
Repo admins can enable using credits for code reviews in their settings.

@Zhong-fan Zhong-fan changed the title fix(analysis-view): reject inline accessors before parsing fix(analysis-view): harden shared inline Evidence admission Oct 14, 2026
@chatgpt-codex-connector

Copy link
Copy Markdown

Codex usage limits have been reached for code reviews. Please check with the admins of this repo to increase the limits by adding credits.
Repo admins can enable using credits for code reviews in their settings.

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex usage limits have been reached for code reviews. Please check with the admins of this repo to increase the limits by adding credits.
Repo admins can enable using credits for code reviews in their settings.

@Zhong-fan

Copy link
Copy Markdown
Contributor Author

@greptileai review

@morluto morluto added bug Something isn't working area: evidence Evidence, artifacts, and reconstruction labels Oct 14, 2026

Copy link
Copy Markdown
Contributor Author

Closing this PR because #2589 has already been resolved on main in 278d7fb. This branch now mainly adds broader inline Evidence admission hardening beyond the reported accessor failure, so keeping it open as Fixes #2589 would duplicate the resolved issue and expand its scope. Thank you for reviewing it.

@morluto

morluto commented Oct 15, 2026

Copy link
Copy Markdown
Owner

Thanks, @Zhong-fan, for tracing unsafe inline-Evidence traversal hooks to their shared admission boundary. Main now validates both analysis-view consumers through one owner before parsing or authentication (main).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area: evidence Evidence, artifacts, and reconstruction bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

fix(analysisView): capture views let inline accessor errors escape

2 participants