pi-redteam

Multi-agent red teaming system for Pi - 10 specialized security agents for vulnerability assessment and penetration testing

Packages

Package details

extensionskillprompt

Install pi-redteam from npm and Pi will load the resources declared by the package manifest.

$ pi install npm:pi-redteam
Package
pi-redteam
Version
1.0.5
Published
May 8, 2026
Downloads
89/mo · 15/wk
Author
jtregunna
License
MIT
Types
extension, skill, prompt
Size
80.8 KB
Dependencies
0 dependencies · 5 peers
Pi manifest JSON
{
  "extensions": [
    "./extensions/*.ts"
  ],
  "skills": [
    "./skills"
  ],
  "prompts": [
    "./prompts"
  ],
  "video": "https://codeberg.org/canoozie/redteam/raw/main/demo.mp4",
  "image": "https://codeberg.org/canoozie/redteam/raw/main/screenshot.png"
}

Security note

Pi packages can execute code and influence agent behavior. Review the source before installing third-party packages.

README

Multi-Agent Red Teaming System

A production-ready red teaming platform for Pi with 10 specialized security agents that coordinate to identify, exploit, and report vulnerabilities.

📦 Installation

From npm (Recommended)

# Install globally
pi install npm:pi-redteam

# Install with specific version
pi install npm:pi-redteam@1.0.2

# Install project-local
pi install -l npm:pi-redteam

# Try without installing
pi -e npm:pi-redteam

From Source

git clone https://codeberg.org/canoozie/redteam.git
cd redteam
npm install && just build
pi install -l file:.

Verify Installation

# Check extension loaded
pi  # Look for: "Red team extension loaded"

# Test commands
/attack status
/skill:redteam

🎯 Overview

This system implements multi-agent red teaming where specialized agents work together:

Advantage Single Agent Multi-Agent Team
Specialization Shallow Deep in each domain
Parallelism Sequential Concurrent
Exploit Chaining Limited Dedicated agent
Cognitive Load Overwhelmed Distributed

🏗️ Architecture

threat-modeler (Orchestrator)
    ↓
    ├─ Attack Agents (parallel)
    │   ├─ input-fuzzer
    │   ├─ injection-specialist
    │   ├─ auth-authorization
    │   ├─ business-logic
    │   ├─ dependency-supply-chain
    │   ├─ network-api
    │   └─ config-auditor
    │
    └─ Coordination Agents
        ├─ exploit-chainer
        └─ report-triage

📋 10 Specialized Agents

Core Attack Agents (5)

Agent Focus
input-fuzzer Malformed inputs, edge cases, encoding tricks
injection-specialist SQLi, NoSQL, command, LDAP, SSTI, prompt injection
auth-authorization Auth bypass, IDOR, privilege escalation, JWT
business-logic Workflow abuse, race conditions, state attacks
dependency-supply-chain CVE scanning, typosquatting, supply chain

Infrastructure Agents (2)

Agent Focus
network-api Exposed endpoints, CORS, rate limiting, info leakage
config-auditor Secrets, cloud misconfigs, IaC security

Coordination Agents (3)

Agent Focus
threat-modeler STRIDE modeling, work packages, orchestration
exploit-chainer Chains vulns into attack paths
report-triage Deduplication, CVSS scoring, reporting

🚀 Quick Start

Start a Red Team Operation

# Initialize with target
/attack start https://target.com

# Check status
/attack status

# Progress through phases
/attack phase recon
/attack phase exploit
/attack phase reporting

# Generate report
/report

Use Security Scripts

# Load skill
/skill:redteam

# Run checks
./scripts/header-analyzer.sh https://target.com
./scripts/dependency-check.sh /path/to/project
./scripts/port-scan.sh 192.168.1.1
./scripts/sstl-check.sh example.com

Team Configurations

# Full team (all 10 agents)
pi --team full-team

# Attack team (7 agents)
pi --team attack-team

# Recon team (3 agents)
pi --team recon-team

# Quick test (3 agents)
pi --team quick-test

📊 Example Output

Vulnerability Finding

{
  "id": "AUTH-001",
  "title": "IDOR in User Profile",
  "severity": "high",
  "cvss_score": 7.4,
  "cwe": "CWE-639",
  "description": "Application fails to verify user owns requested resource",
  "proof_of_concept": "GET /api/users/123/profile with user_456's session",
  "recommendation": [
    "Add object-level authorization check",
    "Use indirect object references"
  ]
}

Exploit Chain

{
  "chain_id": "CHAIN-001",
  "name": "Account Takeover",
  "severity": "critical",
  "cvss_score": 9.0,
  "steps": [
    "1. Enumerate usernames (Info Disclosure)",
    "2. Brute force passwords (No Rate Limiting)",
    "3. Access victim data (IDOR)"
  ],
  "impact": "Complete account compromise"
}

🛡️ Safety & Ethics

Requirements

  • ✅ Written authorization from system owner
  • ✅ Clearly defined scope
  • ✅ Approved testing windows
  • ✅ Emergency contacts identified

Built-in Safeguards

  1. Scope Enforcement: Agents flag out-of-scope actions
  2. Destructive Blocking: Extension blocks dangerous commands
  3. Audit Logging: All actions logged
  4. Environment Detection: Identifies staging vs production

Code of Conduct

DO:

  • ✅ Test only authorized systems
  • ✅ Stay within defined scope
  • ✅ Use staging when possible
  • ✅ Report findings responsibly

DO NOT:

  • ❌ Test without authorization
  • ❌ Exceed scope
  • ❌ Modify production data
  • ❌ Conduct DoS without approval

📁 File Structure

.pi/
├── agents/
│   ├── teams.yaml              # 8 team configurations
│   ├── threat-modeler.md       # Orchestrator
│   ├── input-fuzzer.md         # Input testing
│   ├── injection-specialist.md # Injection attacks
│   ├── auth-authorization.md   # Auth testing
│   ├── business-logic.md       # Logic abuse
│   ├── dependency-supply-chain.md
│   ├── network-api.md          # Network security
│   ├── config-auditor.md       # Config auditing
│   ├── exploit-chainer.md      # Exploit chains
│   └── report-triage.md        # Reporting
└── skills/
    └── redteam/
        ├── SKILL.md
        ├── scripts/            # 4 security scripts
        ├── references/         # OWASP, STRIDE, checklist
        └── assets/             # Security baseline

extensions/
└── redteam.ts                  # Custom extension

🔧 Customization

Add Custom Agents

---
name: custom-agent
description: Your custom agent
tools: read,bash,grep,find,ls
---
Your system prompt...

Then add to .pi/agents/teams.yaml:

custom-team:
  - threat-modeler
  - custom-agent
  - report-triage

Extend the Extension

Add tools to extensions/redteam.ts:

pi.registerTool({
  name: "custom_tool",
  label: "Custom Tool",
  description: "Your tool",
  parameters: Type.Object({ /* schema */ }),
  async execute(toolCallId, params, signal, onUpdate, ctx) {
    return { content: [{ type: "text", text: "Result" }], details: {} };
  }
});

📚 Documentation

  • README.md - This file (installation & usage)
  • Agent files - Detailed agent documentation
  • SKILL.md - Skill usage and scripts
  • CONTRIBUTING.md - Development guide
  • CHANGELOG.md - Version history
  • PUBLISHING.md - npm publishing guide

🤝 Contributing

# Setup development
git clone https://codeberg.org/canoozie/redteam.git
cd redteam
npm install

# Build and test
just build
just test-local

# See all commands
just help

See CONTRIBUTING.md for details.

📦 Package Info

  • Name: pi-redteam
  • Version: 1.0.2
  • License: MIT
  • Size: ~50 KB (gzipped)
  • Keywords: pi-package, security, redteam, pentest

Dependencies

Peer (provided by Pi):

  • @mariozechner/pi-coding-agent
  • @mariozechner/pi-ai
  • @mariozechner/pi-tui
  • @sinclair/typebox

Runtime: None (self-contained)

📚 References

⚠️ Disclaimer

This tool is for authorized security testing only. The authors accept no liability for misuse. Unauthorized testing is illegal.


Built for Pi | Multi-Agent Red Teaming | Production-Ready

For issues: Codeberg Issues