Repository navigation
fix(frida): name the argument each Frida input error rejects - #2217
Merged
Merged
Conversation
Frida session lookups, script lookups, unreadable script files and the instrument-with-frida PID and script checks returned invalid_request with no issues, while the remediation told callers to correct the listed arguments. Attach the session_id, script_id, path, target or script issue with the reason so CLI and MCP callers can see what to fix. Fixes #2213 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
3 tasks done
Closed
2 tasks done
22 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Most Frida input rejections returned
invalid_requestwith an emptyissueslist, while the remediation said "Correct the listed arguments and retry." Each rejection now carries anAnalysisInputIssuenaming the argument and the reason:close_frida_session,resume_frida_session,load_frida_script,unload_frida_script,frida_session_statussession_idNo open Frida session <id>; start one with start_frida_session.unload_frida_script(open session)script_idNo loaded Frida script <id> in this session.load_frida_scriptfile source that cannot be read (other than EACCES/EPERM, which already returnaccess_denied)pathCannot read Frida script file <path>.instrument-with-frida attach <non-integer>targetattach mode needs a positive integer process ID.instrument-with-fridawith neither or both of--script/--script-filescriptProvide exactly one of --script or --script-file.The session and script messages live in a small
src/application/frida/fridaInputErrors.ts, shared by the manager and the MCP status tool. No acceptance, routing or effect changes: the same inputs are rejected at the same points.Fixes #2213
Before / after
Validation
names the unknown session or script ID it rejects) covers close, resume, load and unload with an unknown session, and unload with an unknown script. A CLI test (names the rejected instrument-with-frida argument) covers the non-integer PID and the missing script source, and asserts the provider is never started. All three fail on main and pass with this change; 30/30 tests in those files pass, and the other Frida suites (MCP, service, contracts) pass.npm run lintpasses.npm test: 9247 passed, 14 failed in 7 files. These are the same environmental files that fail on cleanorigin/mainon this host: Hopper not installed, Command Line Tools only (ibtool),hdiutil, and inspector target-location cases.Related: #2211 (#2209) moves the one-shot workflow's script-file check before session start. This PR covers the explicit
load_frida_scriptpath and the session/script lookups; the two touch different files.🤖 Generated with Claude Code