Repository navigation
Conversation
|
Codex usage limits have been reached for code reviews. Please check with the admins of this repo to increase the limits by adding credits. |
[High impact] The reviewed follow-up appears safe to merge from a code perspective; the stated maintainer scope approval remains separate. SummaryAdds caller-supplied TLS key logs for recorded packet captures, with restricted metadata output and private file cleanup.
Diagram%%{init: {'theme': 'neutral'}}%%
flowchart LR
A[Read caller key log] --> B[Private read-only copy]
B --> C[TShark decrypts capture]
C --> D[Remove credentials]
D --> E[Return reviewed metadata]
B --> F[Remove private copy]
A --> G[Read or close fails]
G --> H[Public error without raw cause]
G --> I[Keep cleanup lease private]
I --> J[Retry exact owner]
Reviews (10) · Last reviewed commit: "fix(captures): keep key-log file failure..." · Reviewed by Greptile |
c529201 to
b3a37e7
Compare
03bbe25 to
27f8300
Compare
|
CI note: the two failed test runs on this PR ( Both runs failed only on Why this is runner speed:
This PR does add a small cost to that test, because the catalog grows by one tool field, one example and longer descriptions. Measured locally with alternating runs on the same base, that is about +0.45 s (+4%). I've pushed |
baron
left a comment
There was a problem hiding this comment.
Review of exact head 27f8300b079f7e71e1ca1f071db841af72933674 (freshly fetched; mergeable/clean).
Integration hold: obtain the maintainer scope decision requested in #3594. That issue still has no maintainer response/comments, and this PR itself says the caller-supplied secret input and credential-selection policy remain pending. CONTRIBUTING's fail-closed rule does not permit integrating materially unresolved scope/authority/verification questions merely because CI passes. Please record an explicit decision covering this final behavior before treating this as merge-ready; keeping a proposal pending is appropriate. In particular the decision should cover accepting session secrets, intentional withholding of producer text, and refusal/removal of explicitly selected credential fields. I am not classifying this offline workflow as target execution or asserting it is a prohibited bypass; the unresolved material policy decision itself is the blocker.
Source review: traced schema/service selection ownership, key-log byte parser, private-copy lifecycle, producer output withholding and shared command-failure consumers. The earlier output-size, contradictory limitation and workflow-import findings appear addressed; I am not reopening those threads. The scope decision must also settle the documented generic-header/raw-payload credential limitations rather than assuming the named-field exclusions provide complete secret isolation.
Validation: all 39 currently advertised check runs are completed SUCCESS, including real tshark/sigrok; no commit-status contexts were present. This is independent source/design review plus CI inspection, not a local TShark rerun. No files in the shared checkout were changed. The isolated checkout's lock SHA does not match the available shared dependency installation, so I did not reuse it or claim local tests. Local available Node versions (26.11.1 / 24.21.0) differ from pinned 24.18.0.
|
Thanks for checking the overlap with #3407, @Y0UW1SH! I ran a trial merge of the two heads. |
…-supplied key log Add optional tls_key_log_path to inspect_packet_capture. The NSS key log is copied read-only into the private workspace, passed by absolute path as tls.keylog_file, digest-checked and deleted right after the run (and on every failure). A pure parser reports line/label counts without secrets. With a key log, known authorization/cookie fields are redacted, filters naming them are refused, and producer stdout/stderr text is withheld. Otherwise unchanged. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
27f8300 to
c59840d
Compare
|
@baron thanks for the review, agreed. The scope decision was still open, so the "scope questions are resolved" box shouldn't have been ticked. I've unticked it and moved this PR back to draft. The decision request is on #3594 and lists the points you named: session secrets, withheld producer text, credential-field refusal and removal, and the generic-header and raw-payload limitation. I'll update this PR to match whatever is decided there. I've also rebased onto current @555aaditya thanks for checking. Fine by me for whichever PR lands second to take the one-line description merge. |
|
TL;DR: The seven fake-tshark test files pass with this change on top of current main. All 73 tests passed. Without the change, all seven files fail. Real TShark decryption was not run here. This PR is a draft, and a maintainer asked for a scope decision first. This comment checks code only. It does not answer that scope question. ResultsI applied the PR diff onto current main, c7f6b8b. The diff applied cleanly.
On main, 10 tests failed and 14 passed. Two files could not load, so their tests never ran. With the whole PR, 73 of 73 tests passed in seven files, and none were skipped. This is a new feature, not a bug fix. The "before" column only shows that the new tests need the new code. Thanks, Y0UW1SH, for a thorough change with tests that use a fake tshark. Not run
CommandsPATH=~/.local/opt/node24/bin:$PATH npm_config_cache=/tmp/t27-1015/npm-cache
# before: the PR test files only
env -C /tmp/t27-1015/m3643 git apply --include='*.test.ts' 3643.diff
npm run test:focused --prefix /tmp/t27-1015/m3643 -- <the seven test paths>
# after: the rest of the PR
env -C /tmp/t27-1015/m3643 git apply --exclude='*.test.ts' 3643.diff
npm run test:focused --prefix /tmp/t27-1015/m3643 -- <the seven test paths>Exit codes: before 1, after 0. Test setup🤖 Generated with Claude Code (Sonnet 5.5, verified by Opus 5.5) 🦊 |
Merge upstream main and resolve capture lifecycle conflicts. Preserve command failure metadata and completed redacted observations through late cancellation. Keep workspace ownership authoritative for key-log cleanup and retries. Add nine focused lifecycle regressions and update cleanup evidence. Prepared and verified with Codex. The maintainer scope decision in morluto#3594 remains pending.
|
Rechecked current head Greptile reviewed 22 files and added zero comments. Codex completed; the only unresolved review thread is the maintainer scope decision. No newly reported code defect was found. A focused source pass over key-log summary/error privacy and retained cleanup ownership found no additional concrete issue, so no new code commit was needed. The last fix keeps completed key-log buffers and readable descriptor owners out of public cleanup errors, including later admission and close retries. Its three regressions were observed failing on the previous implementation; 141 focused tests and static checks passed locally. The PR description now reflects completed CI/review. The scope decision in #3594 and @baron's changes-requested integration hold remain unresolved. |
Use the shared artifact file-handle boundary for the bounded kernel limit read. This carries the exact cleanup lease through failure projection so a successful retry can unblock acquisition and clear prior cleanup errors. Reproduced both kernel descriptor regressions on clean upstream; both pass with this fix. Prepared and verified with Codex.
Merge current upstream main and format the new plist assertion that fails the static check on clean upstream. This is a whitespace-only gate repair; TLS feature behavior is unchanged. The repository check passes on the merged tree. Prepared and verified with Codex.
Use a relative JAVA_HOME to exercise the awaited unavailable inspection without first requiring ps or platform process helpers. Assert the intended configuration refusal and an empty isolated temporary root. The existing regression fails before this change, all 101 relevant tests pass after it, and a missing-await mutation is still detected. Prepared and verified with Codex.
Sync upstream main and retain its equivalent kernel file-handle ownership fix. Correct the stale archive-reader assertion to preserve known NaN as the canonical nan label, matching domain and acceptance contracts. The synced tree passes 147 focused tests with three platform/permission skips and the repository static gate. Prepared and verified with Codex.
Keep upstream's repaired archive and verifier fixtures while preserving TLS key-log handling, output withholding, and the current CLI cancellation and cleanup ownership contracts. Verified 81 focused tests (three platform/permission skips), npm run check, and npm run docs:check (including five README consistency tests).
Arm the clock-regression watchdog once after the workload starts and stop it before settlement and cleanup. Preserve strict timeout success and surface the original capture error. Add deterministic forward/backward wall-clock cases at the owning deadline boundary. Both reject a Date.now clock mutation; the production monotonic clock is restored unchanged. All 66 focused cases and npm run check pass. Native macOS verification remains with CI.
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. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 7a38d99454
ℹ️ About Codex in GitHub
Codex has been enabled to automatically 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 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
Discard raw command cause wrappers and retain cleanup supervisors privately before returning decrypting failures. Preserve modeled physical errors, cancellation identity, output sizes and cleanup retries. Cover real owned-command collection, overflow and retained cleanup paths, and inspect native error graphs beyond their JSON projections.
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: fe2d688db9
ℹ️ About Codex in GitHub
Codex has been enabled to automatically 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 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
| // Absolute, so resolution never depends on the working directory. | ||
| ...(keyLog === undefined | ||
| ? [] | ||
| : ["-o", `tls.keylog_file:${keyLogSnapshotPath}`]), |
There was a problem hiding this comment.
Hold decryption pending a maintainer scope decision
If this production wiring is intended to leave draft/prototype status, the branch still lacks the required approval: branch commit 5ee2928 explicitly records scope decision #3594 as pending, while this line enables TShark key-log decryption and the same diff advertises it through CLI/MCP. This is substantial protection recovery, so keep the capability unmerged and unpackaged until a maintainer decision covers the final behavior rather than treating implementation or CI as approval.
AGENTS.md reference: AGENTS.md:L7-L7
Useful? React with 👍 / 👎.
There was a problem hiding this comment.
The integration hold remains unresolved and this thread stays open pending the maintainer decision in #3594. The scope request and PR body now describe the final narrowed behavior at 269def9, including the explicit metadata set, URL-userinfo handling and refusal of every key-log display filter. The material-scope checkbox remains unchecked. This work does not merge or release the capability.
The PR is ready for initial maintainer review under the existing human declaration; that does not establish scope approval or merge permission. @baron's changes-requested review remains the governing integration hold.
Move the existing five-case WASM finalization regression to the isolated process-global project. A deterministic two-file run reproduced three failures in the shared CLI worker on both this branch and clean upstream 847472a; the same six cases pass after moving the mock to its intended owner. Keep every assertion and verify unique discovery.
Withhold completed key-log buffers and readable file owners from public cleanup errors. Track confidential reads by exact cleanup lease identity so admission and close retries preserve privacy and cleanup authority. Cover source/integrity close failures, cancellation, blocked admission and successful cleanup retry using real file handles.
Summary
Recorded HTTPS inspection needs matching client session secrets to return decrypted fields. Add optional
tls_key_log_pathfor a key log produced by the caller's own client. TShark receives a private read-only copy; REA returns its identity/counts and selected reviewed metadata, removes transport credentials and URL userinfo, and withholds raw producer diagnostics.Current head:
6fd11bd. The latest file-close error leak is fixed and pushed; 141 focused tests and static checks pass locally. All 43 reported checks passed. Automated reviews completed; the sole unresolved review thread is the maintainer scope decision. Merging remains blocked by the explicit maintainer scope decision in #3594 required by the changes-requested review. Review readiness and CI success do not supply scope approval.Refs #3594. Related TShark selection work: #3403 / #3407.
inspect_pcap_captureis unchanged.Implementation and follow-up fixes
0400copy as onetls.keylog_fileargument, verify private input integrity after execution, and attempt prompt deletion. Retain exact cleanup ownership across failures. Completed redacted Evidence survives late cancellation and workspace cleanup failure.@variants, are admitted only for removal. Refuse generic headers, decoded authentication, payload/raw selections, unreviewed fields and every non-null display filter before provider work.close(); successful retry clears the original errors' pending state. Ordinary artifact reads retain their existing behavior.847472a; upstream independently fixed it in8cbaf6c. This branch includes the exact upstream isolated test through the sync with mainbb212ff, retaining all five assertions.The previous review missed completed key-log values and descriptor capabilities retained by file-close errors. The latest regressions inspect the actual public object graph, including non-enumerable causes and nested
cleanupPrimary, rather than relying on JSON projection.Scope decision and limits
The requested maintainer decision covers caller-supplied session-secret key logs and their private-copy lifecycle, withheld raw producer diagnostics, removal of named credentials and URL userinfo, and restriction to the explicit metadata set with request-target context and no display filters.
Selected metadata may still contain application data or caller-embedded secrets; no arbitrary content-based DLP is claimed. Decrypted metadata can remain in MCP Evidence memory. Existing no-key-log/plaintext handling and embedded pcapng secrets need a separate policy decision.
The provider remains Linux/TShark 4.x with trusted global Wireshark configuration, plugins and libraries. No live capture, target launch, arbitrary preferences, HAR conversion or Windows admission is added. QUIC/HTTP/3, browser-produced key logs and pcapng Decryption Secrets Blocks are unverified.
Expected effects (check known effects; use documentation-only on its own).
Unchecked items do not establish absence; leave uncertainties visible.
writesFilesystemeffect. The caller's key log and capture file are never modified.)SSLKEYLOGFILE. No pinning, DRM or other protection is bypassed. Because this is a judgment call, "Not sure yet" is ticked and the scope question is open in [Feature] Decrypt TLS in recorded packet captures with a caller-supplied key log #3594.)Verification
npm run checkandgit diff --checkpassed. Independent source review found no additional concrete issue in the latest fix. The published tree matches the tested tree.psownership probe fails withfatal library error, lookup self. The new regressions use real files, descriptor ownership and stable reads with an injected command process.Representative normalized output from the injected-command late-finalization fixture (simulated producer data):
{"packets":[{"frame.number":["1"],"http.request.method":["GET"]}],"redactions":[{"frame":"1","field":"http.request.uri","reason":"transport-credential"},{"frame":"1","field":"http.authorization","reason":"transport-credential"},{"frame":"1","field":"http.host","reason":"transport-credential"},{"frame":"1","field":"http2.headers.authority","reason":"transport-credential"}],"diagnostics":"","withheld_diagnostic_bytes":0}Missing decrypted fields do not establish absence; partial Evidence never asserts failed cleanup completed.
Author readiness
Human owner: @Y0UW1SH
Before merge
type(scope): outcome.