Repository navigation
Conversation
…s, credential exposure) 1. CWE-367: TOCTOU Race in HopperTargetLease ensureLeaseDirectory 2. CWE-61: Silent O_NOFOLLOW Bypass on Windows in FilesystemSnapshot 3. CWE-312: Cleartext Auth Token in Bootstrap Script Includes 12 PoC + regression tests (all green)
|
Codex usage limits have been reached for code reviews. Please check with the admins of this repo to increase the limits by adding credits. |
…s, credential exposure) 1. CWE-367: TOCTOU Race in HopperTargetLease ensureLeaseDirectory 2. CWE-61: Silent O_NOFOLLOW Bypass on Windows in FilesystemSnapshot 3. CWE-312: Cleartext Auth Token in Bootstrap Script Includes 12 PoC + regression tests (all green)
…s, credential exposure) 1. CWE-367: TOCTOU Race in HopperTargetLease ensureLeaseDirectory 2. CWE-61: Silent O_NOFOLLOW Bypass on Windows in FilesystemSnapshot 3. CWE-312: Cleartext Auth Token in Bootstrap Script Includes 12 PoC + regression tests (all green)
CI Status NoteThe CI checks are pending approval — this is expected for first-time fork PRs. GitHub requires maintainer approval to run workflows from external contributors. What has been verified locally:
All pre-push hooks (\lint-staged\ → \oxfmt\ + \oxlint, and \ urbo typecheck lint) passed successfully on each commit. |
dandgabr
left a comment
There was a problem hiding this comment.
Consolidated review
- P3 — Normalize Windows paths before comparing with
realpath.FilesystemSnapshot.hashFile(src/process/capture/FilesystemSnapshot.ts:99-112) omits a file whenever the requested path is textually different fromrealpath, even if no symlink or junction was traversed.filesystem_observation_pathsare caller-provided and resolved against the working directory, but Windows path casing and other canonical-form differences can remain. A valid file is then omitted and coverage is reported as truncated. Compare Windows paths with platform-aware normalization while preserving detection of symlink and junction traversal.
No other actionable P0–P4 finding was confirmed.
dandgabr
left a comment
There was a problem hiding this comment.
Additional review finding
- [P2] Remove the token-bearing bootstrap on every cancelled launch path.
#writeBootstrap()creates the file before#launchPreparedTarget()starts. Several normal error returns inside itstrybypass the cleanupcatch, including an aborted signal orlaunchHopperProcess()returningnullafter cancellation. The bootstrap therefore remains in the session directory after a cancelled launch. Move cleanup to afinally/shared failure path or explicitly remove it before every non-success return.
The existing P3 Windows path-normalization finding remains in the earlier consolidated review.
…s, credential exposure) 1. CWE-367: TOCTOU Race in HopperTargetLease ensureLeaseDirectory 2. CWE-61: Silent O_NOFOLLOW Bypass on Windows in FilesystemSnapshot 3. CWE-312: Cleartext Auth Token in Bootstrap Script Includes 12 PoC + regression tests (all green)
Addressed review findingsThanks @dandgabr for the precise review — both findings were valid. Pushed fixes in commit \ |
|
@greptileai review |
|
Co-authored-by: Kaoru0822 <[email protected]>
Check caller cancellation after the final fallback file inspection, preserving the original reason and closing the descriptor. Explain unreadable Hopper lease directory recovery while leaving unverified permissions unchanged. Replace filesystem primitive self-tests with production lease admission and descriptor-swap regressions. Keep bootstrap cleanup and symlink omission with their owning boundaries. Include fallback cancellation in Windows and POSIX verification lanes. Verified 160 related checks, four explicit native Windows skips, typecheck, scoped lint, module boundaries and docs. Real official Linux Hopper 6.4.2 demo CLI analysis passes as an ordinary Ubuntu 24.04 user with unchanged target bytes and clean teardown. Full lint has one unchanged Ghidra baseline error reproduced on exact main 928b4d5. Co-authored-by: Kaoru0822 <[email protected]>
Retain unresolved process identity and launch evidence through retryable cleanup. Share capture path normalization and preserve failed filesystem observations. Bound child output and drain Windows pipes without one-chunk throttling. Reviewed fixes include #1628, #2632, #2644, #2784, #2928, #2931, #2965, #2992, and #3011. Validation: 92 focused source tests passed; four platform-specific skips. Real Windows and Hopper lifecycle coverage was not rerun.
Co-authored-by: Kaoru0822 <[email protected]> # Conflicts: # docs/installation.md # tests/process-global/hopperLeaseDescriptorPermissions.test.ts
|
Want your agent to iterate on Greptile's feedback? Try greploops. |
The Hopper security implementation and its owning regressions from this PR are already present on
mainthrough599a8ee11(fix(process): preserve cleanup ownership and normalize captures once), which explicitly records #1628 among its reviewed fixes. Synchronizing this branch therefore leaves no duplicate production-code or test diff.This final change resolves the remaining review finding in the owning installation guide. Recovery guidance now applies specifically when opening the Hopper lease directory fails with a permission error. Earlier creation failures, including an unsearchable parent, keep their separate diagnostic and are no longer covered by that promise.
The integrated behavior on
mainstill provides the original outcome:O_NOFOLLOWsnapshot fallback verifies the named leaf, opened descriptor, final leaf identity, and caller cancellation;Validation on final head
3986dfc91:npm run check:fast: passed;npm run docs:check: passed, including README consistency;Earlier real-provider verification used the official Hopper 6.4.2 demo on Ubuntu 24.04 against
/usr/bin/true; public CLI analysis completed with the target digest unchanged and clean teardown. Native Windows and macOS execution of the original security paths was not independently rerun for this final docs-only head.Original work by Sunil remains in the PR history. The follow-up review, implementation, reconciliation, and verification retain the requested Kaoru0822 co-author metadata.