Lab 01 · Reading the evidence
Agent Exposure Lab
8 tool calls. For each: the evidence in the log, the limits of what it proves, and the decision the open rules make.
SIMULATED LOGS · REAL RULESdecided at build time by the source of @nodatachat/protect 3.9.0
- ATTEMPTED
- The action was tried.
- SUCCEEDED
- The tool reported no error.
- EXPOSED
- Evidence that sensitive content reached the agent. Not proof a key is valid.
- UNKNOWN
- Not enough evidence to decide.
- NO EVENT
- Outside every rule. Not recorded, which is not the same as safe.
SCENARIO 01 · CLAUDE CODEA credentials read that failed
The agent went for cloud credentials and got an error. Is that a finding?
~/.claude/projects/…/session.jsonlsimulated log · the format the reader parses
{"type":"assistant","timestamp":"2026-11-20T09:14:02Z","message":{"content":[{"type":"tool_use","id":"toolu_01","name":"Read","input":{"file_path":"/home/dev/.aws/credentials"}}]}}{"type":"user","timestamp":"2026-11-20T09:14:02Z","message":{"content":[{"type":"tool_result","tool_use_id":"toolu_01","is_error":true,"content":"EACCES: permission denied"}]}}EVIDENCERead {"file_path":"/home/dev/.aws/credentials"}The agent asked to read ~/.aws/credentials.
WHAT IT DOES NOT PROVEWhy it asked. The log holds the call, not the reason.
STATE SO FARattemptedyes
succeeded…
what came back…
decision…
THE DECISION · THE PUBLISHED CODE
agent-history.ts ↗274const keyFound = c.exposed + c.samples > 0;
276if (!cats.length && keyFound) cats.push({ category: "provider_key", rule: d.keyRule || "nodata-detector" });
277if (!cats.length) continue;
agent-events.ts ↗77export function exposure(e: { outcome: EventOutcome; keyFound: boolean; gate: GateResult }): Exposure {
78 if (e.keyFound) return "yes";
79 if (e.outcome === "failed" || e.gate === "stopped") return "no";
80 return "unknown";
81}
DECISION…Step through to the decision.
LIMITS OF THIS CONCLUSION- Only what the agent wrote to its own history is seen.
- A failure here says nothing about other tools or other sessions.
- The reason for the attempt is not in the log.
CHECK YOUR OWN HISTORYnpx @nodatachat/protect@3 agent-check --events