StackShield is an open-source cybersecurity platform designed to commoditize security tooling. The goal is to let companies perform comprehensive security assessments without paying for expensive SaaS products or proprietary vendors.
The approach is outside-in: tools start from passive external recon and progressively move inward:
- Recon — DNS discovery, WHOIS, subdomain enumeration (current)
- Enumeration — port scanning, service fingerprinting, banner grabbing
- Cloud Security — S3 bucket exposure, IAM misconfigurations, public asset audits
- App Security — web vulnerability scanning, exposed secrets, API analysis
Each tool produces JSON output so results can be piped and composed.
stackshield/
├── apps/ # CLI entry points — one folder per tool
│ └── web/ # Web UI backend (FastAPI)
│ ├── server.py # ASGI entry point
│ ├── routers/ # REST + WebSocket endpoints
│ └── services/ # Pipeline runner, tool runner
├── web/ # Web UI frontend (React + TypeScript + Vite)
│ └── src/
│ ├── pages/ # Route-level components (Dashboard, Pipelines, etc.)
│ ├── components/# Shared UI components (pipeline builder, result panels)
│ └── api/ # API client
├── lib/ # Shared business logic
│ ├── common/
│ │ ├── entities/ # Pydantic data models shared across all tools
│ │ └── db/ # Persistence layer (ScanStore interface + backends)
│ └── <tool_name>/
│ └── services/ # Business logic for that specific tool
├── rules/ # Coding and operational standards
├── Dockerfile # Kali-based Docker image
└── ssx.sh # Unified CLI wrapper (runs tools in Docker)
- Entities live in
lib/common/entities/— all Pydantic models that are shared across services go here. - Persistence lives in
lib/common/db/— abstractScanStoreinterface (base.py), SQLite default (sqlite_store.py), and factory/config logic (__init__.py). - Service logic lives in
lib/<tool>/services/— each file wraps a CLI tool or external source. - CLI entry points live in
apps/<tool>/— responsible only for arg parsing and orchestration. - Web backend lives in
apps/web/— FastAPI server with routers for pipelines, scans, targets, and tool execution. Pipeline runner orchestrates multi-tool workflows with WebSocket progress. - Web frontend lives in
web/— React + TypeScript + Vite app. Pages: Dashboard, New Scan, History, Targets, Pipelines. The pipeline builder uses react-flow for a visual DAG editor. - All output goes to stdout as JSON. Logs, warnings, and errors go to stderr.
- Everything runs in Docker via
ssx.sh. No tool should require local installation.
Tools can persist scan results to a pluggable store (SQLite by default). Configuration lives in ~/.stackshield/config.toml (mounted to /data/config.toml in the container). Key settings:
store.enabled— set tofalseto disable persistence entirelystore.auto_save— whentrue(default), tools auto-save results after every runstore.backend—"sqlite"by default; new backends implementScanStoreinlib/common/db/
CLI flags --save and --no-save override auto_save per run. The certs tool automatically looks up prior DNS and port scan results from the store to discover TLS targets (skip with --no-db, --stdin, or -p).
# Build and run via Make
make build
make dns DOMAIN=example.com
# Or directly via ssx.sh
./ssx.sh dns -d example.comRun make help for all available targets.
See CONTRIBUTING.md for the full checklist. In short:
- Create
apps/<tool_name>/with a CLI entry point (e.g.certs.py) - Create
lib/<tool_name>/services/with service files wrapping external tools - Add new entities to
lib/common/entities/if they are shared; otherwise keep them local to the service - Add a new
casetossx.shmapping the subcommand to the Python file - Add a
maketarget in the Makefile under the Tool Shortcuts section - Update the root
README.mdtools table with the new subcommand - Add a
README.mdinapps/<tool_name>/documenting Quick Start and Output Schema - Add
--save/--no-saveflags and callshould_save()+get_store()afterasyncio.run()for persistence support
- Create
lib/common/db/<backend>_store.pyimplementing theScanStoreABC fromlib/common/db/base.py - Register the class in the
_BACKENDSdict inlib/common/db/__init__.py - Add a
[store.<backend>]section to the default config template inlib/common/db/__init__.py - Add the backend's dependencies to
pyproject.toml
- Python conventions: see rules/python.md
- Docker conventions: see rules/docker.md
- General tool conventions: see rules/general.md