Skip to content

Release v0.2 - AI Goat Shop

Choose a tag to compare

@iamfarooqh iamfarooqh released this 08 Mar 14:35
· 34 commits to main since this release

What's New in v0.2

Complete Backend Rewrite

  • Django → FastAPI with async SQLAlchemy, aiosqlite, and Pydantic v2
  • JWT authentication with role-based access (users, admin)
  • Ollama integration for local LLM inference (Mistral 7B)
  • RAG pipeline with ChromaDB vector store and sentence-transformers embeddings

Dedicated Challenge System

  • 9 CTF challenges each with its own isolated chat endpoint (/api/challenges/{id}/chat)
  • Per-challenge system prompts (prompts/challenges/c1–c9)
  • Challenge evaluators with dynamic HMAC-based flag generation — flags are unique per user and cannot be found in source code
  • Challenges are completely independent of the main shop chatbot

3-Tier Defense System

Level Name Description
0 Vulnerable No protections — all attacks work
1 Hardened Input validation, intent classification, output filtering
2 Guardrailed NVIDIA NeMo Guardrails with Colang rules

Docker Deployment

  • One-command setup: docker volume create ollama_models && cd docker && docker-compose up --build
  • Three containers: backend (FastAPI + uvicorn), frontend (React via nginx), Ollama
  • External ollama_models volume — the ~4.5 GB model survives docker-compose down -v
  • Backend auto-pulls the model on first start, skips on subsequent runs
  • App database auto-seeds with demo users, products, and challenges

Redesigned Frontend

  • React 18 + Material-UI with dark theme
  • Challenges page with card grid, difficulty filters, progress tracking
  • Inline challenge chat widget with 50/50 split (instructions + chat)
  • Collapsible hints, KB toggle for RAG challenges, flag submission inline
  • Admin dashboard with Ollama status, user management, order management

Attack Labs & Challenges

  • 9 Attack Labs covering OWASP LLM Top 10 (prompt injection, data poisoning, RAG exploitation, XSS, system prompt leakage, misinformation)
  • 9 CTF Challenges (4 Beginner, 5 Intermediate) — total 2,100 points
  • Full walkthrough solutions in docs/challenges-walkthrough.md

Hardware Requirements

Resource Minimum Recommended
RAM 8 GB free 16 GB+ total
Disk 6 GB 10 GB
CPU 4 cores 8+ cores
GPU Not required NVIDIA/Apple Silicon strongly recommended

Docker Desktop users: allocate at least 12 GB RAM to Docker.

Breaking Changes

  • Backend completely replaced (Django → FastAPI) — no migration path from v0.1
  • All API endpoints have changed
  • Database schema is new (SQLite via async SQLAlchemy)
  • Challenge system is entirely new architecture

Full Changelog: v0.1...v0.2