Repository navigation
Refuse unsafe GeoLab Mongo reset targets - #939
Merged
Merged
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #939 +/- ##
=======================================
Coverage 74.34% 74.34%
=======================================
Files 183 183
Lines 36506 36506
Branches 2540 2540
=======================================
Hits 27141 27141
Misses 8455 8455
Partials 910 910 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
wangyinz
marked this pull request as draft
August 14, 2026 06:00
wangyinz
marked this pull request as ready for review
August 14, 2026 15:45
wangyinz
force-pushed
the
codex/issue-797-geolab-reset-guard
branch
from
August 25, 2026 02:59
fe7718f to
b98f839
Compare
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.
Closes #797.
Canonicalizes GeoLab's MongoDB reset root and target before any destructive operation. Reset now rejects empty, relative, root, home, workspace, database-root, file, traversal, symlink-escape, and prefix-collision targets, and only removes a canonical nested database directory.
Validation:
sh -n,bash -n, Black,py_compile, andgit diff --check: passedIndependent agent review: PASS with no code changes. The review additionally verified that all rejected cases exit before
rmor directory creation and leave the filesystem snapshot unchanged.