New:Microsoft Teams Notifications Are Now Available in Socket.Learn more β†’
Get Started

sentry-proxy

Package Overview
Dependencies
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

sentry-proxy

Security Analysis Tool β€” MITM Proxy with real-time vulnerability detection, AI copilot, and autonomous security agent

latest
Source
npmnpm
Version
1.0.0
Version published
Maintainers
1
Created
Source

Version Node.js TypeScript License AI Powered Tests

πŸ›‘οΈ SentryProxy

πŸ‡§πŸ‡· Leia em PortuguΓͺs

Web security analysis tool with MITM proxy, passive vulnerability detection, active scanners, autonomous security agent, AI-powered analysis, and a real-time dashboard.

SentryProxy intercepts, decrypts, and analyzes all HTTP/HTTPS traffic between the browser and the target site β€” combining automated vulnerability detection with an AI copilot and an autonomous browser-based security agent.

✨ Features

FeatureDescription
πŸ”“ HTTPS MITM ProxyFull TLS interception with auto-generated CA certificates and LRU cert cache
πŸ” 5 Passive AnalyzersData leak, headers, cookies, CORS, tech stack β€” real-time traffic analysis
⚑ 4 Active ScannersXSS, Auth, IDOR, Info Disclosure β€” on-demand vulnerability testing
πŸ€– AI Real-time CopilotLLM-powered traffic analysis with configurable prompts
πŸ“ AI Report Analyst5-phase deep analysis: correlations, attack chains, executive summary
πŸ•΅οΈ Autonomous AgentBrowser-driven security agent with 5 attack playbooks and safety guards
πŸ“± Viewport ReconTests the site with 6 user-agents (Desktop, Mobile, iOS, WebView, etc.)
πŸ“œ Asset ScannerJS/CSS crawl for secrets (API keys, tokens, connection strings)
πŸ”Ž Tech FingerprintingDetects 30+ technologies (frameworks, CMS, servers, CDNs, analytics)
πŸ“Š Real-time DashboardWeb UI with WebSocket, filters, detail modals, toast notifications
πŸ’Ύ SQLite PersistencePersistent storage for findings and traffic (survives restarts)
πŸ–₯️ CLI ModeHeadless scanning via --scan, --target, --headless flags
πŸ”’ Rate LimitingBuilt-in API rate limiting (100 req/min) with X-RateLimit headers
🐳 Docker ReadyProduction Dockerfile included

πŸ“‹ Table of Contents

πŸš€ Quick Start

# Clone
git clone https://github.com/diegosouzapw/sentry-proxy.git
cd sentry-proxy

# Install
npm install

# Configure
cp .env.example .env
# Edit .env β†’ set TARGET_URL=https://your-target.com

# Run
npm start

The dashboard opens at http://localhost:3333 and the proxy listens on localhost:8888.

πŸ“¦ Installation

Prerequisites: Node.js 20+ and npm.

npm install

Docker

docker build -t sentry-proxy .
docker run -p 3333:3333 -p 8888:8888 -e TARGET_URL=https://example.com sentry-proxy

βš™οΈ Configuration

Copy .env.example and adjust:

# Required
TARGET_URL=https://your-web-site.com

# Proxy
PROXY_PORT=8888
DASHBOARD_PORT=3333
MODE=passive              # passive (analyze only) | active (allows scanners)
LOG_LEVEL=info             # debug | info | warn | error

# Dashboard Auth
DASHBOARD_AUTH_USER=admin
DASHBOARD_AUTH_PASSWORD=your-strong-password

# AI (optional)
AI_ENABLED=true
AI_PROVIDER=openai-compatible
AI_BASE_URL=http://localhost:20128/v1
AI_API_KEY=your-api-key
AI_MODEL=gpt-4
AI_MODE=both               # realtime | report | both
AI_MAX_TOKENS=4096
AI_TEMPERATURE=0.3

# Storage
DATA_DIR=data              # SQLite database directory

🎯 How to Use

1. Passive Mode (default)

Simply browse the target with the proxy configured β€” SentryProxy analyzes all traffic automatically:

  • Start SentryProxy: npm start
  • Configure your browser proxy to http://localhost:8888
  • Install the CA certificate (see HTTPS Setup)
  • Navigate to the target site
  • View real-time findings at http://localhost:3333

2. Active Scanning

Set MODE=active in .env, then trigger scanners from the dashboard or API:

# Via API
curl -X POST http://localhost:3333/api/scan/xss
curl -X POST http://localhost:3333/api/scan/auth
curl -X POST http://localhost:3333/api/scan/idor
curl -X POST http://localhost:3333/api/scan/info-disclosure

3. Agent Mode

The autonomous agent uses a real browser (Playwright) to explore and test the target:

# Start agent from dashboard or API
curl -X POST http://localhost:3333/api/agent/start \
  -H "Content-Type: application/json" \
  -d '{"playbook": "reconnaissance"}'

Available playbooks: reconnaissance, auth-testing, input-injection, sensitive-data, access-control.

4. CLI / Headless Mode

# Run specific scanners and exit
npx tsx src/index.ts --target https://example.com --scan xss,idor --output report.json

# Headless mode (no dashboard)
npx tsx src/index.ts --headless --scan info-disclosure

πŸ—οΈ Architecture

β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”     β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”     β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚   Browser    │────▢│  MITM Proxy  │────▢│   Target Site   β”‚
β”‚              │◀────│  (port 8888) │◀────│                 β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜     β””β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”˜     β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
                           β”‚
                    β”Œβ”€β”€β”€β”€β”€β”€β–Όβ”€β”€β”€β”€β”€β”€β”€β”
                    β”‚  Analyzers   β”‚  ← passive, real-time
                    β”‚  (5 modules) β”‚
                    β””β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”˜
                           β”‚
         β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
         β”‚                 β”‚                 β”‚
    β”Œβ”€β”€β”€β”€β–Όβ”€β”€β”€β”€β”     β”Œβ”€β”€β”€β”€β”€β”€β–Όβ”€β”€β”€β”€β”€β”€β”   β”Œβ”€β”€β”€β”€β”€β”€β–Όβ”€β”€β”€β”€β”€β”€β”
    β”‚ Finding β”‚     β”‚  Dashboard  β”‚   β”‚  AI Copilot β”‚
    β”‚  Store  β”‚     β”‚ (port 3333) β”‚   β”‚  (LLM API)  β”‚
    β””β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”˜     β””β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”˜   β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
         β”‚                 β”‚
    β”Œβ”€β”€β”€β”€β–Όβ”€β”€β”€β”€β”     β”Œβ”€β”€β”€β”€β”€β”€β–Όβ”€β”€β”€β”€β”€β”€β”
    β”‚ SQLite  β”‚     β”‚  WebSocket  β”‚
    β”‚   DB    β”‚     β”‚  (live UI)  β”‚
    β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜     β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜

Source Modules

ModuleFilesPurpose
proxy/server, cert-manager, containerMITM proxy, TLS certificates, DI
analyzers/cors, headers, data-leak, tech-stack, cookiesPassive traffic analysis
scanners/xss, auth, idor, info-disclosureActive vulnerability scanning
agent/controller, browser-driver, playbooks, safety-guard, navigation-graph, page-analyzer, action-plannerAutonomous browser agent
ai/llm-provider, realtime-copilot, report-analyst, prompt-library, ai-configAI-powered analysis
recon/auto-recon, viewport-recon, asset-reconAutomated reconnaissance
dashboard/server, websocket, routes/core, routes/ai, routes/agentWeb UI and API
storage/finding-store, request-store, databaseIn-memory and SQLite storage
middleware/rate-limitAPI rate limiting
utils/cli, logger, lru-cache, headersShared utilities

πŸ•΅οΈ Autonomous Agent

The agent is a browser-driven security testing system powered by Playwright and LLM decision-making.

Playbooks

PlaybookRiskStepsPurpose
reconnaissanceLow50Map pages, forms, APIs, admin areas
auth-testingMedium30Test login, enumeration, rate limiting
input-injectionHigh40XSS and SQLi on all input fields
sensitive-dataLow25Hunt for exposed PII, keys, tokens
access-controlMedium25IDOR and privilege escalation testing

Safety Guard

  • All destructive actions require human approval
  • Risk level classification per action
  • Automatic abort on safety violations
  • Maximum step budget per playbook

Agent API

# Control
POST /api/agent/start    # Start with playbook
POST /api/agent/stop     # Stop execution
POST /api/agent/pause    # Pause execution
POST /api/agent/resume   # Resume execution
POST /api/agent/approve  # Approve pending action

# Status
GET  /api/agent/status   # Current state
GET  /api/agent/map      # Navigation graph (Mermaid)
GET  /api/agent/playbooks # Available playbooks

πŸ€– AI Engine

Real-time Copilot

Analyzes intercepted traffic in real-time using configurable LLM prompts:

  • HTTP Traffic Analysis β€” detects security issues in request/response pairs
  • JavaScript Analysis β€” finds client-side vulnerabilities
  • Auth Flow Analysis β€” evaluates authentication security
  • API Response Analysis β€” checks for data exposure
  • Tech Stack Analysis β€” contextual vulnerability mapping

Report Analyst

5-phase deep analysis of all accumulated findings:

  • Finding Correlation β€” groups related vulnerabilities
  • Attack Chain Analysis β€” identifies exploitation paths
  • Risk Assessment β€” business impact evaluation
  • Executive Summary β€” non-technical overview
  • Remediation Plan β€” prioritized fix recommendations

AI API

GET  /api/ai/status         # AI status and token usage
POST /api/ai/analyze-report # Generate deep analysis
GET  /api/ai/reports        # List generated reports

πŸ–₯️ CLI Mode

Usage:
  npx tsx src/index.ts [options]

Options:
  -t, --target <url>       Target URL (overrides TARGET_URL)
  -m, --mode <mode>        passive | active
  -s, --scan <scanners>    Run scanners and exit (comma-separated)
  -o, --output <file>      Output file for results (JSON)
  --headless               No interactive dashboard
  -h, --help               Help

Examples:
  npx tsx src/index.ts --target https://example.com
  npx tsx src/index.ts --scan xss,idor --output report.json
  npx tsx src/index.ts --headless --scan info-disclosure

πŸ“Š Dashboard

The web dashboard provides:

  • Real-time findings via WebSocket with severity badges
  • Traffic monitor with request/response details
  • Statistics with security score (A–F grade)
  • Scanner controls for active scanning
  • Agent controls with status and navigation graph
  • AI insights with copilot status and report generation
  • Export full JSON security report
  • Toast notifications for new findings
  • Responsive design (desktop, tablet, mobile)
  • Rate limiting with X-RateLimit-* headers

πŸ” HTTPS Interception

SentryProxy generates a local CA certificate at startup. To intercept HTTPS:

  • Start SentryProxy once (generates certs/rootCA.pem)
  • Import the CA into your browser/system
  • All HTTPS traffic will be transparently decrypted

See HTTPS Setup Guide for detailed instructions.

πŸ“‘ API Reference

EndpointMethodDescription
/api/statsGETDashboard statistics and security score
/api/findingsGETPaginated findings (?page=1&limit=50&severity=HIGH)
/api/trafficGETPaginated traffic (?page=1&limit=50)
/api/exportGETFull JSON security report
/api/scan/:typePOSTTrigger scanner (xss, auth, idor, info-disclosure)
/api/resetPOSTClear all findings and traffic
/api/ai/statusGETAI copilot status and token usage
/api/ai/analyze-reportPOSTGenerate AI deep analysis
/api/ai/reportsGETList AI-generated reports
/api/agent/startPOSTStart agent with playbook
/api/agent/stopPOSTStop agent
/api/agent/statusGETAgent state
/api/agent/mapGETNavigation graph (Mermaid)
/api/agent/playbooksGETAvailable playbooks

All API endpoints include rate limiting headers: X-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Reset.

πŸ§ͺ Testing

# Unit tests (114 tests)
npm test

# With coverage
npm run test:coverage

# E2E tests (12 Playwright tests)
npm run test:e2e

# Lint
npm run lint

Test coverage:

AreaFilesTests
Analyzers556
Scanners421
Storage222
Utils19
E2E112
Total13126

πŸ“š Documentation

DocumentDescription
User Guide (EN)Complete step-by-step guide for beginners
User Guide (PT-BR)Guia completo passo a passo
ArchitectureSystem architecture and design
API ReferenceFull API documentation
AnalyzersPassive analyzer details
ScannersActive scanner details
Detection PatternsVulnerability detection rules
HTTPS SetupCA certificate installation
CHANGELOGVersion history
SECURITYSecurity policy

🀝 Contributing

  • Fork the repository
  • Create a feature branch: git checkout -b feature/my-feature
  • Make your changes with tests
  • Run npm test && npm run lint
  • Submit a Pull Request

πŸ“„ License

MIT Β© 2025-2026

πŸ›‘οΈ SentryProxy v1.0.0
Security Analysis & Vulnerability Detection Tool

Keywords

security

FAQs

Package last updated on 17 Feb 2026

Related posts