Skip to content

feat(browser): accept mitmproxy 12.3.1 for native capture decode - #8088

Merged
N0zoM1z0 merged 4 commits into
morluto:mainfrom
gyanu2507:fix/mitmproxy-12.3.1-native-profile
Nov 22, 2026
Merged

N0zoM1z0 merged 4 commits into
morluto:mainfrom
gyanu2507:fix/mitmproxy-12.3.1-native-profile

Conversation

@gyanu2507

@gyanu2507 gyanu2507 commented Oct 30, 2026 •

Copy link
Copy Markdown
Contributor

Summary

Thanks @ristoxy for pinning down the dependency trap in #8078 and for already checking that 12.2.3 and 12.3.1 share the same tnetstring/compat path and produce identical decode output.

This PR moves the offline native mitmproxy adapter from the exact 12.2.3 profile to 12.3.1, so bring-your-own mitmdump can take the Brotli/cryptography fixes that 12.2.3's upper bounds refuse.

Fixes #8078

Problem and expected behavior

bridge/mitmproxy/capture.py rejected every mitmproxy version other than 12.2.3. That forces a toolchain whose dependency ceiling still includes known-vulnerable Brotli and cryptography ranges. Expected: the adapter accepts 12.3.1, reports that version in its decoder identity, and keeps the same native decode behavior.

Change and scope

  • Set PROFILE and MITMPROXY_CAPTURE_PROVIDER_IDENTITY.version to 12.3.1.
  • Retarget the Linux verification archive URL and SHA-256 to the official 12.3.1 linux-x86_64 tarball.
  • Update caller-facing docs, notices, and verifier strings to match.
  • Keep SaveHar postData.text: null admission for both 12.2.3 and 12.3.1 so older HARs still validate.

Not included: accepting a version range at runtime, changing decode logic, or installing mitmproxy for callers.

Follow the contribution scope.
Maintainer scope decision: not applicable (existing offline decoder profile bump; no new execution or mutation authority).

Contract and boundary impact

  • Semantic owner and earliest changed stage: offline mitmproxy capture adapter (bridge/mitmproxy/capture.py) and its provider identity; CLI/MCP consumers reuse the same decode path.
  • Contribution scope fit and linked maintainer decision: ordinary packaging/profile fix within the existing historical capture boundary; not applicable.
  • CLI and MCP/tool-catalog contract: requirement text now names mitmdump 12.3.1; tool behavior unchanged for valid captures.
  • Provider, bridge, target-format, or platform compatibility: callers must supply mitmdump 12.3.1; 12.2.3 is no longer accepted by the native profile gate.
  • Evidence, artifact, provenance, or reconstruction contract: decoder identity version becomes 12.3.1; SaveHar null-text quirk still admitted for 12.2.3 and 12.3.1 HARs.
  • Target selection, authority, upstream behavior, and cleanup details (if applicable): unchanged (offline read of caller-supplied capture files).
  • Generated metadata (docs/public/product-catalog.json), package, or installation impact: identity version change only; catalogs remain CI-generated.

Expected effects (check known effects; use documentation-only on its own).

  • 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

  • Tests added or updated: bridge/mitmproxy/test_capture.py profile gate (accept 12.3.1 identity, reject 12.2.3 runtime); HarCapture.test.ts SaveHar null-text cases for both producer versions.
  • Base reproduction or other evidence: source gate previously hard-coded PROFILE = "12.2.3"; issue [Feature] Accept mitmproxy 12.3.x in the native mitmproxy capture adapter #8078 reports byte-identical decode under both versions when only PROFILE is swapped.
  • User-visible CLI/MCP output (if applicable): unsupported-profile diagnostic now expects 12.3.1.
  • Remaining proof gaps: Linux verify:web:network-captures against a real mitmdump 12.3.1 binary was not run on this macOS host (adapter requires Linux). Archive SHA-256 was computed locally from the official download.

Boundary regressions: historical capture decoder profile/identity; SaveHar producer quirk admission.

For evidence-bearing changes:

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

Validation performed

  • python3 -m unittest bridge.mitmproxy.test_capture -v — 24 passed, including new profile gate tests.
  • npm run test:local -- src/browser/history/HarCapture.test.ts (Node 24.22.2) — 104 passed.
  • shasum -a 256 mitmproxy-12.3.1-linux-x86_64.tar.gz — f7b4237f5702f6cd21357fe6e4680a7e905f8f9b816b872230d018ea696c34d5.
  • Real Linux npm run verify:web:network-captures with mitmdump 12.3.1 — not run here (non-Linux host).

Compatibility, safety, and release

  • Breaking changes or migration steps: callers still on mitmdump 12.2.3 must upgrade to 12.3.1 for native decode. HAR files produced under 12.2.3 remain readable; the SaveHar null-text quirk stays admitted for that creator version.
  • Real Hopper/Ghidra, browser, or OS coverage: Linux native mitmproxy lane updated in workflow; not executed locally.
  • Package or release metadata impact: provider identity version string only.
  • Security, privacy, process, or containment review: moves the verified bring-your-own profile onto a release that admits patched Brotli/cryptography; tornado upper bound remains upstream's.

Author readiness

Human owner: @gyanu2507

  • I reviewed the final diff and relevant existing code, understand the change and its edge cases, and take responsibility for the complete PR, including AI-assisted work.
  • I checked the evidence above, confirmed it supports the current change, and recorded meaningful validation gaps.
  • I declare this PR ready for initial maintainer review.

Before merge

  • This PR addresses a concrete problem or an agreed enhancement.
  • Material scope and authority questions are resolved, and any required maintainer scope decision covers the final diff.
  • The PR has one focused outcome and the title follows type(scope): outcome.
  • Related issue is linked, or the reason for not linking one is stated above.
  • Tests cover changed observable behavior and meaningful failure paths.
  • Owning docs, contracts, and generated metadata are updated where needed.
  • User-visible CLI/MCP changes include representative output.
  • I checked the final diff for secrets, unrelated cleanup, and unsupported claims.

@chatgpt-codex-connector

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 ⚠️ Failed 2026-10-30T03:02:49.657710Z
We couldn’t complete this review. Comment @codex review to try again.
325266a 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.

@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.

@greptile-apps

greptile-apps Bot commented Oct 30, 2026 •

Copy link
Copy Markdown
Contributor

RetriggerView in GreptileConfidence Score: 5/5 Tier: plus

[Medium impact] The PR appears safe to merge, with the previous stale-example finding addressed and no new blocking issue found.

Summary

Updates the native mitmproxy decoder and Linux verification download to 12.3.1. Keeps older HAR files readable and refreshes the published example IDs.

  • Native capture decoding now requires mitmdump 12.3.1.
  • HAR files from both mitmproxy releases keep null body text.

Reviews (3) · Last reviewed commit: "test(web): regenerate published HAR exam..." · Reviewed by Greptile

Bump the offline adapter profile, provider identity, Linux verification archive, and docs so callers can use mitmproxy 12.3.1 instead of the 12.2.3 pin that blocks patched Brotli/cryptography. Keep SaveHar null postData admission for both producer versions.

Fixes morluto#8078
@morluto

morluto commented Nov 5, 2026

Copy link
Copy Markdown
Owner

Hey @gyanu2507, thanks for this! The addition looks good. What's left: it has merge conflicts with main in src/browser/history/HarCapture.ts and src/browser/history/HarSchema.ts (merging main into the branch is fine). There is 1 unresolved review thread from Greptile, about "Published examples have stale IDs". Greptile is at 4/5 on the current head, mainly over "Published examples have stale IDs", so addressing that thread should bump it. Happy to get this in once that's sorted out.

Keep accepting mitmproxy 12.3.1 for SaveHar null postData alongside the
upstream bracketed-IPv6 producer adaptation.
@gyanu2507

Copy link
Copy Markdown
Contributor Author

@morluto Merged current main and resolved the conflicts in HarCapture.ts / HarSchema.ts.

Upstream's bracketed-IPv6 producer adaptation is kept; mitmproxy 12.3.1 stays accepted for the SaveHar null postData.text path alongside 12.2.3.

gensokyo-dev and others added 2 commits November 22, 2026 08:31
Main now admits HAR producers through HAR_PRODUCER_PROFILES, so 12.3.1
joins 12.2.3 there. Its native profile download regression, retried
workflow download, notices and tool description move to the 12.3.1
archive and digest. Both new bridge test groups are kept.

Co-Authored-By: gensokyo-dev <[email protected]>
The HAR limitation now names both admitted mitmproxy profiles, which
changes the decoded capture's Evidence ID and both views' parent and
view digests. Update the published API surface and environment manifest
examples to the identities reproduced from their fixture bytes.

Co-Authored-By: gensokyo-dev <[email protected]>
@N0zoM1z0

Copy link
Copy Markdown
Collaborator

I verified the pin and brought this up to date with main:

  • Upstream: tag v12.3.1 resolves to 51c1d6b2 (the LICENSE commit used here), the release is the official one, and my download of mitmproxy-12.3.1-linux-x86_64.tar.gz hashes to f7b4237f…. Between v12.2.3 and v12.3.1, mitmproxy/io and addons/savehar are unchanged; flow.py has only a comment typo fix and version.py only the version.
  • Merge (6089b96bb): main now admits HAR producers through HAR_PRODUCER_PROFILES, so 12.3.1 joins 12.2.3 there. Main's new nativeProfileDownload regression, the retried workflow download, the notices and the tool description move to the 12.3.1 archive and digest. Both new bridge test groups are kept.
  • Follow-up (6af301bef): the published HAR examples' identities are regenerated, as noted inline.

On the merged result: 29 bridge tests, 94 HAR and download tests and 35 analysis-view MCP tests pass, and lint, typecheck and docs checks are clean.

@gensokyo-dev gensokyo-dev left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Verified: tag v12.3.1 resolves to 51c1d6b2, the official linux-x86_64 tarball hashes to f7b4237f…, and mitmproxy/io and addons/savehar are unchanged between 12.2.3 and 12.3.1. After merging main and regenerating the published example identities, 29 bridge tests, 94 HAR and download tests and 35 analysis-view MCP tests pass, with lint, typecheck and docs checks clean. Thanks.

@N0zoM1z0
N0zoM1z0 enabled auto-merge (squash) November 22, 2026 08:50
@N0zoM1z0
N0zoM1z0 merged commit 4f43d74 into morluto:main Nov 22, 2026
50 checks passed
@morluto morluto added area: runtime Process capture and runtime observation enhancement New feature or request provider: mitmproxy Analysis provider / engine: mitmproxy labels Nov 22, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area: runtime Process capture and runtime observation enhancement New feature or request provider: mitmproxy Analysis provider / engine: mitmproxy

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Feature] Accept mitmproxy 12.3.x in the native mitmproxy capture adapter

4 participants