Metadata-Version: 2.4
Name: vishap-analyzer
Version: 6.4.0
Summary: Vishap - multi-material IT analyst (code, config, spec, logs, data). 6-stage LLM pipeline with SAST/SCA, SARIF 2.1.0, OWASP Top 10, audit trail (SHA-256), provenance, exploitability.
Author-email: "David (dvddv9)" <hndav9@yahoo.com>
License-Expression: AGPL-3.0-or-later
Keywords: vishap,vishap-analyzer,security,sast,sca,sarif,owasp,llm,multi-material,code-review,audit-trail,compliance,pii,deepseek,ollama
Requires-Python: >=3.11
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: requests>=2.32.0
Requires-Dist: python-dotenv>=1.0.0
Requires-Dist: ollama>=0.4.0
Requires-Dist: openai>=1.50.0
Requires-Dist: streamlit>=1.40.0
Requires-Dist: fastapi>=0.115.0
Requires-Dist: uvicorn[standard]>=0.30.0
Requires-Dist: pydantic>=2.9.0
Requires-Dist: pydantic-settings>=2.5.0
Requires-Dist: radon>=6.0.0
Requires-Dist: tenacity>=9.2.0
Requires-Dist: httpx>=0.27.0
Requires-Dist: cyclonedx-bom>=7.0.0
Requires-Dist: sqlalchemy[asyncio]>=2.0.30
Requires-Dist: asyncpg>=0.29.0
Requires-Dist: alembic>=1.13.0
Requires-Dist: structlog>=24.0.0
Requires-Dist: prometheus-client>=0.20.0
Requires-Dist: cryptography>=42.0.0
Requires-Dist: zstandard>=0.22.0
Requires-Dist: celery[redis]>=5.3.0
Requires-Dist: redis>=5.0.0
Requires-Dist: PyJWT>=2.9.0
Requires-Dist: stripe>=10.0.0
Requires-Dist: opentelemetry-api>=1.25.0
Requires-Dist: opentelemetry-sdk>=1.25.0
Requires-Dist: opentelemetry-instrumentation-fastapi>=0.46b0
Requires-Dist: opentelemetry-instrumentation-celery>=0.46b0
Requires-Dist: opentelemetry-exporter-otlp>=1.25.0
Requires-Dist: pyyaml>=6.0.0
Provides-Extra: dev
Requires-Dist: pytest>=8.0.0; extra == "dev"
Requires-Dist: pytest-asyncio>=0.23.0; extra == "dev"
Requires-Dist: black>=24.0.0; extra == "dev"
Dynamic: license-file

# Vishap

[![CI](https://github.com/dvddv9/vishap/actions/workflows/ci.yml/badge.svg)](https://github.com/dvddv9/vishap/actions/workflows/ci.yml)
[![Docs](https://github.com/dvddv9/vishap/actions/workflows/docs.yml/badge.svg)](https://dvddv9.github.io/vishap/)
[![PyPI version](https://badge.fury.io/py/vishap-analyzer.svg)](https://badge.fury.io/py/vishap-analyzer)
[![Docker Pulls](https://img.shields.io/docker/pulls/dvddv9/vishap-analyzer.svg)](https://hub.docker.com/r/dvddv9/vishap-analyzer)
[![License: AGPL v3](https://img.shields.io/badge/License-AGPL_v3-blue.svg)](https://www.gnu.org/licenses/agpl-3.0)

> 🔬 6-stage LLM pipeline for analyzing engineering materials (code, spec, logs).

**Vishap** takes a file as input → returns a structured Markdown report with risks, STRIDE threat model, refactoring options and **audit trail** with PII detection and compliance flags.

## 🌐 Links

- **Documentation:** [https://dvddv9.github.io/vishap/](https://dvddv9.github.io/vishap/)
- **Landing Page:** [https://dvddv9.github.io/vishap/landing/](https://dvddv9.github.io/vishap/landing/)
- **GitHub App:** Auto-analyze PR diffs and comment on findings.
- **Docker Hub:** `dvddv9/vishap-analyzer:6.3.0`

## 🚀 What's new in v6.3.0

We have completed the SaaS transformation:

- **UI Next.js (`ui-next/`):** Modern React dashboard (App Router, Tailwind, Clerk auth). Replaces Streamlit.
- **PyPI Trusted Publishing:** Automated publishing via GitHub Actions OIDC (`v6.3.0` on PyPI).
- **CI Fix:** Dogfood Quality Gate (`vishap.yml`) is now non-blocking (Ollama unavailable in CI).
- **Full SaaS Stack:** FastAPI, Celery, Postgres, Clerk (Auth), Stripe (Billing), GitHub App, Docusaurus (Docs), OTel (Observability).

## 🛠 Features

- **6-stage pipeline:** Ingestion → Taint Analysis → Dataflow → Risk Assessment → Verdict → Report.
- **Multi-language:** Python, Java, C (AST + taint patterns).
- **Async API:** FastAPI with Celery workers.
- **Security:** Fernet encryption for secrets, HMAC for webhooks.
- **Observability:** Structlog (JSON), Prometheus `/metrics`, OpenTelemetry traces (Tempo + Grafana).
- **CI/CD:** GitHub Actions (tests, lint, docs deploy, dogfood, PyPI publish).

## 📦 Quick Start

### Docker (recommended)

```bash
docker pull dvddv9/vishap-analyzer:6.3.0
docker run -p 5001:5001 -p 8501:8501 dvddv9/vishap-analyzer:6.3.0
```

- API: `http://localhost:5001/docs`
- UI (Streamlit): `http://localhost:8501`

### Python (PyPI)

```bash
pip install vishap-analyzer==6.3.0
vishap analyze file.py
```

### Local Dev (full stack)

```bash
git clone https://github.com/dvddv9/vishap.git
cd vishap
cp .env.example .env
docker compose up -d
```

- **UI (Next.js):** `cd ui-next && npm install && npm run dev` → `http://localhost:3000`
- **Grafana:** `http://localhost:3001` (admin/admin)

## 🧪 Testing

```bash
python -m pytest tests/ --ignore=tests/test_e2e.py -q
# 553 passed
```

## 📖 Architecture

```mermaid
graph TD
    Client -->|Next.js| FastAPI
    FastAPI -->|sync| Pipeline
    FastAPI -->|async| Celery
    Celery --> Pipeline
    Pipeline --> LLM
    Pipeline --> DB[(Postgres)]
    FastAPI --> OTel
    OTel --> Tempo
    FastAPI --> Prometheus
    Prometheus --> Grafana
```

## 📄 License

GNU Affero General Public License v3.0 (AGPL-3.0). See [LICENSE](LICENSE) for details.

## Prerequisites (Download Links)

- **Python 3.11+:** [python.org](https://www.python.org/downloads/)
- **Node.js 18+:** [nodejs.org](https://nodejs.org/en/download/)
- **Docker Desktop:** [docker.com](https://www.docker.com/products/docker-desktop/)
- **Ollama (LLM):** [ollama.com](https://ollama.com/download)
- **Git:** [git-scm.com](https://git-scm.com/downloads)

Verify:

    python --version    # 3.11+
    node --version      # v18+
    docker --version    # 24+
