Repository navigation
Add guarded filesystem API and join_segments - #4
Merged
Merged
Conversation
There was a problem hiding this comment.
🟡 Changes recommended
Unresolved issues include descriptor double-close risks, GIL-held blocking opens that can deadlock, a Windows keyword-argument mismatch, and missing supported-Linux coverage for no_symlinks enforcement.
4 open issues
What changed in this PR
This PR extends the Python bindings with guarded filesystem access and independently validated path components, addressing the API requests in #2 and #3.
Changes:
- Expose
FdJail, guarded file and directory operations, capabilities, and attestations. - Add
Jail.join_segments()with tests, type stubs, and usage examples. - Prepare release 0.4.0 with updated Rust dependencies and Python 3.14 CI coverage.
| File | Description |
|---|---|
tests/test_jail.py |
Add segment-validation and platform-aware guarded API tests. |
src/lib.rs |
Implement segment joining and guarded filesystem bindings. |
README.md |
Document new APIs, examples, and platform security guarantees. |
python/path_jail/__init__.pyi |
Define types for the new public APIs. |
python/path_jail/__init__.py |
Export guarded API classes. |
pyproject.toml |
Bump package version and advertise Python 3.14 support. |
CHANGELOG.md |
Record the 0.4.0 release changes. |
Cargo.toml |
Upgrade dependencies and enable the Rust guard feature. |
.github/workflows/ci.yml |
Add Python 3.14 and adjust platform test coverage. |
Review effort: Balanced
There was a problem hiding this comment.
🔵 Needs a closer look
The security API depends on unavailable path_jail 0.6 internals, requiring native Linux/macOS validation of confinement guarantees, write-policy enforcement, and rejection of destructive open modes.
No open issues 🎉
1 resolved since last review
Review effort: Balanced
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
FdJail, guarded file operations, capabilities, and attestationsJail.join_segments()for separately validated path componentsValidation
Closes #2
Closes #3