{"id":31956340,"url":"https://github.com/profullstack/scanner","last_synced_at":"2026-01-20T16:50:54.075Z","repository":{"id":295180131,"uuid":"989395805","full_name":"profullstack/scanner","owner":"profullstack","description":"Vulnerabiltiy scanner for web application pen testing.","archived":false,"fork":false,"pushed_at":"2025-06-15T13:22:31.000Z","size":161,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"master","last_synced_at":"2025-09-30T05:47:06.929Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/profullstack.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2025-05-24T02:39:29.000Z","updated_at":"2025-06-15T13:22:35.000Z","dependencies_parsed_at":"2025-05-24T03:51:02.942Z","dependency_job_id":"74ce39d8-64b7-491c-964e-ab63cdaca1e8","html_url":"https://github.com/profullstack/scanner","commit_stats":null,"previous_names":["profullstack/scanner"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/profullstack/scanner","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/profullstack%2Fscanner","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/profullstack%2Fscanner/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/profullstack%2Fscanner/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/profullstack%2Fscanner/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/profullstack","download_url":"https://codeload.github.com/profullstack/scanner/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/profullstack%2Fscanner/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":279019140,"owners_count":26086685,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-10-14T02:00:06.444Z","response_time":60,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2025-10-14T14:48:36.325Z","updated_at":"2025-10-14T14:50:02.310Z","avatar_url":"https://github.com/profullstack.png","language":"JavaScript","readme":"# 🛡️ @profullstack/scanner\n\n[![Crypto Payment](https://paybadge.profullstack.com/badge.svg)](https://paybadge.profullstack.com/?tickers=btc%2Ceth%2Csol%2Cusdc)\n\nA comprehensive CLI and Node.js module for web application security scanning with OWASP compliance, supporting multiple scanning tools and detailed vulnerability reporting.\n\n[![npm version](https://badge.fury.io/js/%40profullstack%2Fscanner.svg)](https://badge.fury.io/js/%40profullstack%2Fscanner)\n[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)\n[![Node.js Version](https://img.shields.io/badge/node-%3E%3D18.0.0-brightgreen.svg)](https://nodejs.org/)\n\n## 🚀 Features\n\n- **Multiple Security Tools Integration**: Nikto, httpx-toolkit, Wapiti, Nuclei, SQLMap\n- **OWASP Top 10 Compliance**: Comprehensive coverage of OWASP vulnerabilities\n- **Project Management**: Organize scans by project with comprehensive history tracking\n- **Multiple Report Formats**: JSON, HTML, CSV, XML, Markdown, Text\n- **Flexible Scanning Profiles**: Quick, Standard, Comprehensive, OWASP-focused\n- **CLI and Programmatic API**: Use as command-line tool or Node.js library\n- **Vulnerability Management**: Track, analyze, and export scan results\n- **Configurable Tool Settings**: Customize timeouts, severity levels, and more\n- **Cross-Platform Support**: Works on Linux, macOS, and Windows\n- **Enhanced Arch Linux Support**: Proper Python environment handling with pipx\n\n## 📦 Installation\n\nChoose one of the following installation methods based on your needs:\n\n## 🚀 Method 1: Docker Compose (Recommended)\n\nThe easiest way to get started is using Docker Compose, which provides a pre-configured environment with all security tools installed.\n\n### Prerequisites\n- [Docker](https://docs.docker.com/get-docker/) (version 20.10+)\n- [Docker Compose](https://docs.docker.com/compose/install/) (version 2.0+)\n\n### Quick Start with Docker Compose\n\n```bash\n# Clone the repository\ngit clone https://github.com/profullstack/scanner.git\ncd scanner\n\n# Copy and customize environment variables (optional)\ncp .env.example .env\n# Edit .env file to customize configuration\n\n# Start the development environment\ndocker-compose up -d scanner\n\n# Run a scan\ndocker-compose exec scanner scanner scan https://example.com\n\n# View scan results\ndocker-compose exec scanner scanner history\n```\n\n### Docker Compose Services\n\n#### Development Environment\n```bash\n# Start interactive development environment\ndocker-compose up scanner\n\n# Run scanner commands\ndocker-compose exec scanner scanner scan https://example.com\ndocker-compose exec scanner scanner tools --check\n```\n\n#### Production Environment\n```bash\n# Start production-optimized environment\ndocker-compose --profile production up -d scanner-prod\n\n# Run scans in production mode\ndocker-compose exec scanner-prod scanner scan https://example.com --profile comprehensive\n```\n\n#### Testing Environment\n```bash\n# Run all tests\ndocker-compose --profile test up scanner-test\n\n# Start vulnerable test applications for testing\ndocker-compose --profile test-targets up -d dvwa webgoat\n\n# Test against vulnerable applications\ndocker-compose exec scanner scanner scan http://dvwa --tools nikto,nuclei\ndocker-compose exec scanner scanner scan http://webgoat:8080 --profile owasp\n```\n\n\n### Docker Compose Commands Reference\n\n```bash\n# View running services\ndocker-compose ps\n\n# View logs\ndocker-compose logs scanner\n\n# Stop all services\ndocker-compose down\n\n# Remove all data (including scan history)\ndocker-compose down -v\n\n# Update to latest version\ndocker-compose pull\ndocker-compose up -d --force-recreate\n```\n\n### Environment Configuration\n\nThe project includes a comprehensive `.env.example` file with all available configuration options. You can customize the scanner behavior by copying this file to `.env` and modifying the values:\n\n```bash\n# Copy the example environment file\ncp .env.example .env\n\n# Edit the configuration\nnano .env  # or use your preferred editor\n```\n\n**Key Configuration Options:**\n\n- **Scanner Settings**: Default timeout, output directory, scan profiles\n- **Security Tools**: Enable/disable individual tools, configure timeouts\n- **Docker Settings**: Port mappings, network configuration\n- **Reporting**: Default formats, templates, output options\n- **Logging**: Log levels, file paths, rotation settings\n\n**Example .env customization:**\n```bash\n# Scanner configuration\nSCANNER_DEFAULT_TIMEOUT=600\nSCANNER_VERBOSE=true\nSCANNER_DEFAULT_PROFILE=comprehensive\n\n# Tool configuration\nNIKTO_ENABLED=true\nNUCLEI_SEVERITY=medium,high,critical\nHTTPX_ENABLED=true\n\n# Port configuration\nDVWA_PORT=8081\nWEBGOAT_PORT=8082\n```\n\n## 🖥️ Method 2: Host OS Installation\n\nInstall directly on your host operating system for maximum performance and integration.\n\n### Step 1: Install Node.js Package\n\n#### Global Installation (CLI)\n```bash\nnpm install -g @profullstack/scanner\n```\n\n#### Local Installation (Library)\n```bash\nnpm install @profullstack/scanner\n```\n\n### Step 2: Install Security Tools\n\n#### Option A: Automated Installation Script (Recommended)\n\nWe provide a comprehensive installation script that automatically installs all security tools based on your operating system:\n\n```bash\n# Make the script executable\nchmod +x ./bin/install-security-tools.sh\n\n# Install all security tools\n./bin/install-security-tools.sh --all\n\n# Install specific tools only\n./bin/install-security-tools.sh --nikto --nuclei\n\n# Force reinstall all tools\n./bin/install-security-tools.sh --force --all\n\n# Show help\n./bin/install-security-tools.sh --help\n```\n\n**Supported Platforms:**\n- **Linux**: Ubuntu/Debian, CentOS/RHEL/Fedora, Arch Linux (with pipx support)\n- **macOS**: via Homebrew\n- **Windows**: via Chocolatey (WSL recommended)\n\n**Arch Linux Note**: The script automatically handles Python environment restrictions by using `pipx` for Python packages, resolving the `externally-managed-environment` error.\n\n#### Option B: Manual Installation\n\n#### Ubuntu/Debian\n```bash\nsudo apt-get update\nsudo apt-get install nikto wapiti sqlmap python3-pip golang-go\ngo install -v github.com/projectdiscovery/nuclei/v3/cmd/nuclei@latest\ngo install -v github.com/projectdiscovery/httpx/cmd/httpx@latest\n\n# Install Python httpx in virtual environment\npython3 -m venv myenv\nsource myenv/bin/activate\npip install httpx\ndeactivate\n```\n\n#### macOS\n```bash\nbrew install nikto wapiti sqlmap python go\ngo install -v github.com/projectdiscovery/nuclei/v3/cmd/nuclei@latest\ngo install -v github.com/projectdiscovery/httpx/cmd/httpx@latest\n\n# Install Python httpx in virtual environment\npython3 -m venv myenv\nsource myenv/bin/activate\npip install httpx\ndeactivate\n```\n\n#### Windows\n```bash\nchoco install nikto sqlmap python golang\ngo install -v github.com/projectdiscovery/nuclei/v3/cmd/nuclei@latest\ngo install -v github.com/projectdiscovery/httpx/cmd/httpx@latest\n\n# Install Python httpx in virtual environment\npython -m venv myenv\nmyenv\\Scripts\\activate.bat\npip install httpx\ndeactivate\n```\n\n### Step 3: Verify Installation\n```bash\n# Check if all tools are properly installed\nscanner tools --check\n\n# Test with a basic scan\nscanner scan https://example.com --tools nikto\n```\n\n## 🔧 Installation Troubleshooting\n\n### Common Issues\n\n#### Permission Errors (Linux/macOS)\n```bash\n# If you get permission errors, try:\nsudo npm install -g @profullstack/scanner\n\n# Or use a Node version manager like nvm\ncurl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.0/install.sh | bash\nnvm install node\nnpm install -g @profullstack/scanner\n```\n\n#### Arch Linux Python Environment Issues\nIf you encounter `externally-managed-environment` errors on Arch Linux, the installation script automatically handles this by using `pipx`:\n\n```bash\n# The script automatically installs pipx and uses it for Python packages\n./bin/install-security-tools.sh --all\n\n# Manual pipx installation if needed\nsudo pacman -S python-pipx\npipx install wapiti3\n\n# Ensure pipx bin directory is in PATH\necho 'export PATH=$PATH:$HOME/.local/bin' \u003e\u003e ~/.bashrc\nsource ~/.bashrc\n\n# Verify installation\nscanner tools --check\n```\n\n**Troubleshooting Arch Linux installations:**\n```bash\n# Check current PATH\necho $PATH\n\n# Manually add directories to PATH\nexport PATH=$PATH:$HOME/.local/bin:$HOME/go/bin\n\n# Restart terminal or reload bashrc\nsource ~/.bashrc\n\n# Check tool availability\nwhich httpx-toolkit\nwhich wapiti\nwhich nuclei\n```\n\n#### Tool Installation Issues\n```bash\n# Check which tools are missing\nscanner tools --check\n\n# Install missing tools individually\n./bin/install-security-tools.sh --nikto\n./bin/install-security-tools.sh --nuclei\n\n# Force reinstall if tools are not working\n./bin/install-security-tools.sh --force --all\n\n# View detailed installation commands\n./bin/install-security-tools.sh --all  # Shows exact commands being run\n```\n\n#### Docker Issues\n```bash\n# If Docker services fail to start\ndocker-compose down\ndocker-compose pull\ndocker-compose up -d\n\n# Check service logs\ndocker-compose logs scanner\n\n# Reset all Docker data\ndocker-compose down -v\ndocker system prune -f\n```\n\n## 🎯 Quick Start\n\n### CLI Usage\n\n```bash\n# Basic scan (target can be URL, domain, or IP)\nscanner scan https://example.com\nscanner scan example.com\nscanner scan 192.168.1.1\nscanner scan https://example.com/app\n\n# Project-based scanning\nscanner projects --add --name \"My Website\" --domain \"example.com\"\nscanner scan https://example.com --project \"My Website\"\n\n# Quick scan with specific tools\nscanner scan https://example.com --tools nikto,nuclei\n\n# Use predefined profile\nscanner scan https://example.com --profile comprehensive\n\n# Generate HTML report\nscanner scan https://example.com --format html\n\n# Verbose output\nscanner scan https://example.com --verbose\n\n# Authenticated scanning with basic auth\nscanner scan https://example.com --auth-user admin --auth-pass password\n\n# Form-based authentication\nscanner scan https://example.com --auth-type form --login-url https://example.com/login --login-data \"username=admin\u0026password=secret\"\n\n# Using session cookie\nscanner scan https://example.com --session-cookie \"JSESSIONID=ABC123; auth_token=xyz789\"\n\n# Custom headers\nscanner scan https://example.com --headers '{\"Authorization\": \"Bearer token123\", \"X-API-Key\": \"key456\"}'\n```\n\n### Programmatic Usage\n\n```javascript\nimport { scanTarget, generateReport } from '@profullstack/scanner';\n\n// Basic scan\nconst result = await scanTarget('https://example.com', {\n  tools: ['nikto', 'nuclei'],\n  timeout: 300,\n  verbose: true\n});\n\nconsole.log(`Found ${result.summary.total} vulnerabilities`);\n\n// Generate HTML report\nconst htmlReport = await generateReport(result, { format: 'html' });\n```\n\n## 📋 CLI Commands\n\n### Scanning\n```bash\n# Scan a target\nscanner scan \u003ctarget\u003e [options]\n\n# Target can be:\n#   - Full URL: https://example.com\n#   - Domain: example.com\n#   - IP address: 192.168.1.1\n#   - URL with path: https://example.com/app\n\n# Options:\n#   -t, --tools \u003ctools\u003e     Comma-separated list of tools\n#   -o, --output \u003cdir\u003e      Output directory\n#   -f, --format \u003cformat\u003e   Report format (json,html,csv,xml,markdown,text)\n#   -p, --profile \u003cprofile\u003e Scan profile (quick,standard,comprehensive,owasp)\n#   --project \u003cproject\u003e     Project ID or name to associate scan with\n#   --timeout \u003cseconds\u003e     Timeout per tool\n#   --verbose               Verbose output\n#   --no-report             Skip report generation\n#   --ui-json               Generate UI-friendly JSON format\n#   --multi-format          Generate multiple report formats\n#   --open-html             Open HTML report in browser\n#   --detailed              Generate detailed text reports\n```\n\n### Project Management\n```bash\n# Create a new project\nscanner projects --add --name \"My Website\" --domain \"example.com\"\nscanner projects --add --name \"API Server\" --url \"https://api.example.com\"\n\n# List all projects\nscanner projects --list\n\n# Show project details\nscanner projects --show \"My Website\"\n\n# View project scan history\nscanner projects --history \"My Website\"\n\n# Show project statistics\nscanner projects --stats \"My Website\"\n\n# Show global statistics\nscanner projects --stats\n\n# Remove a project\nscanner projects --remove \"My Website\"\n\n# Clear project history\nscanner projects --clear-history \"My Website\"\n```\n\n### History \u0026 Results\n```bash\n# View scan history\nscanner history\n\n# Show scan statistics\nscanner stats\n\n# View detailed scan results\nscanner show \u003cscanId\u003e\n\n# Generate report from existing scan\nscanner report \u003cscanId\u003e --format html\n\n# Generate UI-friendly JSON report\nscanner report \u003cscanId\u003e --format json --ui-json\n\n# Generate multiple report formats\nscanner report \u003cscanId\u003e --format json,html,text --multi-format\n\n# Generate and open HTML report in browser\nscanner report \u003cscanId\u003e --format html --open-html\n\n# Generate detailed text report\nscanner report \u003cscanId\u003e --format text --detailed\n\n# Delete specific scan\nscanner delete \u003cscanId\u003e\n```\n\n### Tool Management\n```bash\n# Check tool availability\nscanner tools --check\n\n# List tool configuration\nscanner tools --list\n\n# Enable/disable tools\nscanner tools --enable nikto\nscanner tools --disable sqlmap\n```\n\n### Configuration\n```bash\n# Show current configuration\nscanner config --show\n\n# Show available scan profiles\nscanner config --profiles\n\n# Reset to defaults\nscanner config --reset\n\n# Export/import configuration\nscanner config --export config.json\nscanner config --import config.json\n```\n\n### Data Management\n```bash\n# Clear scan history\nscanner clean --history\n\n# Clear all data\nscanner clean --all\n```\n\n## 🔐 Authentication Support\n\nThe scanner supports multiple authentication methods for scanning protected web applications:\n\n### Basic Authentication\n```bash\n# HTTP Basic Authentication\nscanner scan https://example.com --auth-user username --auth-pass password --auth-type basic\n\n# HTTP Digest Authentication\nscanner scan https://example.com --auth-user username --auth-pass password --auth-type digest\n```\n\n### Form-Based Authentication\n```bash\n# Login form authentication\nscanner scan https://example.com \\\n  --auth-type form \\\n  --login-url https://example.com/login \\\n  --login-data \"username=admin\u0026password=secret\u0026csrf_token=abc123\"\n```\n\n### Session Cookie Authentication\n```bash\n# Use existing session cookie\nscanner scan https://example.com \\\n  --session-cookie \"PHPSESSID=abc123; auth_token=xyz789\"\n```\n\n### Custom Headers\n```bash\n# API token authentication\nscanner scan https://api.example.com \\\n  --headers '{\"Authorization\": \"Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...\"}'\n\n# Multiple custom headers\nscanner scan https://example.com \\\n  --headers '{\"X-API-Key\": \"key123\", \"X-Client-ID\": \"client456\"}'\n```\n\n### Programmatic Authentication\n```javascript\nimport { scanTarget } from '@profullstack/scanner';\n\n// Basic authentication\nconst result = await scanTarget('https://example.com', {\n  auth: {\n    type: 'basic',\n    username: 'admin',\n    password: 'password'\n  }\n});\n\n// Form-based authentication\nconst result2 = await scanTarget('https://example.com', {\n  auth: {\n    type: 'form',\n    loginUrl: 'https://example.com/login',\n    loginData: 'username=admin\u0026password=secret'\n  }\n});\n\n// Session cookie\nconst result3 = await scanTarget('https://example.com', {\n  auth: {\n    sessionCookie: 'JSESSIONID=ABC123'\n  }\n});\n\n// Custom headers\nconst result4 = await scanTarget('https://example.com', {\n  headers: {\n    'Authorization': 'Bearer token123',\n    'X-API-Key': 'key456'\n  }\n});\n```\n\n### Authentication Best Practices\n\n- **Secure Credentials**: Never hardcode credentials in scripts. Use environment variables or secure credential stores\n- **Session Management**: For long-running scans, ensure session cookies remain valid throughout the scan duration\n- **Rate Limiting**: Authenticated scans may have different rate limits than anonymous scans\n- **Scope Testing**: Verify that authenticated scans cover the intended scope and don't access unauthorized areas\n- **Credential Rotation**: Use dedicated test credentials that can be rotated regularly\n\n## 📁 Project Management\n\nThe scanner includes comprehensive project management features to organize and track your security scans across different applications and environments.\n\n### Creating Projects\n\n```bash\n# Create project with domain\nscanner projects --add --name \"E-commerce Site\" --domain \"shop.example.com\" --description \"Main shopping website\"\n\n# Create project with URL\nscanner projects --add --name \"API Gateway\" --url \"https://api.example.com\" --description \"REST API endpoints\"\n\n# Create project with minimal info\nscanner projects --add --name \"Internal App\" --domain \"internal.company.com\"\n```\n\n### Managing Projects\n\n```bash\n# List all projects\nscanner projects --list\n\n# Show detailed project information\nscanner projects --show \"E-commerce Site\"\n\n# Update project description\nscanner projects --show \"E-commerce Site\"  # Get project ID\nscanner projects --update \u003cproject-id\u003e --description \"Updated description\"\n\n# Remove a project (includes all scan history)\nscanner projects --remove \"E-commerce Site\"\n```\n\n### Project-Based Scanning\n\n```bash\n# Associate scans with projects\nscanner scan https://shop.example.com --project \"E-commerce Site\"\nscanner scan https://shop.example.com/admin --project \"E-commerce Site\" --profile comprehensive\n\n# Scans are automatically tracked in project history\nscanner projects --history \"E-commerce Site\"\n```\n\n### Project Analytics\n\n```bash\n# View project-specific statistics\nscanner projects --stats \"E-commerce Site\"\n\n# View global statistics across all projects\nscanner projects --stats\n\n# Clear project scan history\nscanner projects --clear-history \"E-commerce Site\"\n\n# Clear all scan history\nscanner projects --clear-history\n```\n\n### Project Data Storage\n\nProjects and scan history are stored in your configuration directory:\n\n- **Projects**: `~/.config/scanner/projects.json`\n- **Scan History**: `~/.config/scanner/history.json`\n- **Configuration**: `~/.config/scanner/config.json`\n\n### Programmatic Project Management\n\n```javascript\nimport {\n  addProject, getProjects, getProject,\n  addScanToHistory, getProjectHistory, getProjectStats\n} from '@profullstack/scanner';\n\n// Create a new project\nconst project = addProject({\n  name: 'My Application',\n  domain: 'app.example.com',\n  description: 'Production web application'\n});\n\n// Get all projects\nconst projects = getProjects();\n\n// Get project by name or ID\nconst myProject = getProject('My Application');\n\n// Scan with project association\nconst scanResult = await scanTarget('https://app.example.com', {\n  projectId: project.id,\n  tools: ['nikto', 'nuclei']\n});\n\n// View project history\nconst history = getProjectHistory(project.id);\n\n// Get project statistics\nconst stats = getProjectStats(project.id);\nconsole.log(`Total scans: ${stats.totalScans}`);\nconsole.log(`Total vulnerabilities: ${stats.totalVulnerabilities}`);\n```\n\n### Project Workflow Example\n\n```bash\n# 1. Set up projects for your applications\nscanner projects --add --name \"Frontend\" --domain \"app.example.com\"\nscanner projects --add --name \"Backend API\" --url \"https://api.example.com\"\nscanner projects --add --name \"Admin Panel\" --url \"https://admin.example.com\"\n\n# 2. Run regular scans associated with projects\nscanner scan https://app.example.com --project \"Frontend\" --profile standard\nscanner scan https://api.example.com --project \"Backend API\" --profile owasp\nscanner scan https://admin.example.com --project \"Admin Panel\" --profile comprehensive\n\n# 3. Monitor project security over time\nscanner projects --stats \"Frontend\"\nscanner projects --history \"Backend API\"\n\n# 4. Generate project-specific reports\nscanner projects --history \"Admin Panel\" | head -1 | cut -d' ' -f3  # Get latest scan ID\nscanner report \u003cscan-id\u003e --format html\n```\n\n## 🎯 Scan Profiles\n\n### Quick Scan\n- **Tools**: Nikto, Nuclei\n- **Focus**: Fast vulnerability detection\n- **Duration**: ~2-5 minutes\n\n### Standard Scan\n- **Tools**: Nikto, Wapiti, Nuclei\n- **Focus**: Comprehensive vulnerability assessment\n- **Duration**: ~5-15 minutes\n\n### Comprehensive Scan\n- **Tools**: All available tools\n- **Focus**: Thorough security analysis\n- **Duration**: ~15-30 minutes\n\n### OWASP Scan\n- **Tools**: httpx-toolkit, Nuclei, SQLMap\n- **Focus**: OWASP Top 10 vulnerabilities\n- **Duration**: ~10-20 minutes\n\n## 📊 Report Formats\n\n### JSON\n```bash\n# Standard JSON format\nscanner scan https://example.com --format json\n\n# UI-friendly JSON format with enhanced metadata\nscanner scan https://example.com --format json --ui-json\n\n# Generate both formats\nscanner scan https://example.com --format json --ui-json --multi-format\n```\nStructured data for programmatic analysis. The UI-friendly format includes enhanced metadata, visualization data, and structured information optimized for user interfaces.\n\n### HTML\n```bash\n# Generate HTML report\nscanner scan https://example.com --format html\n\n# Generate and automatically open in browser\nscanner scan https://example.com --format html --open-html\n```\nInteractive web report with charts and detailed vulnerability information. Can be automatically opened in your default browser.\n\n### CSV\n```bash\nscanner scan https://example.com --format csv\n```\nSpreadsheet-compatible format for data analysis.\n\n### XML\n```bash\nscanner scan https://example.com --format xml\n```\nStructured markup for integration with other tools.\n\n### Markdown\n```bash\nscanner scan https://example.com --format markdown\n```\nDocumentation-friendly format.\n\n### Text\n```bash\nscanner scan https://example.com --format text\n```\nPlain text format for console output.\n\n## 🔧 API Reference\n\n### Core Functions\n\n#### `scanTarget(target, options)`\nScan a target URL, domain, or IP address.\n\n```javascript\n// Target can be URL, domain, or IP\nconst result = await scanTarget('https://example.com', {\n  tools: ['nikto', 'nuclei'],           // Tools to use\n  outputDir: './scan-results',          // Output directory\n  timeout: 300,                         // Timeout per tool (seconds)\n  verbose: false,                       // Verbose output\n  projectId: 'project-uuid',            // Associate with project\n  toolOptions: {                        // Tool-specific options\n    nikto: { timeout: 120 },\n    nuclei: { severity: 'high,critical' }\n  }\n});\n```\n\n#### `generateReport(scanResult, options)`\nGenerate a report from scan results.\n\n```javascript\nconst report = await generateReport(scanResult, {\n  format: 'html',                       // Report format\n  includeRawOutput: false,              // Include raw tool output\n  template: 'default',                  // Report template\n  uiFormat: true,                       // Generate UI-friendly JSON\n  detailed: true,                       // Generate detailed text report\n  openHtml: true                        // Open HTML report in browser\n});\n```\n\n#### `getScanHistory(limit)`\nGet scan history.\n\n```javascript\nconst history = getScanHistory(10);    // Get last 10 scans\n```\n\n#### `getScanStats()`\nGet scan statistics.\n\n```javascript\nconst stats = getScanStats();\nconsole.log(`Total scans: ${stats.totalScans}`);\nconsole.log(`Total vulnerabilities: ${stats.totalVulnerabilities}`);\n```\n\n### Utility Functions\n\n#### `validateTarget(target)`\nValidate a target URL or IP.\n\n```javascript\nconst validation = validateTarget('https://example.com');\nif (validation.valid) {\n  console.log('Target is valid');\n} else {\n  console.error(validation.error);\n}\n```\n\n#### `checkToolAvailability(tools)`\nCheck if security tools are available.\n\n```javascript\nconst availability = await checkToolAvailability(['nikto', 'nuclei']);\nconsole.log('Nikto available:', availability.nikto);\n```\n\n### Configuration Functions\n\n#### `getConfig()`\nGet current configuration.\n\n```javascript\nconst config = getConfig();\nconsole.log('Default timeout:', config.scanning.defaultTimeout);\n```\n\n#### `updateConfig(updates)`\nUpdate configuration.\n\n```javascript\nupdateConfig({\n  scanning: {\n    defaultTimeout: 600,\n    verbose: true\n  }\n});\n```\n\n#### `applyScanProfile(profileName)`\nApply a scan profile.\n\n```javascript\nconst profileConfig = applyScanProfile('comprehensive');\nconsole.log('Profile tools:', profileConfig.tools);\n```\n\n## 🛠️ Tool Integration\n\n### Nikto\nWeb server scanner for common vulnerabilities and misconfigurations.\n\n**Configuration:**\n```javascript\n{\n  enabled: true,\n  timeout: 300,\n  format: 'xml'\n}\n```\n\n### httpx-toolkit\nModern HTTP toolkit for service discovery and security testing. The scanner uses both:\n\n1. Go-based httpx-toolkit for HTTP service discovery\n2. Python-based httpx library for advanced HTTP requests\n\n**Configuration:**\n```javascript\n{\n  enabled: true,\n  timeout: 300,\n  techDetect: true\n}\n```\n\n**Python Virtual Environment:**\nThe scanner creates a Python virtual environment (`myenv/`) with the httpx library installed:\n```bash\n# Activate the virtual environment\nsource myenv/bin/activate  # Linux/macOS\nmyenv\\Scripts\\activate.bat  # Windows\n\n# Use Python httpx\npython -c \"import httpx; print(httpx.__version__)\"\n\n# Deactivate when done\ndeactivate\n```\n\n### Wapiti\nWeb application vulnerability scanner.\n\n**Configuration:**\n```javascript\n{\n  enabled: true,\n  timeout: 300,\n  modules: 'all'\n}\n```\n\n### Nuclei\nFast vulnerability scanner with template-based detection.\n\n**Configuration:**\n```javascript\n{\n  enabled: true,\n  timeout: 300,\n  severity: 'high,critical',\n  templates: ''\n}\n```\n\n### SQLMap\nSQL injection detection and exploitation tool.\n\n**Configuration:**\n```javascript\n{\n  enabled: false,  // Disabled by default\n  timeout: 300,\n  crawl: 2,\n  batch: true\n}\n```\n\n## 📈 Examples\n\n### Basic Vulnerability Scan\n```javascript\nimport { scanTarget } from '@profullstack/scanner';\n\nconst result = await scanTarget('https://testphp.vulnweb.com', {\n  tools: ['nikto', 'nuclei'],\n  verbose: true\n});\n\nconsole.log(`Scan completed in ${result.duration} seconds`);\nconsole.log(`Found ${result.summary.total} vulnerabilities`);\n\n// Show high-severity vulnerabilities\nconst highSeverity = result.vulnerabilities.filter(v =\u003e \n  ['critical', 'high'].includes(v.severity)\n);\n\nhighSeverity.forEach(vuln =\u003e {\n  console.log(`${vuln.severity.toUpperCase()}: ${vuln.title}`);\n  console.log(`  URL: ${vuln.url}`);\n  console.log(`  Source: ${vuln.source}`);\n});\n```\n\n### Custom Report Generation\n```javascript\nimport { scanTarget, generateReport, exportReport } from '@profullstack/scanner';\n\nconst result = await scanTarget('https://example.com');\n\n// Generate multiple report formats in one call\nawait exportReport(result, 'security-report', {\n  format: ['html', 'json', 'csv', 'text'],\n  multiFormat: true,\n  uiFormat: true,\n  detailed: true,\n  openHtml: true\n});\n\n// Access the UI-friendly JSON data programmatically\nconst uiJsonReport = await generateReport(result, {\n  format: 'json',\n  uiFormat: true\n});\n\nconst reportData = JSON.parse(uiJsonReport);\nconsole.log(`Scan ID: ${reportData.metadata.scan_id}`);\nconsole.log(`Total vulnerabilities: ${reportData.summary.total_vulnerabilities}`);\nconsole.log(`Severity breakdown:`, reportData.summary.severity_counts);\n```\n\n### Automated Security Pipeline\n```javascript\nimport { scanTarget, getScanStats } from '@profullstack/scanner';\n\nasync function securityPipeline(targets) {\n  const results = [];\n  \n  for (const target of targets) {\n    console.log(`Scanning ${target}...`);\n    \n    const result = await scanTarget(target, {\n      profile: 'standard',\n      timeout: 300\n    });\n    \n    results.push(result);\n    \n    // Fail pipeline if critical vulnerabilities found\n    if (result.summary.critical \u003e 0) {\n      throw new Error(`Critical vulnerabilities found in ${target}`);\n    }\n  }\n  \n  // Generate summary report\n  const stats = getScanStats();\n  console.log(`Pipeline completed. Total vulnerabilities: ${stats.totalVulnerabilities}`);\n  \n  return results;\n}\n\n// Usage\nconst targets = ['https://app1.example.com', 'https://app2.example.com'];\nawait securityPipeline(targets);\n```\n\n## 🔄 Enhanced Output Features\n\n### UI-Friendly JSON Format\n\nThe scanner now provides a UI-optimized JSON format that includes enhanced metadata, visualization data, and structured information designed for integration with user interfaces:\n\n```javascript\n{\n  \"schema_version\": \"2.0\",\n  \"metadata\": {\n    \"scan_id\": \"scan-123\",\n    \"target\": \"https://example.com\",\n    \"target_url\": \"https://example.com\",\n    \"target_hostname\": \"example.com\",\n    \"scan_start_time\": \"2024-01-01T10:00:00.000Z\",\n    \"scan_end_time\": \"2024-01-01T10:05:00.000Z\",\n    \"scan_duration_seconds\": 300,\n    \"scan_duration_formatted\": \"5 minutes\",\n    \"project_id\": \"project-123\",\n    \"scan_profile\": \"comprehensive\"\n  },\n  \"summary\": {\n    \"total_vulnerabilities\": 5,\n    \"severity_counts\": {\n      \"critical\": 1,\n      \"high\": 2,\n      \"medium\": 1,\n      \"low\": 1,\n      \"info\": 0\n    },\n    \"tools_count\": 3,\n    \"tools_used\": [\"nikto\", \"nuclei\", \"wapiti\"]\n  },\n  \"vulnerabilities\": [\n    {\n      \"id\": \"vuln-001\",\n      \"severity\": \"high\",\n      \"severity_score\": 8.5,\n      \"title\": \"SQL Injection\",\n      \"description\": \"SQL injection vulnerability detected\",\n      \"location\": {\n        \"url\": \"https://example.com/search\",\n        \"parameter\": \"q\"\n      },\n      \"scan_id\": \"scan-123\",\n      \"source\": \"nuclei\"\n    }\n  ],\n  \"ui\": {\n    \"severity_colors\": {\n      \"critical\": \"#ff0000\",\n      \"high\": \"#ff6600\",\n      \"medium\": \"#ffcc00\",\n      \"low\": \"#ffff00\",\n      \"info\": \"#0099ff\"\n    },\n    \"severity_icons\": {\n      \"critical\": \"skull\",\n      \"high\": \"exclamation-triangle\",\n      \"medium\": \"exclamation-circle\",\n      \"low\": \"info-circle\",\n      \"info\": \"info\"\n    },\n    \"charts_data\": {\n      \"severity_distribution\": [\n        { \"severity\": \"critical\", \"count\": 1 },\n        { \"severity\": \"high\", \"count\": 2 },\n        { \"severity\": \"medium\", \"count\": 1 },\n        { \"severity\": \"low\", \"count\": 1 },\n        { \"severity\": \"info\", \"count\": 0 }\n      ]\n    },\n    \"vulnerability_groups\": [\n      {\n        \"category\": \"Injection\",\n        \"count\": 2,\n        \"vulnerabilities\": [\"vuln-001\", \"vuln-002\"]\n      }\n    ]\n  }\n}\n```\n\n### Multi-Format Output\n\nGenerate reports in multiple formats simultaneously:\n\n```bash\n# Generate reports in JSON, HTML, and text formats\nscanner scan https://example.com --format json,html,text --multi-format\n\n# Generate reports with UI-friendly JSON and open HTML in browser\nscanner scan https://example.com --format json,html --ui-json --multi-format --open-html\n```\n\n### Browser Integration\n\nHTML reports can be automatically opened in your default browser:\n\n```bash\n# Scan and open HTML report\nscanner scan https://example.com --format html --open-html\n\n# Generate report from existing scan and open in browser\nscanner report \u003cscan-id\u003e --format html --open-html\n```\n\n### Detailed Text Reports\n\nGenerate comprehensive text reports with detailed vulnerability information:\n\n```bash\n# Generate detailed text report\nscanner scan https://example.com --format text --detailed\n\n# The detailed report includes:\n# - Comprehensive vulnerability details\n# - Tool-specific information\n# - Formatted for better readability\n# - Severity indicators\n```\n\n### Backward Compatibility\n\nAll enhanced features maintain backward compatibility with existing code and workflows. The standard JSON format is still available alongside the new UI-friendly format.\n\n## � Security Considerations\n\n- **Authorized Testing Only**: Only scan systems you own or have explicit permission to test\n- **Rate Limiting**: Tools may be aggressive; consider rate limiting for production systems\n- **Network Impact**: Scans can generate significant network traffic\n- **False Positives**: Always verify findings manually before taking action\n- **Tool Updates**: Keep security tools updated for latest vulnerability signatures\n\n## 🤝 Contributing\n\n1. Fork the repository\n2. Create a feature branch: `git checkout -b feature/new-feature`\n3. Make your changes and add tests\n4. Run tests: `npm test`\n5. Commit your changes: `git commit -am 'Add new feature'`\n6. Push to the branch: `git push origin feature/new-feature`\n7. Submit a pull request\n\n## 📝 License\n\nThis project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details.\n\n## 🙏 Acknowledgments\n\n- [OWASP](https://owasp.org/) for security standards and guidelines\n- [Nikto](https://github.com/sullo/nikto) for web server scanning\n- [httpx-toolkit](https://github.com/projectdiscovery/httpx) for HTTP service discovery\n- [Wapiti](https://github.com/wapiti-scanner/wapiti) for vulnerability scanning\n- [Nuclei](https://github.com/projectdiscovery/nuclei) for fast vulnerability detection\n- [SQLMap](https://github.com/sqlmapproject/sqlmap) for SQL injection testing\n\n## 📞 Support\n\n- 📧 Email: support@profullstack.com\n- 🐛 Issues: [GitHub Issues](https://github.com/profullstack/scanner/issues)\n- 📖 Documentation: [https://profullstack.com/scanner](https://profullstack.com/scanner)\n- 💬 Community: [Discord](https://discord.gg/profullstack)\n\n---\n\n**⚠️ Disclaimer**: This tool is for authorized security testing only. Users are responsible for complying with applicable laws and regulations. The authors are not responsible for any misuse or damage caused by this tool.","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fprofullstack%2Fscanner","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fprofullstack%2Fscanner","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fprofullstack%2Fscanner/lists"}