Last Updated: October 14, 2025
Version: 0.1.0
Repository: lucron9090/studio
The Unified Red Team Operations Platform is a sophisticated web-based application designed for security researchers and AI developers to systematically test the safety filters and operational boundaries of Large Language Models (LLMs). Built on Next.js 14.2.33 with Firebase/Firestore backend and powered by Google Vertex AI (Gemini), the platform provides a structured environment for crafting, executing, and documenting multi-step "attack sequences."
Current Status: ALPHA - Core Features Implemented, Infrastructure Stabilized (~70% Production Ready)
Recent Updates (Oct 21, 2025):
- โ
Removed duplicated
empdirectory to clean up the codebase. - โ
Added an
AGENTS.mdfile to provide context for AI agents. - โ Implemented a testing suite with Jest and React Testing Library.
- โ
Added a new test for the
Buttoncomponent. - โ
Fixed pre-existing test failures in
mock-data.test.ts. - โ Set up a CI/CD pipeline with GitHub Actions.
- โ
Improved environment variable management by creating a
.env.examplefile.
- Status: โ Fully Implemented
- Technology: Firebase Authentication
- Location:
src/contexts/AuthContext.tsx,src/app/(auth)/login/page.tsx - Features:
- User authentication with Firebase
- Protected routes and session management
- User-specific operation isolation
- Status: โ Fully Implemented
- Location:
src/components/OperationWizard.tsx,src/app/(app)/operations/new/page.tsx - Features:
- Multi-step wizard for creating attack operations
- Define malicious goals, target LLMs, attack vectors, and personas
- AI-assisted field generation for:
- Target personas (
generateAITargetPersona) - Attack vector suggestions (
suggestAttackVectors) - Initial prompt generation (
generateInitialPrompts)
- Target personas (
- Bootstrap operation flow for quick start
- Predefined attack vectors including:
- Prompt Injection
- Character Role-Play
- Jailbreaking
- Few-Shot Learning Exploits
- Adversarial Suffix Attacks
- Many-Shot Jailbreaking
- Encoded Payload Execution
- Status: โ Fully Implemented
- Location:
src/components/LiveAttackView.tsx,src/app/(app)/operations/[id]/page.tsx - Features:
- Real-time conversation interface with target LLMs
- Simulated target response system (
simulateTargetResponse) - AI-powered follow-up prompt suggestions (
suggestOptimalFollowUpPrompt) - Message history with author tracking (operator/target/system)
- Operation status management (draft/active/completed/failed)
- Success flagging for individual prompts
- AI-assisted field editing during operation
- Status: โ Fully Implemented
- Location:
src/app/(app)/operations/page.tsx,src/services/operation-service.ts - Features:
- List all operations for authenticated user
- Quick start button for rapid operation creation
- Operation CRUD operations
- Real-time updates via Firestore listeners
- Operation deletion with cascade (removes all messages)
- Status: โ Fully Implemented
- Location:
src/lib/firebase/config.ts,firestore.rules - Data Model:
operationscollection (top-level)- Fields: userId, name, maliciousGoal, targetLLM, targetDescription, aiTargetPersona, attackVector, initialPrompt, status, timestamps
operations/{operationId}/messagessubcollection- Fields: author, content, timestamp, isSuccessful
- Security: Firestore rules enforce user-level access control
- Status: โ Fully Implemented
- Technology: Genkit 1.19.3 + Vertex AI (Gemini 2.0 Flash Exp)
- Location:
src/ai/directory - Implemented Flows:
bootstrapOperation- Quick operation setup with AI-generated parametersgenerateAITargetPersona- Create exploitable AI personasgenerateAITargetPersonaFromGoal- Generate persona based on attack goalgenerateInitialPrompts- Generate initial attack promptssuggestAttackVectors- Recommend top 3 attack vectorsregenerateAttackVector- Regenerate attack vector suggestionssuggestMaliciousGoal- AI-generated malicious goal suggestionssimulateTargetResponse- Simulate target LLM responsessuggestOptimalFollowUpPrompt- Generate adaptive follow-up promptsanalyzeOperation- Post-operation analysis and improvement suggestionsimprovePayloadEffectivenessWithRAG- RAG-based payload improvementgenerateOntologicalReportAndHardenStrategies- Specialized MAKER analysis
- Status: โ Fully Implemented
- Technology: React 18 + Shadcn/ui + Radix UI + Tailwind CSS
- Location:
src/components/ui/ - Features:
- Comprehensive component library (40+ components)
- Dark theme by default
- Responsive design
- Toast notifications
- Dialog modals
- Forms with validation (react-hook-form + zod)
- Custom sidebar navigation
- Status: ๐ง Backend Ready, Frontend Placeholder
- Location:
src/app/(app)/payloads/page.tsx,src/services/payload-service.ts - Implemented:
- RAG flow for payload improvement (
improvePayloadEffectivenessWithRAG) - Service placeholder with mock data
- UI placeholder page
- RAG flow for payload improvement (
- Missing:
- Actual Firestore
SuccessfulPayloadscollection integration - UI for viewing and managing saved payloads
- Automatic payload saving on successful operations
- Search and filter functionality
- Actual Firestore
- Status: ๐ง Analysis Flows Ready, PDF Generation Missing
- Implemented:
analyzeOperationflow for post-operation analysisgenerateOntologicalReportAndHardenStrategiesfor MAKER attacks- Analysis UI in LiveAttackView
- Missing:
- PDF generation using pdf-lib or similar
- Report templates
- Cloud Storage integration for report URLs
- Downloadable report interface
- Status: ๐ง Page Exists, Features Missing
- Location:
src/app/(app)/settings/page.tsx - Missing:
- User profile management
- API key configuration for target LLMs
- Notification preferences
- Theme customization
- Status: โ Not Implemented
- Purpose: Computer Vision and audio model attacks
- Requirements:
- Asynchronous execution with Google Cloud Tasks
- Computationally intensive adversarial example generation
- Integration with CV/audio models
- Status: โ Not Implemented
- Purpose: Supply chain attacks and data poisoning
- Requirements:
- Asynchronous execution with Google Cloud Tasks
- Dataset manipulation capabilities
- Integration with training pipelines
- Status: โ Not Implemented
- Purpose: Extract model parameters and behavior
- Requirements:
- Asynchronous execution with Google Cloud Tasks
- Query optimization
- Model parameter reconstruction
- Status: โ Not Fully Implemented
- Purpose: Advanced ontological manipulation of AI systems
- Planned Features:
- GSU (Generative State Usurpation) phases
- TDME (Telos-Driven Morphogenic Evolution)
- Socratic Perturbation
- Mathematical formalism prompts
- Code generation validation
- Current: Only analysis/reporting functions exist
- Status: โ Not Implemented
- Purpose: Asynchronous long-running job processing
- Requirements:
- Cloud Tasks queue configuration
- Background function handlers
- Job status tracking
- Status: โ Not Implemented
- Purpose: Automated discovery of new attack techniques
- Requirements:
- Scheduled Cloud Functions
- Web scraping for arXiv, security blogs
- Firestore
ThreatIntelligencecollection - Integration with attack vector recommendations
- Status: โ Not Implemented
- Purpose: Configure and manage external LLM endpoints
- Missing:
- API key storage and encryption
- Endpoint configuration for Claude, Grok, ChatGPT
- Connection testing
- Rate limiting and quota management
- Status: โ Not Implemented
- Current: Uses simulated responses only
- Requirements:
- API clients for OpenAI, Anthropic, xAI
- Request/response handling
- Error handling and retries
- Cost tracking
- Framework: Next.js 14.2.5 (App Router)
- Language: TypeScript 5.5.4
- UI Library: React 18.3.1
- Styling: Tailwind CSS 3.4.7
- Component Library: Shadcn/ui + Radix UI
- Forms: React Hook Form 7.54.2 + Zod 3.24.2
- Icons: Lucide React 0.475.0
- Date Handling: date-fns 3.6.0
- AI Framework: Genkit 1.19.3
- AI Provider: Google Vertex AI (@genkit-ai/vertexai 1.19.3)
- Model: Gemini 2.0 Flash Exp
- Database: Firebase Firestore 11.9.1
- Authentication: Firebase Auth 11.9.1
- Hosting: Firebase Hosting (apphosting.yaml configured)
- Build Tool: Next.js compiler
- Package Manager: npm
- Linter: Next.js ESLint
- Configuration: TypeScript, PostCSS, Tailwind
- Platform: Firebase/Google Cloud Platform
- Project ID: studio-7293752289-3b9ee
- Location: us-central1 (Vertex AI)
- Database: Cloud Firestore
- Authentication: Firebase Auth
- Planned: Cloud Tasks, Cloud Storage, Scheduled Functions
studio/
โโโ docs/ # Documentation
โ โโโ blueprint.md # Original design specification
โ โโโ blueprint2.md # Detailed architecture plan
โ โโโ project overview.txt # Comprehensive overview
โ โโโ psuedocode.txt # Implementation pseudocode
โ โโโ psuedocode2.txt # Additional pseudocode
โโโ src/
โ โโโ ai/ # AI/Genkit flows
โ โ โโโ flows/ # 13 implemented AI flows
โ โ โโโ prompts/ # AI prompt templates
โ โ โโโ schemas/ # Zod schemas for flows
โ โ โโโ cache.ts # AI response caching
โ โ โโโ dev.ts # Development utilities
โ โ โโโ genkit.ts # Genkit configuration
โ โโโ app/ # Next.js App Router
โ โ โโโ (app)/ # Authenticated routes
โ โ โ โโโ operations/ # Operations CRUD pages
โ โ โ โโโ payloads/ # Payload library page
โ โ โ โโโ settings/ # Settings page
โ โ โโโ (auth)/ # Authentication routes
โ โ โ โโโ login/ # Login page
โ โ โโโ layout.tsx # Root layout
โ โ โโโ page.tsx # Landing page
โ โโโ components/ # React components
โ โ โโโ ui/ # Shadcn/ui components (40+)
โ โ โโโ AIAssistedField.tsx # AI-powered input field
โ โ โโโ AppSidebar.tsx # Navigation sidebar
โ โ โโโ LiveAttackView.tsx # Main attack interface
โ โ โโโ OperationWizard.tsx # Operation creation wizard
โ โโโ contexts/ # React contexts
โ โ โโโ AuthContext.tsx # Authentication context
โ โโโ hooks/ # Custom React hooks
โ โ โโโ use-firestore.ts # Firestore hooks
โ โ โโโ use-mobile.tsx # Responsive hooks
โ โ โโโ use-toast.ts # Toast notification hook
โ โโโ lib/ # Utilities and config
โ โ โโโ firebase/ # Firebase configuration
โ โ โโโ types.ts # TypeScript type definitions
โ โ โโโ utils.ts # Utility functions
โ โโโ services/ # Business logic services
โ โโโ operation-service.ts # Operation CRUD operations
โ โโโ payload-service.ts # Payload library service
โโโ firestore.rules # Firestore security rules
โโโ package.json # Dependencies
โโโ tsconfig.json # TypeScript configuration
โโโ tailwind.config.ts # Tailwind configuration
โโโ next.config.mjs # Next.js configuration
โโโ apphosting.yaml # Firebase hosting config
- โ Firebase Authentication with user sessions
- โ Firestore security rules enforcing user-level isolation
- โ Environment variable protection for API keys
- โ HTTPS-only communication
- โ Client-side input validation with Zod schemas
- โ API rate limiting
- โ Request throttling
- โ API key encryption for external LLM services
- โ Audit logging
- โ Role-based access control (RBAC)
- Primary Color: Deep Blue (#3F51B5)
- Background: Light Gray (#F5F5F5) - Dark mode implemented instead
- Accent: Teal (#009688)
- Font: Inter sans-serif (body), VT323 (monospace accent)
- Current Mode: Dark theme by default
- โ Responsive design (mobile, tablet, desktop)
- โ Loading states and skeletons
- โ Toast notifications for user feedback
- โ Modal dialogs for confirmations
- โ Keyboard shortcuts support
- โ Real-time updates via Firestore listeners
โ ๏ธ Limited error handling on failed AI calls
{
id: string; // Auto-generated
userId: string; // Owner user ID
name: string; // Operation name
maliciousGoal: string; // Attack objective
targetLLM: string; // Target model (Gemini/Claude/Grok/ChatGPT)
targetDescription?: string; // Optional target description
aiTargetPersona: string; // AI persona configuration
attackVector: string; // Attack vector used
initialPrompt: string; // First prompt in sequence
status: string; // draft | active | completed | failed
createdAt: Timestamp;
updatedAt: Timestamp;
}{
id: string; // Auto-generated
author: string; // operator | target | system
content: string; // Message content
timestamp: Timestamp;
isSuccessful?: boolean; // Optional success flag
}{
id: string;
prompt: string;
operationId: string;
createdAt: Timestamp;
metadata?: object; // Attack vector, target model, etc.
}{
id: string;
source: string;
technique: string;
description: string;
scrapedAt: Timestamp;
}- โ Production build: Working (Next.js 14.2.33)
- โ TypeScript compilation: Passing
- โ Static generation: Successful for all pages
โ ๏ธ Linting: ESLint needs initial configuration (prompts on first run)- โ Dependencies: 751 packages, security vulnerabilities resolved
- Environment: Development
- Hosting: Firebase Hosting (configured via apphosting.yaml)
- Database: Cloud Firestore (production database)
- Authentication: Firebase Auth (production)
- AI: Vertex AI (production API)
- Build Output: Static + Dynamic rendering based on page requirements
# Development server
npm run dev # Runs on port 9002
# Production build
npm run build # Creates optimized production build
# Start production server
npm start # Serves production build
# Linting
npm run lint # Run ESLint (needs config on first run)# Firebase Configuration (Client)
NEXT_PUBLIC_FIREBASE_API_KEY=
NEXT_PUBLIC_FIREBASE_AUTH_DOMAIN=
NEXT_PUBLIC_FIREBASE_PROJECT_ID=
NEXT_PUBLIC_FIREBASE_STORAGE_BUCKET=
NEXT_PUBLIC_FIREBASE_MESSAGING_SENDER_ID=
NEXT_PUBLIC_FIREBASE_APP_ID=
# Google Cloud / Vertex AI
GOOGLE_CLOUD_PROJECT=
VERTEX_AI_LOCATION=us-central1- โ Development environment working
- โ CI/CD pipeline configured - GitHub Actions workflow for builds and security
- โ Automated builds - Tests on Node 18.x and 20.x
- โ Security audits - Automated vulnerability scanning in CI
โ ๏ธ Production deployment configuration exists but not verified- โ Staging environment not set up
- โ Monitoring and logging not implemented
- Automated Build: Builds on every push/PR to main/develop branches
- Multi-Version Testing: Tests on Node.js 18.x and 20.x
- Linting: Automated ESLint checks
- Security Audits: Checks for high/critical vulnerabilities
- Environment Handling: Uses demo Firebase config for CI builds
- โ
Jest configuration set up (
jest.config.js,jest.setup.js) - โ
Test dependencies installed (
@testing-library/react,@testing-library/jest-dom, etc.). - โ
Unit tests created for
error-handlingandmock-data. - โ
Component test created for the
Buttoncomponent. - โ All tests are passing.
- โ Integration tests not yet implemented.
- โ E2E tests not yet implemented.
- Unit Tests: Jest configured with Next.js integration
- Test Location:
__tests__folders or*.test.tsfiles - Coverage: Collectible via
npm test -- --coverage - Example Test: Error handling utilities with comprehensive test cases
- Unit Tests: Jest + React Testing Library โ Configured
- Integration Tests: Firebase Emulators (planned)
- E2E Tests: Playwright or Cypress (planned)
- AI Flow Tests: Genkit testing utilities (planned)
- โ
Removed
empdirectory: Eliminated duplicated and unused code. - โ
Added
AGENTS.md: Provided context for AI agents. - โ Implemented Testing Suite: Added Jest and React Testing Library, and created new tests.
- โ Fixed Existing Tests: Resolved all pre-existing test failures.
- โ Configured CI/CD: Set up a GitHub Actions workflow for continuous integration.
- โ
Improved Environment Management: Created a
.env.examplefile.
- No Real LLM Integration: Currently uses simulated responses only
- Incomplete Payload Library: Backend exists but not connected to UI
- No PDF Report Generation: Analysis works but no downloadable reports
- Missing Advanced Flows: SPECTRE, TOXIN, ECHO, and full MAKER not implemented
- No Background Job Processing: Cloud Tasks not configured
- No Error Boundaries: React error boundaries not implemented
- Limited Error Handling: AI flow failures not gracefully handled
- No Retry Logic: Failed API calls don't retry
- Cache Strategy: Simple in-memory cache, not persistent
- No Rate Limiting: API endpoints not protected from abuse
- No Audit Trail: User actions not logged for security review
- Client-Side Secrets: Some validation logic only on client
- Missing CORS Configuration: May cause issues with external APIs
- No Pagination: Operations list loads all at once
- No Virtual Scrolling: Large message histories may cause lag
- No Image Optimization: Next.js Image component not used
- Bundle Size: Not optimized for production
- โ User analytics (Google Analytics, etc.)
- โ Error tracking (Sentry, etc.)
- โ Performance monitoring (Web Vitals, etc.)
- โ AI usage tracking (token consumption, costs, etc.)
- โ Operation success rate metrics
- โ User engagement metrics
- โ Implement comprehensive error handling
- โ Add React error boundaries
- โ Configure CI/CD pipeline
- โ Set up testing infrastructure
- โ Add ESLint configuration
- โ Implement loading states
- Install test dependencies and write more tests
- Set up monitoring and logging service integration
- Complete payload library UI and integration
- Add PDF report generation
- Implement OpenAI API client (ChatGPT)
- Implement Anthropic API client (Claude)
- Implement xAI API client (Grok)
- Add API key management system
- Implement cost tracking and quotas
- Add rate limiting and retry logic
- Implement SPECTRE flow with Cloud Tasks
- Implement TOXIN flow with Cloud Tasks
- Implement ECHO flow with Cloud Tasks
- Complete MAKER ontological engineering flows
- Add threat intelligence scraping
- Implement self-improving RAG system
- Add team collaboration features
- Implement role-based access control
- Add audit logging and compliance tools
- Create admin dashboard
- Add export/import for operations
- Implement operation templates
- Add real-time collaboration
- Implement operation sharing
- Add custom attack vector creation
- Create plugin architecture
- Add API for programmatic access
- Mobile app development
- โ
docs/blueprint.md- Original design specification - โ
docs/blueprint2.md- Detailed architecture - โ
docs/project overview.txt- Comprehensive overview - โ
docs/psuedocode.txt- Implementation guide - โ
README.md- Basic setup instructions - โ
VERTEX_AI_TESTING.md- AI integration testing guide
- โ API documentation for AI flows
- โ Component storybook or documentation
- โ Deployment guide
- โ Contributing guidelines
- โ Security best practices guide
- โ User manual or tutorials
- โ Architecture decision records (ADRs)
- Code style guide
- Pull request process
- Issue templates
- Code review checklist
- Branch naming conventions
- Commit message standards
- Repository: lucron9090/studio
- License: Not specified
- Maintainer: Not specified
- Issue Tracker: GitHub Issues (assumed)
The Unified Red Team Operations Platform has successfully implemented its core functionality, providing a solid foundation for LLM security testing. The application features a complete user interface for creating and executing attack operations, a sophisticated AI flow architecture powered by Vertex AI, and a robust Firebase backend for data persistence.
- โ 13 functional AI flows for attack generation and analysis
- โ Complete operation management system
- โ Real-time attack execution interface
- โ Secure multi-user authentication and authorization
- โ Comprehensive UI component library
- โ Production-ready Firestore integration
- Implement external LLM integration to enable real attacks
- Complete the payload library to enable learning from successes
- Add comprehensive testing to ensure reliability
- Implement monitoring and logging for production readiness
- Generate PDF reports to complete the analysis workflow
The platform is functional for development and testing but requires additional work in error handling, external integrations, and monitoring before production deployment.
Document Version: 1.0
Generated: January 2025
Next Review: After Phase 1 completion