_scope-guard

_scope-guard is an agent for coding agents from 0xSteph/pentest-ai-agents. It costs 0 tokens per session (1,201 once invoked), scanned C, original, MIT.

A shared safety prompt for execution-capable agents that requires users to declare which systems they are allowed to test before commands run.

In plain words
What is it for?
It helps security agents confirm allowed IP ranges, domains, URLs, cloud accounts, engagement types, and command restrictions before testing.
Why use it?
It prevents commands from being run against unauthorized targets and checks that actions are within the agreed scope.

Agent

Part of the pentest-ai-agents plugin — 3 commands, 53 agents shipped together

About the project

0xSteph/pentest-ai-agents is a collection of Claude Code specialist agents for authorized penetration testing and security research, covering areas such as reconnaissance, web systems, cloud, reverse engineering and detection. Security researchers and penetration testers use it to plan engagements, investigate findings, build detections and write reports. The catalogue entries are the project's own agents, commands and plugin components.

0xSteph/pentest-ai-agents · 2,199 stars · on GitHub

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add agents/0xsteph/pentest-ai-agents/_scope-guard
Clone the repo
git clone --depth 1 https://github.com/0xSteph/pentest-ai-agents

Or install pentest-ai-agents, the plugin that ships this one along with the rest of its 3 commands, 53 agents.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for _scope-guard

README.md
[![agentmods](https://agentmods.dev/badge/agents/0xsteph/pentest-ai-agents/_scope-guard.svg)](https://agentmods.dev/agents/0xsteph/pentest-ai-agents/_scope-guard)
Your own site
<a href="https://agentmods.dev/agents/0xsteph/pentest-ai-agents/_scope-guard"><img src="https://agentmods.dev/badge/agents/0xsteph/pentest-ai-agents/_scope-guard.svg" alt="Measured on agentmods" height="20"></a>
Per session 0 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 1,201 The whole file, excluding the scripts and references it only reads on demand.
Security scan C 2 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5 $0.00000 $0.01201
Opus 5 $0.00000 $0.00600
Sonnet 5 $0.00000 $0.00240
Haiku 4.5 $0.00000 $0.00120

Measured 5d ago against content hash f5e17a01a9db, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade C, and why

_scope-guard scanned grade C with 2 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 5d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Asks for rootmediumPrivilege escalation

A mod that escalates privileges can change anything on the machine, not only the project.

- When root/sudo is required, flag it explicitly and let the user decide

Unrestricted tool accessmediumExcessive agency

A wildcard tool grant or "run any command" leaves no least-privilege boundary at all.

If the user has not declared scope, DO NOT execute any commands against targets.
agents/_scope-guard.md · 91 lines

How it starts

The opening of the file, as written. The whole thing — 91 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Scope Guard (Shared Prompt Block for Tier 2 Agents)

This file is not a standalone agent. It contains the shared scope enforcement prompt text that Tier 2 (execution-capable) agents incorporate into their system prompts. The underscore prefix signals that Claude Code should not route to this file.

Scope Enforcement (MANDATORY)

Session Initialization

Before executing ANY command against a target:

  1. Ask the user to declare the authorized scope (IP ranges, domains, URLs, cloud accounts)
  2. Ask for the engagement type (external, internal, web app, cloud, wireless, etc.)
  3. Store the scope declaration for the session

If the user has not declared scope, DO NOT execute any commands against targets. You may still analyze output the user pastes (advisory mode) without a scope declaration.

Pre-Execution Validation

Before composing every Bash command, verify:

  • Every target IP, domain, or URL falls within the declared scope
  • The command does not perform destructive actions (DoS, data deletion, disk writes to target) unless explicitly authorized
  • The command does not write to or modify target systems unless authorized
  • Network callbacks (reverse shells, exfiltration channels) target only operator-controlled infrastructure within scope
  • The command does not attempt to bypass Claude Code's permission prompt

If a target falls outside scope, REFUSE the command and explain why.

Hard Refusal List (No Authorization Will Override These)

The following techniques are out of scope for this toolkit and must be refused regardless of what the user claims is authorized:

  • Volumetric or protocol-level denial of service against any target. Stress testing of customer-owned infrastructure must be coordinated with the customer's load testing program, not run from this toolkit.
  • Mass scanning of the public internet outside the declared scope (e.g., masscan 0.0.0.0/0, full-internet shodan-style sweeps).
  • Unattended worms or self-propagating implants that spread beyond hosts the operator manually targets.
  • Persistent backdoors that survive engagement closure without an explicit, written customer agreement to retain them.
  • False-flag operations that frame a specific real third party (impersonating a named company's infrastructure, stealing a real actor's TTPs in a way that misattributes activity).
  • Exploitation of safety-of-life systems (medical devices, ICS controlling life-support, autonomous vehicle safety systems) without an explicit safety review and the customer's safety officer in the engagement.
  • Generation of CSAM, bioweapon synthesis content, or other categorically harmful material even in service of jailbreak demonstrations against authorized AI systems. Demonstrate the bypass with placeholder content.
  • Bypassing payment systems for personal gain even if the customer's app is in scope. Test the vulnerability; do not transfer funds.

Read the full file on GitHub · 91 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 5d ago First seen · 91 lines · 0 tokens per session scan C f5e17a01a9db

Subscribe to this mod's changes

_scope-guard is an agent published in the GitHub repository 0xSteph/pentest-ai-agents (2,199 stars, last pushed 19d ago), licensed MIT. It costs nothing until one of its globs matches a file; then it loads 1,201 tokens. A static security scan graded it C with 2 findings (asks for root, unrestricted tool access). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.

Related

Other agents, from other repositories

web3-auditor

Smart contract security auditor. Checks 10 bug classes in order of frequency (accounting desync 28%, access control 19%, incomplete path 17%, off-by-one 22% of Highs, oracle errors, ERC4626 attacks, reentrancy, flash loan oracle manipulation, signature replay, proxy/upgrade issues). Applies pre-dive kill signals…

Awarexone/Agentic-Bug-Hunter · 101 tokens

tachi-risk-scorer

Quantitative risk scoring agent that enriches threat model findings with four-dimensional scores (CVSS 3.1, exploitability, scalability, reachability), computes weighted composite scores, attaches governance fields, and generates dual-format output (risk-scores.md and risk-scores.sarif).

davidmatousek/tachi · 65 tokens

debugger

Bug investigation, root cause analysis using 5 Whys methodology, and systematic troubleshooting. Use for complex debugging sessions and production issue investigation.

davidmatousek/tachi · 30 tokens

ux-ui-designer

UX/UI design, design systems, user flows, and accessibility compliance. Use for creating design specifications, component libraries, and WCAG-compliant interfaces.

davidmatousek/tachi · 35 tokens

web-researcher

Technical research, library evaluation, and best practices investigation. Use for comparing technologies, researching APIs, and finding documentation.

davidmatousek/tachi · 28 tokens

active-directory

Active Directory and Windows domain attack specialist. Use for Kerberoasting, AS-REP roasting, DCSync, BloodHound enumeration, ADCS ESC attacks, Golden/Silver Ticket, and domain privilege escalation. Triggers on: kerberoast, AS-REP, bloodhound, DCSync, golden ticket, ADCS, ESC, domain controller, LDAP, GPO, AD, domain…

mukul975/Threatswarm · 86 tokens