Skip to content

Repository files navigation

Fortify

AI-powered security scanning platform that validates AI-generated code, dependencies, and vulnerabilities in real-time. Designed for low false positives (<1%), auto-fixes, and seamless integration into developer workflows.

πŸš€ Overview

Fortify addresses the surge in security vulnerabilities from AI-assisted coding by providing specialized scanning, detection, and automated fixing capabilities. As AI tools enable faster coding, they also introduce risks through unreviewed code and risky dependencies. Fortify helps developers and security teams maintain security without slowing down velocity.

Key Features

  • AI-Powered Analysis: Uses Claude Code SDK for intelligent vulnerability detection
  • Real-Time Scanning: Integrates into developer workflows with minimal friction
  • Auto-Fix Generation: Automatically generates pull requests with security fixes
  • Low False Positives: Specialized AI models focused on accuracy (<1% false positive rate)
  • Multi-Language Support: JavaScript and Python (MVP), expandable to other languages
  • GitHub Integration: Seamless OAuth integration and repository access

πŸ—οΈ Architecture

Fortify follows a modern microservices architecture with clear separation of concerns:

β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”    β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”    β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚   Frontend      β”‚    β”‚   Scan Agent     β”‚    β”‚   Database      β”‚
β”‚   (Next.js)     │◄──►│   (FastAPI)      │◄──►│  (PostgreSQL)   β”‚
β”‚                 β”‚    β”‚                  β”‚    β”‚                 β”‚
β”‚ β€’ Dashboard     β”‚    β”‚ β€’ Job Queue      β”‚    β”‚ β€’ Scan Results  β”‚
β”‚ β€’ Scan Reports  β”‚    β”‚ β€’ Claude SDK     β”‚    β”‚ β€’ Vulnerabilitiesβ”‚
β”‚ β€’ User Auth     β”‚    β”‚ β€’ Git Cloning    β”‚    β”‚ β€’ User Data     β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜    β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜    β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
                              β”‚
                              β–Ό
                       β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
                       β”‚    Redis     β”‚
                       β”‚  (Job Queue) β”‚
                       β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜

πŸ“ Project Structure

fortify/
β”œβ”€β”€ frontend/           # Next.js web application
β”‚   β”œβ”€β”€ src/app/       # App Router pages and API routes
β”‚   β”œβ”€β”€ src/components/# React components and UI
β”‚   └── src/lib/       # Utilities and database client
β”œβ”€β”€ scan-agent/        # Python FastAPI scanning service
β”‚   β”œβ”€β”€ scan_agent/    # Core scanning logic
β”‚   β”‚   β”œβ”€β”€ server.py  # FastAPI server
β”‚   β”‚   β”œβ”€β”€ workers/   # Background job processing
β”‚   β”‚   β”œβ”€β”€ models/    # Data models and types
β”‚   β”‚   └── utils/     # Database, queue, and Redis utilities
β”‚   └── tests/         # Unit and integration tests
β”œβ”€β”€ db/                # Database schema and migrations
β”‚   β”œβ”€β”€ schema.prisma  # Prisma schema definition
β”‚   └── migrations/    # Database migration files
└── specs/             # Architecture and product documentation
    β”œβ”€β”€ architecture/  # Technical specifications
    └── product/       # Product requirements and user flows

πŸš€ Quick Start

Prerequisites

  • Node.js 18+ and npm/yarn
  • Python 3.11+
  • PostgreSQL database
  • Redis server
  • Anthropic API key (for Claude Code SDK)

1. Clone and Setup

git clone https://github.com/your-org/fortify.git
cd fortify

2. Database Setup

cd db
npm install
npx prisma generate
npx prisma db push
cd ..

3. Start the Scan Agent

cd scan-agent
pip install -r requirements.txt

# Configure environment
cp .env.example .env
# Edit .env with your database URL, Redis URL, and Anthropic API key

# Start the service
python -m scan_agent.server

4. Start the Frontend

cd frontend
npm install

# Configure environment
cp .env.example .env.local
# Edit .env.local with your database URL and GitHub OAuth credentials

# Start development server
npm run dev

5. Access the Application

πŸ”§ Development

Running Tests

# Backend tests
cd scan-agent
python -m pytest tests/

# Frontend tests  
cd frontend
npm test

Database Operations

cd db

# Apply migrations
npx prisma db push

# View database
npx prisma studio

# Reset database
npx prisma db reset

Docker Development

# Start all services
docker-compose up -d

# View logs
docker-compose logs -f

πŸ“š Documentation

All architecture and product documentation is stored in the specs/ directory:

Architecture Documentation (specs/architecture/)

  • mvp.md - Complete MVP architecture and implementation roadmap
  • scanner.md - Scan system architecture and current implementation
  • schema.md - Database schema and data models
  • frontend.md - Frontend architecture and UI specifications
  • integrations/github.md - GitHub integration specifications

Product Documentation (specs/product/)

  • mvp.md - Product requirements and MVP specifications
  • landing.md - Landing page requirements and conversion optimization
  • login-flow.md - Authentication flows and user onboarding
  • u/[username]/ - User experience flows and wireframes

πŸ” Security

Current Security Measures

  • Environment variable-based secrets management
  • Prisma ORM for SQL injection protection
  • Temporary workspace isolation for repository scanning
  • GitHub OAuth for secure authentication

Security Considerations

  • Repository code is cloned to temporary directories and cleaned up
  • No code execution - analysis only
  • Database operations use parameterized queries
  • API endpoints will include authentication in production

🚒 Deployment

Production Environment

  • Frontend: Deployed on Vercel/Netlify with Next.js
  • Scan Agent: Containerized FastAPI service on AWS/GCP
  • Database: Managed PostgreSQL (AWS RDS/Google Cloud SQL)
  • Queue: Managed Redis (AWS ElastiCache/Google Memorystore)

Environment Variables

# Database
DATABASE_URL=postgresql://user:password@localhost:5432/fortify

# Redis
REDIS_URL=redis://localhost:6379

# Authentication
NEXTAUTH_SECRET=your-secret-key
NEXTAUTH_URL=http://localhost:3000
GITHUB_ID=your-github-oauth-app-id
GITHUB_SECRET=your-github-oauth-app-secret

# AI Integration
ANTHROPIC_API_KEY=your-claude-api-key

🀝 Contributing

  1. Fork the repository
  2. Create a feature branch (git checkout -b feature/amazing-feature)
  3. Commit your changes (git commit -m 'Add amazing feature')
  4. Push to the branch (git push origin feature/amazing-feature)
  5. Open a Pull Request

Development Guidelines

  • Follow the coding standards defined in .cursorrules
  • Update documentation in specs/ for architectural changes
  • Add tests for new functionality
  • Use TypeScript for frontend code
  • Use Python type hints for backend code

πŸ“„ License

This project is proprietary. All rights reserved.

πŸ™‹β€β™‚οΈ Support

  • Documentation: Check the specs/ directory for detailed architecture and product docs
  • Issues: Create GitHub issues for bugs and feature requests
  • Development: See individual component READMEs for detailed setup instructions

Fortify - Securing AI-generated code, one scan at a time. πŸ›‘οΈ

Releases

Packages

Contributors

Languages