Security hardening: proposed fixes for issue #568
Nobody has claimed this yet.
- Dominant language
- Rust
- Stars
- 19.9k
- Forks
- 2.3k
- Avg merge
- 2d 7h
- Merged PRs (30d)
- 30
Description
Summary
Addressed all four findings from issue #568 in a fork.
Changes
- Permission gate — Wired SafetySystem into interactive turn loop. Read-only tools auto-allowed, destructive tools queue for approval via file-based API.
- Path traversal — Added resolve_path_safe() with canonicalization + bounds checking on write/edit/patch tools.
- Claude permissions — Changed DEFAULT_PERMISSION_MODE from bypassPermissions to default.
- Swarm isolation — Auto-injects JCODE_RESTRICTED_MODE=1 for swarm-agent spawns.
Code
Fork: https://github.com/Opfour/jcode
Full writeup: https://github.com/Opfour/jcode/blob/master/SECURITY.md
Commits: Opfour/jcode@9ed6a07...bf59944
PR creation is restricted so I'm filing this as an issue. Happy to rebase, split into separate PRs, or adjust approach — let me know what format works best.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with issue #568 and the linked SECURITY.md writeup, then review the referenced commits in the Opfour/jcode fork. Done means the four listed security findings are addressed: permission gating, safe path handling, the Claude permission default, and swarm isolation.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- rust
- Domain
- cli, security
- Issue type
- Bug
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 25/100