1jehuang / 1jehuang/jcode

Security hardening: proposed fixes for issue #568

Open
#676 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

autonomous: no enhancement priority: high triage: needs-decision
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

  1. Permission gate — Wired SafetySystem into interactive turn loop. Read-only tools auto-allowed, destructive tools queue for approval via file-based API.
  2. Path traversal — Added resolve_path_safe() with canonicalization + bounds checking on write/edit/patch tools.
  3. Claude permissions — Changed DEFAULT_PERMISSION_MODE from bypassPermissions to default.
  4. 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

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.