Repository navigation
feat(electron): add autonomous Electron runtime analysis - #464
Conversation
|
Bugbot is not enabled for your account, so this pull request was not reviewed. Enable Bugbot in the Cursor dashboard to get automatic reviews on future PRs. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: fd0549bd0d
ℹ️ 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".
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 90bea6e796
ℹ️ 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".
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 13b8f4a39f
ℹ️ 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".
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 227e38444d
ℹ️ 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".
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 7ec73ffcd0
ℹ️ 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".
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 8c4fd48b1a
ℹ️ 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".
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 1968287463
ℹ️ 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".
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: b6b2f18bf0
ℹ️ 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".
| if (lineage?.status !== "verified") | ||
| return { | ||
| cleaned: false, | ||
| reason: | ||
| "owned Electron lineage was unavailable; helper cleanup was not proven", |
There was a problem hiding this comment.
Reject Windows active captures before launch
On win32 this cleanup path requires lineage.status === "verified", but the default process-ownership host returns no process table on Windows, so observeOwnedProcessLineage() cannot verify lineage; a configured Windows caller will still reach electron.launch() first and only then get cleanup_failed. Reject active Electron capture before launching on Windows unless native ownership/cleanup proof exists, rather than running the target and failing after the side effect.
AGENTS.md reference: AGENTS.md:L32-L32
Useful? React with 👍 / 👎.
| recordRuntime("process-lifecycle", `child.${method}`, "attempted", { | ||
| argument_shapes: args.map((value) => shape(value)), | ||
| }); | ||
| const child = original.apply(this, args); |
There was a problem hiding this comment.
Propagate the run token into child envs
When the observed app calls child_process.spawn/execFile/exec/fork with an explicit env, Node does not inherit process.env, so this wrapper starts the helper without REA_PROCESS_RUN_ID. The cleanup code validates descendants by that token before signaling, so a long-lived helper with a custom env is treated as unowned and can be left running while the capture reports a cleanup failure; merge the run token into explicit child environments or track those PIDs with equivalent proof.
AGENTS.md reference: AGENTS.md:L32-L32
Useful? React with 👍 / 👎.
| case "wait": { | ||
| const page = | ||
| selectedWindow ?? | ||
| (await application.firstWindow({ |
There was a problem hiding this comment.
Let untargeted waits complete without windows
Fresh evidence after the earlier window-wait fix is this wait branch: with no window_index, it still calls firstWindow(). Tray/headless Electron apps, or scenarios that intentionally wait before any window is created, therefore record the wait action as failed instead of simply sleeping and returning valid zero-window Evidence.
Useful? React with 👍 / 👎.
* feat: add autonomous Electron runtime analysis * feat(electron): add lifecycle and boundary telemetry * feat(electron): capture runtime boundary evidence * fix(electron): package boundary hook helper * feat(electron): report active capture coverage * fix(electron): account for bring-your-own runtime * feat(electron): expand agent-owned runtime scenarios * fix(ghidra): keep fixture credentials out of argv * perf(test): serialize local test and docs workloads * fix(electron): harden active runtime capture * fix(inspector): require exact runtime target authorization * fix(docs): make managed manifest host independent * fix(ci): make generated catalog portable * fix: unblock autonomous command and electron flows * fix(electron): close popup and detached helper gaps
Summary
This PR makes REA substantially more autonomous for Electron and JavaScript runtime investigations. It adds bounded, provider-owned Electron actions through Playwright, correlates window/WebContents/process/IPC/timeline events, and makes the resulting Evidence usable by runtime reconciliation.
Root causes resolved
Validation
Scope note
The Windows Ghidra review finding is an existing, intentional fail-closed boundary: verified Job Object ownership, private DACL enforcement, and reparse-safe path admission are not implemented, so enabling that provider would overclaim authority. This Electron PR does not weaken that boundary.
Issues
Closes #460
Closes #62
Closes #337
Closes #338
Closes #376
Related broader Electron follow-up work: #64 and #375.