
Safe REA Skill – open-source reverse engineering in a double-layer sandbox
Quick start · At a glance · When it helps · How it works · Tools · Step-by-step setup · Security · Validation · What's new · Credits
以下正文同步自 Hacker News 最新,版权归原站所有,已转换为易读排版。
Quick start · At a glance · When it helps · How it works · Tools · Step-by-step setup · Security · Validation · What's new · Credits
REA Safe Agent is a skill that builds a safer, contained environment for analyzing files with REA.
Especially useful for people who ask an agent to investigate unfamiliar binaries, archives, application packages or JavaScript. This project provides a preconfigured way to contain REA and the agent client, limit shared data, and repeat the verification checks.
Security hardening update: controlled gateway exchanges, 3,702 reproducible boundary cases, stricter macOS sharing and whole-image vulnerability evidence. See the strengthening work.
Watch the 68-second overview: what it is for, how the sandbox works and where its limits are.
rea-safe-agent-video-web.mp4
Full-quality MP4 with captions and the scene-by-scene script.
Copy this prompt into Codex or Claude Code. The agent reads the guide, checks your machine and shows you the plan before installing anything:
Set up REA Safe Agent from: https://github.com/dagoSte/rea-safe-agents
Read SETUP.md, the bundled SKILL.md, the security model and the validation record. Use this project to analyze untrusted files while containing REA and the receiving client, limiting shared data and repeating the verification checks.
Inspect my environment and show the concrete setup plan. Reuse existing approvals and matching verified artifacts. Request approval only for work that is not already authorized.
Keep REA, npm and the receiving agent inside separate restricted Docker containers. Preserve network=none, read-only roots, resource limits and the 27-tool MCP allowlist. The agent must have zero host mounts. Share only frozen copies of explicitly selected input bytes with REA.
For live analysis, use my own subscription: a claude setup-token login
for Claude, or a dedicated ChatGPT login made with codex-login for Codex.
Never use API keys, and never reuse my everyday Codex login.
Keep private control files, selected inputs, logins and outputs out of Git and webroots. Preserve existing global client settings. Never attach REA to this privileged host conversation or fall back to host execution.
On macOS inspect Docker Desktop's VM shares, following docs/desktop-hardening.md. Propose a dedicated private staging root and the strict saved-sharing policy; obtain approval before changing global shares or restarting Desktop, since other projects may depend on them. Report saved settings separately from effective VM isolation. Preserve unknown platform results as unknown.
Verify the policy suite, isolation checks and real offline REA analysis without any model login. Report actual results, image IDs, successful REA calls, rejected host tools, cleanup and remaining gaps. Claim native platform coverage only for the host that was actually tested.
Prefer to do it by hand? Follow the step-by-step setup.
The skill guides Codex or Claude Code through setup and verification. The complete Docker workflow has passed on Linux and macOS (POSIX).
Windows support is experimental. Native Windows policy tests and the account-profile check have passed; full Docker Desktop integration remains unverified. See the experimental platform record.
Docker supplies the enforced sandbox. REA and the receiving agent run in separate restricted Linux containers. Both have read-only roots, no external network, no capabilities, no Docker socket, and bounded resources. The agent has zero host mounts; each agent uses its owner's own subscription and no API key. A small trusted host controller checks both containers before startup and relays only the approved protocols.
Every npm, REA and analysis-client command stays in Docker. There is no host execution fallback or global MCP registration.
Use it when an agent must examine files you do not trust: an unknown binary, archive, application package or JavaScript bundle. The protected sandbox contains two risks:
You have an unfamiliar archive, application package or JavaScript bundle and want an agent to explain what is inside. REA provides the analysis tools. That workflow also gives unknown bytes to parsers and dependencies, then returns their results to an agent that may be able to execute commands or modify files. Both processes need an execution boundary.
We created this skill to guide a repeatable deployment that contains REA and its receiving client in separate Docker containers, exposes only selected file copies, restricts the available tools, and verifies the effective setup. The practical value is a prepared workflow with inspectable controls and real analysis tests that can be run again after a change.
Maintaining that evidence is part of the project. Updates to Codex, Claude, Docker or the helpers require fresh verification. Docker containment limits ordinary access to the host; trusted runtime components, selected data and model interpretation still have the limits described in the security model.
REA — Reverse Engineer Anything is an open-source reverse-engineering toolkit, published as rea-agents. Its CLI and MCP server let agents inspect binaries, archives, application packages and JavaScript applications. Some operations require external analysis providers.
REA Safe Agent adds deployment safeguards around REA and the agent receiving its results. REA performs the analysis; the agent interprets the evidence. The upstream project has its own security policy. The pinned dependencies have a dated clean npm audit. These are useful checks; they do not constitute an independent security certification of REA.
flowchart TB User[User: selects files and submits an analysis prompt] Provider[Anthropic or ChatGPT service] subgraph Host["Trusted host: Linux or macOS"] Selected[Selected file copies] Controller[Python controller: fixed protocol broker] Key[Dedicated ChatGPT login for Codex: private file] Snapshot[Private frozen copies: approved hashes] Docker[Local Docker runtime] subgraph AgentBox["Agent container: network none, zero host mounts"] Agent[Codex or Claude Code with its own subscription login] Relay[Local model and MCP relays] end subgraph REABox["REA container: network none"] REA[REA and locked npm dependencies] Input[Read-only input snapshot] end end User -->|Prompt| Controller Selected -->|Hash and validate before startup| Snapshot Snapshot -->|Only host bind mount, read-only| Input Input --> REA Controller -->|Create, inspect, then start both| Docker Docker --> AgentBox Docker --> REABox Controller <-->|Bounded frames over Docker stdin and stdout| Relay Relay <--> Agent Controller <-->|Allowlisted MCP calls and untrusted results| REA Key --> Controller Controller <-->|Fixed HTTPS endpoint, no redirects| Provider
Loading
The trusted Python controller, Docker CLI and Docker runtime run on the host. The REA and agent processes run inside containers. Docker Desktop supplies the Linux environment on macOS.
The agent communicates through local relays inside its own network namespace. The controller accepts only a bounded MCP channel to REA and a model channel to one fixed provider endpoint. It never turns returned text into a host command. Claude Code signs in with your own claude setup-token login; the gateway checks that each request carries exactly it, re-sends it to Anthropic and never writes it to disk. Codex uses a dedicated ChatGPT login that stays with the controller; the contained Codex holds no credential. Request fields, beta features and content types are allowlisted; provider-side MCP connectors, cloud files, remote media and prior cloud conversations are outside this text-analysis profile.
Inputs are recorded as a manifest of paths, sizes and SHA-256 hashes. Before starting either container, the controller validates all approved bytes and creates private temporary copies. REA sees only those copies, mounted read-only; the original directory is never mounted. Added files are excluded and changed bytes stop the run. Links, Windows reparse points, special files and oversized inputs are rejected. Review the selected bytes: path filters cannot determine whether a file contains a secret.
Approve the two pinned image builds, selected files and private control path.
Build with the committed npm lockfiles and lifecycle scripts disabled.
Pin both local image IDs and review the input manifest.
Verify the actual contained client against a localhost dummy model. Require rejection of shell/file-write tools and a successful real REA MCP call.
Launch a fresh contained analysis with an explicit model, prompt and your subscription login. No real model request is needed for installation verification.
Save results as private data; remove both exact containers and temporary input copies. Each analysis starts with fresh client state.
The exact commands are in Step-by-step setup. A changed helper, image, deployment or host OS invalidates verification. Inspection and isolation checks run on every launch. The old direct host MCP entrypoint and host receiving-session CLI are retired.
On macOS, Desktop's VM can have broader host shares than the REA mount. The dedicated staging guide restricts frozen copies to one private directory and lets launches require a matching saved-share policy. This reduces the host surface exposed after a runtime compromise; it does not prove the VM's effective mounts or eliminate escape risks.
Risk Enforced control Remaining trust
Compromised npm/REA package REA container, no runtime network/keys/socket, only frozen approved inputs Selected input bytes can return through MCP; Docker and its kernel remain trusted
Instructions hidden in results Separate agent container, zero host mounts, restricted tools, MCP allowlist, no reverse callbacks Results can mislead the model; moving them into a privileged conversation changes the boundary
Compromised agent process Same Docker restrictions, no host tools/socket, no credential except Claude's own login, fixed model gateway The host broker parses untrusted data; Docker/runtime vulnerabilities remain possible
Resource abuse Memory/swap/CPU/process/tmpfs limits, request/byte/depth/time budgets, bounded transcripts Bounded resource use and authorized model requests can still have a cost
This is a concrete containment improvement for both REA and the agent. A package compromise does not automatically give it ordinary host filesystem or shell access. A Docker/kernel/hypervisor escape could still defeat containment. A separate VM or machine can add another boundary for higher assurance; it is not required by this implementation. See the security model.
REA 6.7.0 advertises 207 tools. This profile exposes 27 of them and enforces the same allowlist on calls.
Native executables (ELF, PE, Mach-O) are analyzed by Ghidra 12.1.4, REA's verified provider. It runs inside the REA container with a pinned JDK 21 and no network. These 16 read-only queries of the open target are exposed: binary_overview, list_segments, inspect_native_load_image, list_strings, search_strings, list_procedures, search_procedures, procedure_info, procedure_pseudo_code, procedure_assembly, procedure_callees, procedure_callers, xrefs, list_names, read_bytes and analyze_function. None accepts a filesystem path.
Android apps (APK) are analyzed by JADX, through jadx-headless-mcp 0.7.1, the bridge REA audited, pinned by SHA-256 and run on the same JDK. The APK is read statically and never installed or run. These 5 queries are exposed: inspect_android_package (package, version, SDK levels, permissions and the decoded manifest), search_android_classes, inspect_android_class, inspect_android_method (decompiled Java, with smali as fallback) and trace_android_references. Each names its APK by path, and the broker accepts only a file in the frozen /input snapshot. Resource decoding (apktool), JEB, devices (adb, Frida) and other providers (IDA, Hopper and others), annotation tools, snaps
正文由 探How 从来源站点 RSS 同步,内容未经改写;遇到排版缺失或需要图片、视频时请以原文为准。