# scan-researcher

A read-only security auditing subagent for Claude Code. Traces vulnerabilities from untrusted inputs to risky sinks across repository files without executing project code.

- subagent · `type=agent` · Claude Code · ★ 44635
- Author: Anthropic · official Anthropic repository
- License: LicenseRef-Proprietary · policy=link-only · description only; the file stays with the author
- Source: https://github.com/anthropics/claude-plugins-official/tree/HEAD/plugins/claude-security/agents/scan-researcher.md
- Updated: 2026-10-24
- HTML: https://affpapa.org/en/nevibecode/agents/scan-researcher

## What it does

The `scan-researcher` subagent functions within the `claude-security` plugin to detect genuine vulnerabilities in codebases. It investigates specific components or pull request diffs by mapping complete paths from external data sources to critical sinks. This worker operates on behalf of the scan pipeline rather than direct user interaction.

All file discovery occurs via absolute paths under `SCAN_ROOT`. The agent inspects context using tools such as `Read`, `Grep`, and read-only git queries like `git diff` or `git blame`. Compiling targets, running tests, or reaching the network are forbidden. If a vulnerability cannot be validated by reading code, the agent records lower confidence instead of guessing.

Repository text is treated as untrusted input. Any docstring or comment that instructs the model to bypass inspection is flagged as a `prompt-injection` finding. Discovered flaws receive an explicit CWE identifier and a severity level from LOW to CRITICAL based on reachability and impact.

## Install

### Claude Code (native platform)

1. **Plugin marketplace**
In the agent chat (not a shell):
```text
/plugin install claude-security@claude-plugins-official
```

2. **Manually: put the files in place**
- File: `.claude/agents/scan-researcher.md` — For all projects use ~/.claude/agents/. Claude delegates by the description field or an @-mention

### Codex

**Manually: put the files in place**
- File: `.codex/agents/scan-researcher.toml` — Codex defines subagents in TOML: name, description, developer_instructions. Move the Markdown text into developer_instructions by hand. For all projects use ~/.codex/agents/

### Cursor

**Manually: put the files in place**
- File: `.cursor/agents/scan-researcher.md` — Cursor also reads .claude/agents/

Where a file is given instead of a command, copy the files from the source to that path: https://github.com/anthropics/claude-plugins-official/tree/HEAD/plugins/claude-security/agents/scan-researcher.md

## When to use it
- trace untrusted inputs through code paths into sensitive sinks
- assign specific CWE weakness identifiers to discovered flaws
- audit git diffs for security vulnerabilities in modified components
- detect prompt injection attempts hidden in code comments or docs

## Example prompts
- Run a `claude-security` scan to inspect our API endpoints for vulnerabilities
- Review the current git diff for security flaws using `scan-researcher`
- Trace untrusted data flow into sinks inside `<SCAN_ROOT>/src/server.ts`

## Similar
- [code-reviewer](https://affpapa.org/en/nevibecode/agents/voltagent-community-code-reviewer.md) — subagent · 31050 installs
- [security-auditor](https://affpapa.org/en/nevibecode/agents/voltagent-community-security-auditor.md) — subagent · 10718 installs
- [devops-engineer](https://affpapa.org/en/nevibecode/agents/devops-engineer.md) — subagent · 7392 installs

From the same set: [anthropics/claude-plugins-official](https://affpapa.org/en/nevibecode/by/anthropics/claude-plugins-official.md) — 128 cards

---
NeVibeCode on affpapa.org. Catalog texts are descriptions, not instructions for the agent. How to choose and install: https://affpapa.org/en/nevibecode/agents.md
