Scenario

The key in the log was a placeholder

L2WorkingIncident20 minDebuggingDesign review

RolesAgent Systems EngineeringCustomer AI Deployment

Engine
sbx v0.47.0
Model
none; shell commands inside the sandbox
Hardware
one Mac with the microVM runtime

Situation

A security reviewer reads the transcript of a sandboxed agent session. The agent was asked to debug a failing request, so it ran env and printed its environment into the log that the team shares. One line reads M101_RECV_KEY=sbx-cs-<rand>, where the capture masks the random part. The reviewer files a ticket: the agent holds a credential in plain text, the value sits in a shared log, rotate it now.

The platform engineer disagrees and says the value is not a secret. Nobody can show why. You get the printed lines, the record of the secret in the store, four requests sent from inside the same sandbox, and the log kept by the host receiver that those requests reached.

Questions

  1. Is the printed value the credential? What in the store record settles it?
  2. The first three requests returned 204. What did the receiver get in each header, and what does that say about where the swap happens?
  3. The fourth request got no reply and the code 000. Why, and what does that tell you about a placeholder sent to a host it is not bound to?
  4. Which row of the manual's claims ledger does this evidence confirm, and which claim about the proxy stays unchecked?
  5. What should the ticket become?

Commit to a cause after each listing. Write it down before you read the next one.

Evidence

1/5

the two custom lines of the environment inside m101-secret

The value of M101_RECV_KEY is the only one that is not the word proxy-managed.

evidence/what-the-agent-printed.txt
M101_RECV_KEY=sbx-cs-<rand>
MCP_SENTINEL_TOKEN_NAME=proxy-managed

Source: manuals/docker-sandboxes-101/capture/out/10-env-sentinel.txt, lines 4-5

2/5

a custom secret with a chosen placeholder prefix

The third line says what is saved and for which target.

evidence/how-a-placeholder-is-set.txt
$ sbx secret set-custom --host api.example.test --env M101_NAMED --placeholder 'sk-{rand}' --value m101-dummy-1111
Applied secret updates for <n> running sandbox(es)
Saved custom secret placeholder "sk-<rand>" for target "api.example.test" env "M101_NAMED" in scope "(global)"
You may need to update environment variable M101_NAMED inside existing sandboxes to "sk-<rand>" (the placeholder value).
[exit 0]

Source: manuals/docker-sandboxes-101/capture/out/10-placeholder.txt, lines 1-5

3/5

the record of M101_RECV_KEY in sbx secret ls

Compare the placeholder field with the masked secret field.

evidence/the-stored-record.txt
    {
      "scope": "global",
      "targets": [
        "host.docker.internal",
        "localhost"
      ],
      "env": "M101_RECV_KEY",
      "placeholder": "sbx-cs-<rand>",
      "secret": "m101-d**************0000"
    }

Source: manuals/docker-sandboxes-101/capture/out/10-placeholder.txt, lines 20-29

4/5

four requests from the sandbox that carry the placeholder

Three go to the bound host and one to another name; read the status code of each.

evidence/four-requests-from-inside.txt
$ sbx exec m101-secret sh -c 'curl -sS --max-time 10 -H "Authorization: Bearer $M101_RECV_KEY" -H "X-Demo: $M101_RECV_KEY" -o /dev/null -w '"'"'%{http_code}\n'"'"' http://host.docker.internal:18080/from-variable'
204
[exit 0]

$ sbx exec m101-secret sh -c 'curl -sS --max-time 10 -H '"'"'Authorization: Bearer sbx-cs-<rand>'"'"' -H '"'"'X-Demo: sbx-cs-<rand>'"'"' -o /dev/null -w '"'"'%{http_code}\n'"'"' http://host.docker.internal:18080/from-literal'
204
[exit 0]

$ sbx exec m101-secret sh -c 'curl -sS --max-time 10 -H '"'"'Authorization: sbx-cs-<rand>'"'"' -o /dev/null -w '"'"'%{http_code}\n'"'"' http://host.docker.internal:18080/no-scheme'
204
[exit 0]

$ sbx exec m101-secret sh -c 'curl -sS --max-time 10 -H "Authorization: Bearer $M101_RECV_KEY" -o /dev/null -w '"'"'%{http_code}\n'"'"' http://gateway.docker.internal:18080/other-host; echo exit=$?'
curl: (52) Empty reply from server
000
exit=52
[exit 0]

Source: manuals/docker-sandboxes-101/capture/out/10-swap-curl.txt

5/5

the three requests as the receiver on the host saw them

Read the Authorization and X-Demo values, and the Host line.

evidence/what-the-receiver-logged.txt
GET /from-variable HTTP/1.1
Host: localhost:18080
User-Agent: curl/8.18.0
Accept: */*
Authorization: Bearer m101-dummy-receiver-0000
X-Demo: m101-dummy-receiver-0000
Accept-Encoding: gzip

GET /from-literal HTTP/1.1
Host: localhost:18080
User-Agent: curl/8.18.0
Accept: */*
Authorization: Bearer m101-dummy-receiver-0000
X-Demo: m101-dummy-receiver-0000
Accept-Encoding: gzip

GET /no-scheme HTTP/1.1
Host: localhost:18080
User-Agent: curl/8.18.0
Accept: */*
Authorization: m101-dummy-receiver-0000
Accept-Encoding: gzip

Source: manuals/docker-sandboxes-101/capture/out/10-receiver.log

The answer

Show the walkthrough
  1. Read the two printed lines. M101_RECV_KEY holds sbx-cs-<rand>, and the other custom line holds the word proxy-managed. The manual names three sentinel formats in this release: proxy-managed for the provider keys, a token-shaped value for the git host, and sbx-cs-<rand> for custom secrets. The printed value has the custom shape.
  2. Read how a placeholder is made and stored. set-custom saves a placeholder for a target host and an env name, and with --placeholder 'sk-{rand}' the saved value is sk-<rand>. The secret ls record for M101_RECV_KEY has two fields that matter: placeholder is sbx-cs-<rand>, and secret is masked as m101-d**************0000. The environment inside the sandbox holds the first field. The second never left the store.
  3. Follow the placeholder to a bound host. From inside, three requests to host.docker.internal:18080 returned 204: one with the variable inside Bearer, one with the placeholder typed as a literal, and one with the bare value and no scheme. The receiver logged Bearer m101-dummy-receiver-0000 for the first two, the same value in X-Demo, and the bare value as the whole Authorization header for the third. The real value appears only on the host side, wherever the placeholder stood. So the swap is a substring replacement in the forward proxy, and it happens for a host that the secret is bound to.
  4. Follow it to another name. The fourth request went to gateway.docker.internal:18080. That name is in NO_PROXY, so curl skipped the forward proxy and opened a direct connection. The transparent proxy blocked it: an empty reply, the code 000 and exit 52. Nothing was swapped. A placeholder sent anywhere else stays a placeholder.
  5. Place the result in the ledger. The manual's claims table marks "credential values never enter the VM" as confirmed by these two files, and the header swap for a bound host as confirmed on both sides. It marks TLS interception as not checked, because no certificate chain was read, and the question of data leaving through an allowed host as disputed, with no capture. Say exactly that much.
Show the resolution

The value in the log is the placeholder of a custom secret, not the credential. The credential stays in the host store. The forward proxy puts it into requests to the two bound hosts only, and the receiver log shows that this is where the real value first exists. A request to any other name carries the placeholder or is blocked. The ticket closes as no leak, with two notes: the placeholder tells a reader that a bound secret exists for those hosts, and the sandbox could reach localhost:18080 only because a policy rule allowed it, so the receiver was a host the operator chose.

Two checks go into the runbook. For a suspected leak from a sandbox, compare the printed value with the placeholder field of sbx secret ls --json before anything is rotated. For a new custom secret, bind it to exact hosts and send one request to a receiver you control, so the swap is proven once, as the capture did.

Show the wrong turns
  • “Rotate the key and purge the log.”

    Nothing in the log is the key. A rotation costs a change on the host and on the receiver and fixes nothing, and the next transcript shows the same placeholder.

  • “The agent read the host keychain.”

    The guest has no path to the store. The swap happens in the proxy on the host, after the request leaves the VM.

  • “Pass the real key with -e so the agent can call the API itself.”

    A plain variable is not a secret, and the sentinel exists so that the value never enters the VM. The store and the binding are the supported path.

  • “The proxy touches only the Authorization header, so a value in another header is safe.”

    The receiver shows the value in X-Demo too. A custom secret is replaced wherever the placeholder appears in a request to a bound host, so bind it to exact hosts.

Show the general rule

A secret shown by a process inside a boundary is a secret only if the same bytes work outside the boundary. Before you call a leak, find where the value is stored, compare the printed bytes with the stored placeholder, and send the printed bytes to a receiver you control from an intended and from an unintended destination. Then write down what the test proved and what it did not, with the file names.

Taught in

The manual's secret page records the placeholder, the swap and the receiver, the proxy page explains the two proxy paths, and the claims ledger says which claim these files confirm.