Scan URLs, browser extensions, IDE plugins, and packages for security threats using BrowserTotal.com
755
REST API for scanning URLs, browser extensions, IDE plugins, and packages using BrowserTotal.com
A containerized REST API that wraps the @browsertotal/scanner package, providing an easy-to-deploy service for security scanning.
Features:
docker pull browsertotal/browsertotal-scanner
docker run -p 3000:3000 --shm-size=4g --tmpfs /tmp:size=20G browsertotal/browsertotal-scanner
curl http://localhost:3000/health
GET /health
Response:
{
"status": "ok",
"version": "1.0.0"
}
POST /api/scan/url
Request:
curl -X POST http://localhost:3000/api/scan/url \
-H "Content-Type: application/json" \
-d '{"url": "https://example.com"}'
Response:
{
"url": "https://example.com",
"status": "low",
"score": 0,
"threats": [],
"scanUrl": "https://browsertotal.com/analysis/...",
"timestamp": "2024-01-15T10:30:00.000Z"
}
POST /api/scan/extension
Supported stores: chrome, firefox, edge, opera, safari, brave
Request:
curl -X POST http://localhost:3000/api/scan/extension \
-H "Content-Type: application/json" \
-d '{"extensionId": "cjpalhdlnbpafiamejdnhcphjbkeiagm", "store": "chrome"}'
POST /api/scan/vscode
Request:
curl -X POST http://localhost:3000/api/scan/vscode \
-H "Content-Type: application/json" \
-d '{"extensionId": "ms-python.python"}'
POST /api/scan/openvsx
Request:
curl -X POST http://localhost:3000/api/scan/openvsx \
-H "Content-Type: application/json" \
-d '{"extensionId": "rust-lang.rust-analyzer"}'
POST /api/scan/jetbrains
Request:
curl -X POST http://localhost:3000/api/scan/jetbrains \
-H "Content-Type: application/json" \
-d '{"pluginId": "7724"}'
POST /api/scan/npm
Request:
curl -X POST http://localhost:3000/api/scan/npm \
-H "Content-Type: application/json" \
-d '{"packageName": "lodash"}'
POST /api/scan/pypi
Request:
curl -X POST http://localhost:3000/api/scan/pypi \
-H "Content-Type: application/json" \
-d '{"packageName": "requests"}'
POST /api/scan/wordpress
Request:
curl -X POST http://localhost:3000/api/scan/wordpress \
-H "Content-Type: application/json" \
-d '{"pluginSlug": "akismet"}'
POST /api/scan/huggingface
Request:
curl -X POST http://localhost:3000/api/scan/huggingface \
-H "Content-Type: application/json" \
-d '{"modelId": "bert-base-uncased"}'
POST /api/scan/appsource
Request:
curl -X POST http://localhost:3000/api/scan/appsource \
-H "Content-Type: application/json" \
-d '{"addinId": "WA104379633"}'
POST /api/scan/powershell
Request:
curl -X POST http://localhost:3000/api/scan/powershell \
-H "Content-Type: application/json" \
-d '{"moduleName": "Az"}'
POST /api/scan/salesforce
Request:
curl -X POST http://localhost:3000/api/scan/salesforce \
-H "Content-Type: application/json" \
-d '{"appId": "some-app-id"}'
POST /api/scan/platform
Supported platforms: vscode, openvsx, jetbrains, npmjs, pypi, wordpress, huggingface, appsource, powershellgallery, salesforce, chrome, firefox, edge, opera, safari, brave
Request:
curl -X POST http://localhost:3000/api/scan/platform \
-H "Content-Type: application/json" \
-d '{"identifier": "lodash", "platform": "npmjs"}'
| Variable | Default | Description |
|---|---|---|
PORT | 3000 | Server port |
CHROMIUM_PATH | /usr/bin/chromium-browser | Path to Chromium executable |
DISABLE_AI | true | Disable AI analysis for faster scans |
SCAN_TIMEOUT | 420000 | Scan timeout in milliseconds (7 minutes) |
| Option | Required | Description |
|---|---|---|
--shm-size=4g | Yes | Shared memory for Chromium |
--tmpfs /tmp:size=20G | Yes | Temp filesystem for browser profiles |
version: '3.8'
services:
browsertotal-scanner:
image: browsertotal/browsertotal-scanner
ports:
- "3000:3000"
environment:
- PORT=3000
- DISABLE_AI=true
- SCAN_TIMEOUT=420000
shm_size: '4gb'
tmpfs:
- /tmp:size=20G
restart: unless-stopped
git clone https://github.com/AzureMarker/BrowserTotal.git
cd sdks/browsertotal-scanner-docker
# Build
docker build -t browsertotal/browsertotal-scanner .
# Run
docker run -p 3000:3000 --shm-size=4g --tmpfs /tmp:size=20G browsertotal/browsertotal-scanner
| Status | Description |
|---|---|
critical | Critical security threat detected |
high | High-risk security issues |
medium | Medium-risk concerns |
low | Low or no risk detected |
unknown | Unable to determine risk level |
error | Scan failed |
| Field | Type | Description |
|---|---|---|
status | string | Risk level (see above) |
score | number | Numeric risk score (0-100) |
threats | array | List of detected threats |
scanUrl | string | URL to full analysis on BrowserTotal |
timestamp | string | ISO 8601 timestamp |
raw | object | Full analysis data including AI results |
MIT
Content type
Image
Digest
sha256:774de317d…
Size
380.5 MB
Last updated
9 months ago
docker pull browsertotal/browsertotal-scanner