High Risk →

devloop_record_sandbox

Record mocks for V1 repo-mode API tests using the V1-native CLI command keploy sandbox local record. Runs the dev's app under the keploy eBPF agent, drives the V1 chained-CRUD tests from keploy/api-tests/<resource>/test.yaml, captures every outbound call (DB queries, Redis ops, downstream HTTP) a...

Risk signalsBulk/mass operation — affects multiple targets

Part of the Keploy server.

devloop_record_sandbox can trigger actions in Keploy, with no limits today. PolicyLayer puts allow, deny, and rate-limit rules on every call. Live in minutes.

SECURE KEPLOY →

Free to start. No card required.

AI agents invoke devloop_record_sandbox to trigger processes or run actions in Keploy. Execute operations can have side effects beyond the immediate call -- triggering builds, sending notifications, or starting workflows. Rate limits and argument validation are essential to prevent runaway execution.

devloop_record_sandbox can trigger processes with real-world consequences. An uncontrolled agent might start dozens of builds, send mass notifications, or kick off expensive compute jobs. PolicyLayer enforces rate limits and validates arguments to keep execution within safe bounds.

Execute tools trigger processes. Rate-limit and validate arguments to prevent unintended side effects.

policy.json
{
  "version": "1",
  "default": "deny",
  "tools": {
    "devloop_record_sandbox": {
      "limits": [
        {
          "counter": "devloop_record_sandbox_rate",
          "window": "minute",
          "max": 10,
          "scope": "grant"
        }
      ]
    }
  }
}

See the full Keploy policy for all 103 tools.

Get this rule live on your own Keploy server in minutes. PolicyLayer enforces it on every call, before it runs.

ENFORCE ON MY KEPLOY →

View all 103 tools →

These attack patterns abuse exactly the kind of access devloop_record_sandbox gives an agent. Each links to the full case and the policy that stops it:

Browse the full MCP Attack Database →

Every attack above starts with a tool call. PolicyLayer checks each one against your policy first, so devloop_record_sandbox only ever does what you allow.

SECURE KEPLOY →

Other execute tools across the catalogue. The same approach applies to each: rate-limit and validate the arguments.

What does the devloop_record_sandbox tool do? +

Record mocks for V1 repo-mode API tests using the V1-native CLI command keploy sandbox local record. Runs the dev's app under the keploy eBPF agent, drives the V1 chained-CRUD tests from keploy/api-tests/<resource>/test.yaml, captures every outbound call (DB queries, Redis ops, downstream HTTP) as mocks, and lays them out at <app_dir>/keploy/<suite-name>/{tests/, mocks.yaml, config.yaml} in the standard OSS test-set tree. On success, mocks upload to the Keploy canonical pool by content hash; the hash lands in config.yaml so a teammate's later replay fetches the same bytes. CRITICAL — DO NOT CONFUSE WITH keploy record sandbox: * keploy sandbox local record (V1, repo-mode) ← this is what the playbook below uses * keploy record sandbox (legacy, cloud-mode) ← DO NOT call this for V1 The two are entirely different commands. Cloud-mode requires server-side suites (queried via --suite-ids) — V1 repo-mode reads tests from the local filesystem and never registers them in the cloud. If the dev is in repo storage mode (verify via devloop_resolve_storage's source=persisted, mode=repo), V1 is the ONLY correct sandbox path. STRICT — TIME-FREEZING DOES NOT APPLY TO RECORD. Recording MUST use the dev's regular (prod) Dockerfile or native binary. NEVER spawn the app via Dockerfile.keploy / "-f docker-compose.keploy.yml" / "-tags=faketime" build during record. The faketime binary writes wrong timestamps into captured mocks (it reads time from the offset file, not the wall clock) and the entire capture becomes corrupt — recovery requires re-recording from scratch with the prod binary. If a previous replay failed with expired-JWT and the dev wants to "fix" it, the fix is to re-RUN the replay with --freezeTime, NOT to re-record. The recorded mocks captured against the prod binary are exactly what replay's clock-rewind is designed to validate; touching the record path defeats the whole mechanism. ONLY call this with an explicit dev opt-in. The valid triggers: * Dev directly asks ("capture mocks", "sandbox record", "rerecord the users mocks"). * Post-resource menu (Step 5 of devloop_generate_resource_flow) — dev picks "Capture mocks so CI runs in seconds". * get_session_report shows mock_mismatch_dominant=true AND the dev says yes to your "rerecord?" prompt. Pre-conditions: * Dev's app must NOT already be running (keploy spawns its own copy of the app under the agent's eBPF hooks via the -c command). If a server is up at the target port, KILL IT first or the agent's network capture won't see the traffic. * Real downstream deps (MySQL, Redis, Kafka, etc.) MUST be running — the capture proxies through to them on first contact so the recorded mocks contain real responses. * The test YAML must exist at <app_dir>/keploy/api-tests/<resource>/test.yaml. Returns a playbook for keploy sandbox local record with the V1 flag surface: --test-dir, --app-url, -c (spawn command), --container-name (docker-compose only), --skip-mock-upload (offline), --skip-report-upload (offline). Mocks land per-suite at keploy/<suite-name>/. NDJSON progress at --progress-file for the standard tail-til-done loop.. It is categorised as a Execute tool in the Keploy MCP Server, which means it can trigger actions or run processes. Use rate limits and argument validation.

How do I enforce a policy on devloop_record_sandbox? +

Register the Keploy MCP server in PolicyLayer and add a rule for devloop_record_sandbox: allow, deny, rate-limit, or require approval. Point your MCP client at the PolicyLayer proxy URL and the rule is enforced on every call, before it reaches Keploy. Nothing to install.

What risk level is devloop_record_sandbox? +

devloop_record_sandbox is a Execute tool with high risk. Execute tools should be rate-limited and have argument validation enabled.

Can I rate-limit devloop_record_sandbox? +

Yes. Add a rate_limit block to the devloop_record_sandbox rule in your PolicyLayer policy. For example, setting max: 10 and window: 60 limits the tool to 10 calls per minute. Rate limits are tracked per agent session and reset automatically.

How do I block devloop_record_sandbox completely? +

Set action: deny in the PolicyLayer policy for devloop_record_sandbox. The AI agent will receive a policy violation error and cannot call the tool. You can also include a reason field to explain why the tool is blocked.

What MCP server provides devloop_record_sandbox? +

devloop_record_sandbox is provided by the Keploy MCP server (https://api.keploy.io/client/v1/mcp). PolicyLayer sits as a proxy in front of this server to enforce policies before tool calls reach the server.

Enforce policy on every Keploy tool call.

Deterministic rules across all 103 Keploy tools. Per-identity grants. Full audit log. Live in minutes. Nothing to install.

Free to start. No card required.

4,600+ MCP servers and 31,000+ tools scanned and risk-classified.

// GET IN TOUCH

Have a question or want to learn more? Send us a message.

Message sent.

We'll get back to you soon.