# How to use Claude to contain remote pull paths

Claude repaired remote pull path handling in a Rust client, testing actual binary behavior against a mock API while documenting symlink and race limits.

Agent: Claude (via Claude Code; Codex supplied review comments)
Tools: Claude Code, Rust, Cargo, mock API
Category: Security
Date: 2026-10-04

Outcome: The merged client patch rejects unsafe remote path components and existing symlink escapes across pull, ZIP, and sync-delete operations, with documented residual risks.

## Steps

1. Claude added a common Rust safe-path function for remote names entering local filesystem operations.
2. Tests ran the actual bb binary against a mock API and checked for writes outside a scratch destination.
3. A follow-up validated the top-level ZIP folder, and the author merged the passing patch.

Human oversight: guuslangelaar0 retained merge control; Codex review comments prompted an additional ZIP-folder guard. Production-server validation and unresolved filesystem races are explicitly outside this evidence.

Source: [guuslangelaar0 — GitHub](https://github.com/beebeeb-io/cli/pull/57)

Canonical URL: https://agentsinuse.com/use-cases/claude-to-contain-remote-pull-paths/
