red-team-agent-orchestration: Command for Claude Code

.claude/commands/external.md

external is a command for Claude Code from Contoso-State/red-team-agent-orchestration. It costs 40 tokens per session (955 once invoked), scanned A, original, MIT.

A gated command for active security testing of live web addresses and public IP addresses found in Azure. It checks them against the OWASP Top 10, a list of common web application security risks, only after documented human authorization.

In plain words
What is it for?
Use it during an approved security engagement to test Azure-discovered targets after reconnaissance has produced the allowed resource list.
Why use it?
It prevents real traffic from being sent to live systems by accident or without approval. The command stops when the required testing mode, authorization, time window, or resource inventory is missing.

Command for Claude Code

Written for Claude Code: installed under .claude/.

This is Contoso-State/red-team-agent-orchestration's own configuration. It tells Claude Code how to work on red-team-agent-orchestration itself, so it is not a mod to install elsewhere. Copy it as a starting point and replace the rules that are about this project. Everything red-team-agent-orchestration configures →

Reuse

Borrowing it

Nothing to install: this file belongs to Contoso-State/red-team-agent-orchestration. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.

Copy the file
curl -O https://raw.githubusercontent.com/Contoso-State/red-team-agent-orchestration/main/.claude/commands/external.md
Clone the repo
git clone --depth 1 https://github.com/Contoso-State/red-team-agent-orchestration

Made for: Claude Code.

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 external

README.md
[![agentmods](https://agentmods.dev/badge/commands/contoso-state/red-team-agent-orchestration/external.svg)](https://agentmods.dev/commands/contoso-state/red-team-agent-orchestration/external)
Your own site
<a href="https://agentmods.dev/commands/contoso-state/red-team-agent-orchestration/external"><img src="https://agentmods.dev/badge/commands/contoso-state/red-team-agent-orchestration/external.svg" alt="Measured on agentmods" height="20"></a>
Per session 40 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 955 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
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.1 $0.00040 $0.00955
Opus 5 $0.00020 $0.00477
Sonnet 5 $0.00008 $0.00191
Haiku 4.5 $0.00004 $0.00096

Measured 8d ago against content hash 3c344c8cd959, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-08, from the pricing page.

Security

Grade A, and why

external scanned grade A with 0 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 8d 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.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

.claude/commands/external.md · 56 lines

How it starts

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

/external — External Active Testing (EVA)

You are acting as the Orchestrator Agent (agents/orchestrator/system-prompt.md) dispatching the External Vulnerability Agent (EVA) (agents/external-vuln/system-prompt.md). EVA is the only agent that sends real traffic to live endpoints, so this command is hard-gated and OFF by default.

Preconditions (ALL required — otherwise stop and report what's missing)

  • engagement.yamlmode: external-active-testing
  • external_testing.enabled: true
  • external_testing.authorization.attested_by and attestation_id are set (a named human signed off)
  • the current time is within the authorized window, if configured
  • engagements/<session>/inventory/resources.jsonl exists (run /recon first if not)

If any precondition fails, do not dispatch EVA. Tell the user exactly what is missing and stop.

Steps

  1. Verify the gate. Re-read engagement.yaml and confirm every precondition above. If not satisfied, stop.
  2. Build the Azure-derived allowlist. Run node tools/external/build-targets.mjs --db engagements/<session>/engagement.db --session engagements/<session>. This produces engagements/<session>/scope/external-targets.json — the URLs/public IPs that map to in-scope Azure resources. If it is empty, report "no in-scope external targets" and stop. EVA may only ever touch hosts on this allowlist; the redteam-guardrails egress hook enforces it fail-closed.
  3. Dispatch EVA, passing the session path, the configured external_testing.tier, and external_testing.limits. EVA always starts at the safe-active tier and escalates only up to the configured tier:
    • Tier 1 safe-activenode tools/external/safe-prober.mjs --cwd . --out engagements/<session>/findings/raw/external-vuln.jsonl (benign headers/TLS/cookies/CORS/methods).
    • Tier 2 active-dast — scanners only via pwsh tools/external/Invoke-ScopedScan.ps1 -Tool nuclei|httpx|testssl|nikto|whatweb|zap-baseline.
    • Tier 3 exploit-validation — minimal, per-finding proof with explicit approval; never destructive.
  4. Static analysis (opt-in). If external_testing.static_analysis.enabled: true, EVA may pull code read-only from Azure into engagements/<session>/static/ and run pwsh tools/external/Invoke-StaticAnalysis.ps1 -Source engagements/<session>/static/<app> — OFFLINE only (the code is never executed).
  5. Ingest findings into the datastore (node tools/datastore/ingest.mjs --db engagements/<session>/engagement.db --session engagements/<session>).
  6. Report progress: finding counts by check and severity; note the authorization reference and the coverage (which in-scope hosts were tested at which tier).

Read the full file on GitHub · 56 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. 8d ago First seen · 56 lines · 40 tokens per session scan A 3c344c8cd959

Subscribe to this mod's changes

external is a command published in the GitHub repository Contoso-State/red-team-agent-orchestration (6 stars, last pushed 4d ago), licensed MIT. It adds 40 tokens to every session and 955 once invoked, about $0.0002 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.