Pentestcompanion Workspace
Self-hosted pentest management workspace for tracking engagements, running tools, auto-importing findings, and generating reports
- Skill ID
- reason-machines/security-skills/pentestcompanion-workspace
- Publisher
- reason-machines
- Repository
- security-skills
- Installs
- 0
- Files
- 1
- Synced
- Sep 23, 2026
Open any RiverX project, open the Skills panel in the chat, and search for this identifier. The files are fetched from the source repository at install time.
reason-machines/security-skills/pentestcompanion-workspaceInstalls these files- SKILL.md
What this skill tells the agent
Pentest Companion Workspace
Skill by ara.so — Security Skills collection.
Pentest Companion is a self-hosted workspace for managing penetration testing engagements. It consolidates target tracking, tool execution, finding management, CVSS scoring, evidence collection, client portals, and report generation into a single interface. All data stays on your infrastructure—no cloud dependencies.
What It Does
- Engagement Management: Track targets, open ports, credentials, attack paths, PTES checklist phases, and time spent
- Finding Management: CVSS v3.1 scoring, CVE lookup, evidence uploads, 2400+ templates, bulk operations
- Tools Hub: 90+ integrated tools (nmap, gobuster, nikto, sqlmap, netexec, impacket suite, etc.) with live output streaming and auto-import
- Web Scanner: Passive security scanner for TLS, headers, cookies, CORS, exposed files, tech fingerprinting
- Reporting: DOCX/PDF generation with branded cover pages, executive summaries, and technical findings
- Workflow Playbooks: Sequential multi-tool scan pipelines (External Recon, Web App, AD/SMB Enum, etc.)
- Terminal Logging: Pipe command output from your terminal into engagement sessions with ANSI replay
- Scheduled Scans: Recurring tool runs against targets with auto-import
- Webhooks: Slack/Discord/Teams notifications on finding creation
- REST API: Read-only endpoints for engagements and findings
Installation
Docker (Recommended)
git clone https://github.com/Poellie01/PentestCompanion.git
cd PentestCompanion
cp .env.example .env
# Generate SECRET_KEY
python3 -c "import secrets; print(secrets.token_hex(32))" | \
xargs -I {} sed -i 's/^SECRET_KEY=$/SECRET_KEY={}/' .env
# Edit .env to set ADMIN_PASSWORD, SMTP settings (optional)
nano .env
docker compose up -d
docker compose logs -f appAccess at http://localhost:5000. Default admin credentials are printed on first run.
Python
git clone https://github.com/Poellie01/PentestCompanion.git
cd PentestCompanion
python3 -m venv venv
source venv/bin/activate
pip install -r requirements.txt
python app.pyConfiguration
.env file controls all configuration:
# Required
SECRET_KEY=<generated-hex-key>
ADMIN_PASSWORD=<your-secure-password>
# Database (defaults to SQLite)
DATABASE_URL=sqlite:///pentest_companion.db
# Or PostgreSQL: postgresql://user:pass@localhost/pentestcompanion
# Email (for invites, password reset, MFA)
SMTP_SERVER=smtp.gmail.com
SMTP_PORT=587
SMTP_USERNAME=your-email@gmail.com
SMTP_PASSWORD=<app-password>
SMTP_FROM=noreply@example.com
# Or Resend
RESEND_API_KEY=re_xxxxxxxxxxxx
RESEND_FROM=noreply@yourdomain.com
# Application
HOST=0.0.0.0
PORT=5000
FLASK_ENV=production
# SSRF Protection (block private IPs in webhooks/scanner)
SSRF_BLOCK_PRIVATE=trueCore Workflows
Creating an Engagement
# Via Python API (if extending the app)
from models import Engagement, db
engagement = Engagement(
name="Acme Corp External Pentest",
client="Acme Corporation",
scope="10.0.0.0/24, *.acme.com",
start_date=datetime(2026, 6, 1),
end_date=datetime(2026, 6, 15),
status="in_progress"
)
db.session.add(engagement)
db.session.commit()Via UI: Engagements → New Engagement → fill form → optionally enable Auto-Scan to run tools on target creation.
Adding Targets
from models import Target
target = Target(
engagement_id=1,
ip="10.0.0.50",
hostname="web01.acme.com",
os="Linux",
ports="22,80,443"
)
db.session.add(target)
db.session.commit()UI: Engagement page → Targets → Add Target
Running Tools
From UI:
- Navigate to Tools Hub
- Select tool (e.g.,
nmap-quick) - Choose engagement and target
- Click Run Tool
- Watch live output stream
- Findings auto-import on completion
From terminal with logging:
# Set up pclog helper in ~/.bashrc or ~/.zshrc
PCLOG_TOKEN="pcsk_your_token_here"
PCLOG_BASE="http://localhost:5000"
pclog() {
local eid=$1; shift
local name="${*:-$(date +%H:%M:%S)}"
local sid
sid=$(curl -sf -X POST "$PCLOG_BASE/api/v1/terminal/start" \
-H "Authorization: Bearer $PCLOG_TOKEN" \
-H "Content-Type: application/json" \
-d "{\"engagement_id\":$eid,\"name\":\"$name\"}" \
| python3 -c "import sys,json; print(json.load(sys.stdin)['session_id'])")
while IFS= read -r line; do
printf '%s\n' "$line"
printf '%s\n' "$line" | curl -sf -X POST "$PCLOG_BASE/api/v1/terminal/append/$sid" \
-H "Authorization: Bearer $PCLOG_TOKEN" \
-H "Content-Type: application/octet-stream" --data-binary @- > /dev/null
done
curl -sf -X POST "$PCLOG_BASE/api/v1/terminal/close/$sid" \
-H "Authorization: Bearer $PCLOG_TOKEN" > /dev/null
}
# Usage
nmap -sV -p- 10.0.0.50 | pclog 1 "nmap full scan"
gobuster dir -u http://10.0.0.50 -w /usr/share/wordlists/common.txt | pclog 1 "gobuster"Creating Findings
from models import Finding
finding = Finding(
engagement_id=1,
title="SQL Injection in Login Form",
severity="critical",
cvss_score=9.8,
cvss_vector="CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H",
status="open",
affected_hosts="web01.acme.com",
description="The login form is vulnerable to SQL injection via the username parameter.",
remediation="Use parameterized queries or prepared statements.",
references="https://owasp.org/www-community/attacks/SQL_Injection"
)
db.session.add(finding)
db.session.commit()Bulk import from Nessus/Burp:
UI: Findings → Import → Upload `.nessus` or Burp XML → findings auto-created
Using templates:
UI: Findings → New Finding → Use Template → select from 2400+ templates → customize
Web Scanning
# Via Python (custom integration)
import requests
response = requests.post(
"http://localhost:5000/api/v1/scanner/scan",
headers={"Authorization": f"Bearer {API_TOKEN}"},
json={
"url": "https://example.com",
"deep_scan": True,
"engagement_id": 1
}
)
scan_id = response.json()["scan_id"]
# Poll for results
results = requests.get(
f"http://localhost:5000/api/v1/scanner/results/{scan_id}",
headers={"Authorization": f"Bearer {API_TOKEN}"}
).json()UI: Web Scanner → New Scan → Enter URL → Run → optionally promote findings to engagement
Workflow Playbooks
Running a playbook:
# Custom playbook definition (models.py)
from models import Playbook, PlaybookStep
playbook = Playbook(
name="Custom Web Enumeration",
description="Multi-stage web application enumeration",
team_id=1
)
db.session.add(playbook)
db.session.flush()
steps = [
PlaybookStep(playbook_id=playbook.id, order=1, tool_name="whatweb", args=""),
PlaybookStep(playbook_id=playbook.id, order=2, tool_name="nikto", args=""),
PlaybookStep(playbook_id=playbook.id, order=3, tool_name="gobuster-dir", args="-w /usr/share/wordlists/dirb/common.txt"),
PlaybookStep(playbook_id=playbook.id, order=4, tool_name="sqlmap", args="--batch --crawl=2")
]
db.session.add_all(steps)
db.session.commit()UI: Playbooks → Select Playbook → Choose Target → Run → watch step-by-step progress
Scheduled Scans
from models import ScheduledScan
scan = ScheduledScan(
target_id=5,
tool_name="nmap-quick",
interval="daily", # or 'hourly', '6hours', 'weekly'
enabled=True
)
db.session.add(scan)
db.session.commit()UI: Target page → Scheduled Scans → Add Schedule
Background daemon runs every 60 seconds and claims due jobs.
Generating Reports
# Via Python (custom script)
import requests
response = requests.post(
"http://localhost:5000/api/v1/reports/generate",
headers={"Authorization": f"Bearer {API_TOKEN}"},
json={
"engagement_id": 1,
"format": "docx", # or 'pdf'More from reason-machines
Use this skill in a project
Open any RiverX project, search the Skills panel for reason-machines/security-skills/pentestcompanion-workspace, and install it in one click.
