# Find out what your AI agents actually did.

> Open-source AI agent security: an audit trail of what Claude Code, Codex and twenty-eight more agents ran, secrets leaked to disk, and what tokens allow.

Canonical: https://ranwhat.com/

Claude Code has your shell, your keys and your repo. ranwhat reads what it ran, surfaces the handful of actions worth knowing about, and does it on your own machine.

```
$ uvx ranwhat check
```

[Install](https://ranwhat.com/install)

```
$ ranwhat watch1 transcript · 30 days
2 critical  1 high

* Credential material accessed   2026-09-30 18:13:00  Bash
    cat ~/.ssh/id_rsa
    -> The agent read a file whose only purpose is to hold
       secrets. Whatever it read is now in a model context
       you do not control.

* Bulk or recursive deletion   2026-09-30 15:13:00  Bash
    rm -rf .frames
    -> Recursive deletion. Recoverable only if something
       else was backing it up.

* Package or release published   2026-09-30 14:58:00  Bash
    npm publish --access public
    -> Something was pushed to a registry other people may
       install from. Supply-chain reach, and usually
       irreversible.

------------------------------------------------------------
Read locally. Nothing was transmitted.
```

## What it did, what leaked, what it may do next.

ranwhat is an open-source command-line tool for [AI coding agent security](https://ranwhat.com/guides/ai-coding-agent-security). It reads what Claude Code and twenty-nine other coding agents have already written to disk: what they ran, and which credentials leaked into their history. scan adds what their tokens still allow. Only clean changes your files, and only when you ask it to.

### ranwhat check

Runs watch and clean in one read-only pass: what your agents ran, and what they left on disk. It never changes anything.

[Start with ranwhat check →](https://ranwhat.com/install)

### ranwhat watch

Reads what your agents already ran and raises the handful of irreversible actions worth knowing about.

[What ranwhat watch finds →](https://ranwhat.com/watch)

### ranwhat clean

Finds credentials sitting in plaintext in your agents' transcripts, tells you what to rotate, and masks them when you ask.

[How ranwhat clean handles secrets →](https://ranwhat.com/clean)

### ranwhat scan

Scores the authority your agent's credentials carry, and which permissions it has never once used.

[How ranwhat scan scores authority →](https://ranwhat.com/scan)

## Thirty seconds, no signup.

Python 3.9 or newer. No dependencies. Point it at your own machine and see what the last month looked like.

```
$ uvx ranwhat check
```

Prefer it on your path? `pipx install ranwhat` or `pip install ranwhat`.
Nothing to build locally.

[Install options, and what it writes to disk →](https://ranwhat.com/install)

## AI agent security, in plain terms.

### What is AI agent security, and how is it different from LLM security?

LLM security is about the model and what it says: jailbreaks, harmful output, leaked training data. AI agent security is about what an agent does once it has tools and credentials: the commands it runs, the files it reads, the tokens it uses. Prompt injection is how an attacker steers it. ranwhat covers the agent side, on your own machine and after the fact. It does not detect prompt injection, and blocks nothing while the agent works unless you install its Claude Code hook. The [AI coding agent security checklist](https://ranwhat.com/guides/ai-coding-agent-security) covers the parts it does not.

### Can an AI coding agent leak my API keys?

Yes, in two ways. It can write a key into code it commits, which is what repository secret scanners look for. And when a command it runs prints a key, through `cat .env`, `env` or a config file, the output is saved in its transcript in plaintext and sent to the model as context. Repository scanners do not look there. [ranwhat clean](https://ranwhat.com/clean) finds those copies and tells you what to rotate.

### What should I do if an AI agent exposed my API key?

Rotate it at the provider first: create the replacement, revoke the old key, then check the provider's logs for use you do not recognise. Deleting or masking the transcript does not undo the leak, because the value has already been on disk and in a model context. Masking only stops those copies leaking again. `ranwhat clean` leads with what to rotate and where, and masks the copies on disk when you ask.

### How do I audit what an AI agent did on my machine?

Read back the history it already wrote. Most coding agents record each tool call they make, with its output, and that record is an audit trail you can search. [ranwhat watch](https://ranwhat.com/watch) runs sixteen rules over it: credential reads, `rm -rf`, force pushes, `npm publish` and more. History expires, Claude Code's after 30 days by default, so for a record from now on add a hook or OpenTelemetry, as the [audit log guide](https://ranwhat.com/guides/claude-code-audit-log) shows.

### What does least privilege mean for an AI agent's tokens?

The agent gets its own token, with only the scopes its task needs and an expiry date, rather than your own admin key. A permission prompt decides which command runs; the token decides what that command can do once it reaches GitHub, Stripe or AWS. [ranwhat scan](https://ranwhat.com/scan) scores what an agent's tokens allow, read-only, from a catalogue of 204 scopes across twelve providers, and `--pull-usage` shows which grants were never used, where the provider keeps a record.

### What does OPSEC mean for a developer who uses AI agents?

OPSEC, operations security, is keeping information an adversary could use out of their reach. On a developer's laptop that information is mostly credentials: shell history, `.env` files, keys in `~/.aws` and `~/.ssh`, and now agent transcripts, which keep tool output in plaintext in your home folder. Anything that can read your files can read those, malware included. In practice: know what is there, rotate what leaked, and [keep secrets out of the agent's reach](https://ranwhat.com/guides/developer-opsec).

### When is the free version enough, and when would I pay?

If you run agents on one machine, the free version is the whole tool: every rule, every source and every report, with nothing held back. Plus is for what needs a server, such as a catalogue kept current as providers add scopes, CI tokens, invited teammates and a view across machines today, and longer retention and alerts as they are built. It is one flat price per organisation, whether you run two agents or two hundred. See the [side-by-side comparison](https://ranwhat.com/pricing#compare).

[More about what ranwhat reads, sends and changes →](https://ranwhat.com/faq)

## Guides for the agent on your machine.

The OPSEC of running an AI agent on your own machine: where Claude Code keeps what it saw, how to keep your secrets out of it, and what to do when something has already gone wrong. Each one is checked against the vendors' documentation and lists its sources.

- [AI coding agent security checklistfourteen steps, in order](https://ranwhat.com/guides/ai-coding-agent-security)
- [Where Claude Code keeps your history~/.claude/projects, 30 days by default](https://ranwhat.com/guides/claude-code-history)
- [How to stop Claude Code reading your .env filedeny rules and the sandbox](https://ranwhat.com/guides/claude-code-env-secrets)
- [Claude Code audit logevery tool call it already made](https://ranwhat.com/guides/claude-code-audit-log)
- [Claude Code deleted my fileswhat rewind cannot restore](https://ranwhat.com/guides/claude-code-deleted-files)
- [AI agent token scopesleast privilege, provider by provider](https://ranwhat.com/guides/ai-agent-token-scopes)
- [Developer OPSECwhat your laptop and your agents give away](https://ranwhat.com/guides/developer-opsec)
- [Claude Code hooks for securityblock rm -rf, force pushes and .env reads](https://ranwhat.com/guides/claude-code-hooks-security)
- [Prompt injection in coding agentshow text becomes a command](https://ranwhat.com/guides/prompt-injection-coding-agents)
- [MCP server securitywhat a server can reach](https://ranwhat.com/guides/mcp-server-security-coding-agents)
- [Rotate a leaked API keyprovider by provider](https://ranwhat.com/guides/rotate-leaked-api-key-ai-agent)
- [A secure-by-default setupthe settings that limit an agent](https://ranwhat.com/guides/secure-by-default-ai-coding-agent-setup)
- [Checking AI-written codechecks that do not ask the model](https://ranwhat.com/guides/check-ai-agent-code-is-secure)
- [Best AI agent security toolssix compared on five checks](https://ranwhat.com/guides/best-ai-coding-agent-security-tools)

[All guides →](https://ranwhat.com/guides)

## Built in the open.

New sources and rules ship regularly, and the [commit history](https://github.com/MatijaMiki/ranwhat/commits/main) carries the reasoning, including the things the tool got wrong and what changed because of it.

- [GitHubwatch the repo for releases](https://github.com/MatijaMiki/ranwhat)
- [X@ranwhatcom](https://x.com/ranwhatcom)
- [Updatesevery release, by email or RSS](https://ranwhat.com/updates)
- [Issuestell us what it got wrong](https://github.com/MatijaMiki/ranwhat/issues)

One email per release. Nothing is sent until you confirm.

## Where else it is listed.

Directories and launch sites that list ranwhat. Each badge is an image served by or for its directory, so your browser asks that host for it, and the [privacy page](https://ranwhat.com/privacy#badges) names every host.

- [Featured on Launch](https://tools.launchllama.co/products/ranwhat?utm_source=badge&utm_medium=referral)
- [ranwhat badge](https://www.saashub.com/ranwhat?utm_source=badge&utm_campaign=badge&utm_content=ranwhat&badge_variant=color&badge_kind=approved)
- [ranwhat - Featured on ScrollLaunch](https://www.scrolllaunch.com/products/ranwhat?ref=badge)
- [Launched on StartupBase](https://startupbase.io/products/ranwhat?utm_source=startupbase&utm_medium=badge&utm_campaign=launch-badge-light)
- [Featured on Noonlaunch](https://noonlaunch.com/product/ranwhat)
- [Featured on Twelve Tools](https://twelve.tools)
- [Listed on Cyber Vendor Guide](https://www.cybervendorguide.com/tools/ranwhat)
- [Launched on MarketingDB](https://marketingdb.live)
- [Featured on Maidensail](https://maidensail.com/startup/ranwhat)
