Skip to main content
subagent official · Anthropic

scan-researcher — Claude Code subagent: what it does, how to install

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

Install into Claude Code · Plugin marketplace All methods and platforms ↓
/plugin install claude-security@claude-plugins-official
Open on GitHub

What scan-researcher 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.

What it helps with

  • 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 for the agent

  • 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

How to install scan-researcher

1Plugin marketplace

/plugin install claude-security@claude-plugins-official

2Manually: put the files in place

.claude/agents/scan-researcher.md

For all projects use ~/.claude/agents/. Claude delegates by the description field or an @-mention

Step by step, with commands for each platform: Claude Code subagents: how to create one, call it and keep context clean

Questions about scan-researcher

How to install scan-researcher in Claude Code?

Install the plugin by running /plugin install claude-security@claude-plugins-official. You can also configure it manually by adding .claude/agents/scan-researcher.md.

What does scan-researcher do?

It conducts static security reviews by following untrusted data from entry points to dangerous functions. The subagent assigns specific CWE IDs and calculates severity ratings from LOW to CRITICAL.

Can scan-researcher execute or test repository code?

No, this subagent operates strictly in read-only mode. Compiling code, running automated tests, installing packages, and performing network requests are not allowed.

Similar subagents

All subagents for Security →

From the same set123

The whole set →
scaffolder Builds a single service skeleton from an approved architecture document and specification. Generates domain models, API stubs, and acceptance tests. ★ 44,635repo stars legacy-analyst This subagent traces how older codebases work, maps dependencies, and spots dead code. Use it to investigate what an unfamiliar system actually does. ★ 44,635repo stars business-rules-extractor Reads legacy code and pulls out the business rules inside it — calculations, validations, thresholds — as testable Given/When/Then specs. Useful before a rewrite. ★ 44,635repo stars architecture-critic Subagent that audits architectural designs and modernized code with a skeptical lens. Spots over-engineering, unstated latency risks, and redundant service boundaries. ★ 44,635repo stars scan-redactor This Claude Security subagent replaces secret values in completed scan reports with [REDACTED]. Scan jobs dispatch it automatically; it is not for direct invocation. ★ 44,635repo stars scan-inventory Internal cartographer subagent for the Claude Security scan workflow. It partitions repository directories into discrete review targets and tracks intentionally skipped paths. ★ 44,635repo stars explore Read-only codebase explorer for Claude Code. Locates files, traces execution flows, and finds symbol callers without modifying code. ★ 44,635repo stars claude-security Scans a repository or its changes, then can turn verified findings into targeted patch files. It runs only as the main agent of a session. ★ 44,635repo stars

Project sponsors

Companies that keep this analytics open
Gold sponsor

Impressions, clicks and code copies — open statistics. We keep the numbers public for the same reason NeBlask itself is public. Become a sponsor