A developer-first security platform that helps you find and fix security issues before they ship. SafeDev scans GitHub repositories for secrets, validates JWTs, and delivers actionable security insights—all in minutes.
Detect hardcoded secrets, API keys, and risky patterns across your repositories with real-time streaming results.
- Secret Detection: Finds common secret formats (API keys, tokens, credentials, private keys)
- Real-time Scanning: Stream results as files are analyzed
- Context-Aware Findings: Get file/line pointers with clear explanations
- Remediation Guidance: Actionable steps to fix detected issues
Decode, validate, and analyze JWTs for expiry issues, weak algorithms, and claim vulnerabilities.
- Instant Decoding: Parse header, payload, and signature details
- Security Validation: Check expiry, algorithm strength, and claim configurations
- Risk Highlighting: Flag weak/unsafe token patterns
- Best Practice Guidance: Get recommendations for secure JWT handling
Get a clear security score with prioritized remediation steps tailored to your codebase.
- Unified Security Score: 0-100 score with breakdown by category
- Prioritized Fixes: Ranked by impact and exploitability
- Actionable Plans: Checklist-style remediation steps
- Progress Tracking: Rescan and compare improvements over time
- Framework: Next.js 15 with App Router
- Language: TypeScript
- Styling: Tailwind CSS
- Animations: Framer Motion
- Authentication: NextAuth.js with GitHub OAuth
- AI Analysis: OpenAI GPT-4o
- Deployment: Vercel
safedev/
├── app/ # Next.js app directory
│ ├── about/ # About page
│ ├── api/ # API routes
│ │ ├── ai-summary/ # AI-powered security analysis
│ │ ├── auth/ # NextAuth configuration
│ │ └── github/ # GitHub scanning endpoints
│ ├── features/[slug]/ # Individual feature pages
│ ├── github/ # GitHub scanner page
│ └── page.tsx # Homepage
├── components/ # React components
│ ├── AISecurityModal.tsx # AI analysis modal
│ ├── GitHubRepoCard.tsx # Repository card component
│ ├── GithubIcon.tsx # GitHub icon
│ ├── Hero.tsx # Hero section
│ └── ...
├── lib/ # Utility functions
│ ├── scanner.ts # Repository scanning logic
│ └── types.ts # TypeScript type definitions
└── public/ # Static assets
- Node.js 18+
- npm, yarn, pnpm, or bun
- GitHub account for OAuth
- OpenAI API key (for AI analysis feature)
- Clone the repository:
git clone https://github.com/yourusername/SafeDev.git
cd SafeDev/safedev- Install dependencies:
npm install
# or
yarn install
# or
pnpm install- Set up environment variables:
Create a .env file in the safedev directory:
# NextAuth
NEXTAUTH_URL=http://localhost:3000
NEXTAUTH_SECRET=your-secret-here
# GitHub OAuth
GITHUB_ID=your-github-oauth-app-id
GITHUB_SECRET=your-github-oauth-app-secret
# OpenAI (for AI analysis)
OPENAI_API_KEY=your-openai-api-key- Run the development server:
npm run dev
# or
yarn dev
# or
pnpm dev- Open http://localhost:3000 in your browser.
- Go to GitHub Settings → Developer settings → OAuth Apps
- Create a new OAuth App with:
- Homepage URL:
http://localhost:3000 - Authorization callback URL:
http://localhost:3000/api/auth/callback/github
- Homepage URL:
- Copy the Client ID and Client Secret to your
.envfile
The GitHub scanner (lib/scanner.ts) recursively walks through repository contents and:
- Detects hardcoded secrets using pattern matching
- Identifies risky configurations (e.g., privileged Docker containers)
- Scans for exposed
.envfiles and credentials - Provides real-time status updates via callbacks
The AI summary endpoint (app/api/ai-summary/route.ts):
- Collects repository contents (up to 50 files)
- Sends code to OpenAI GPT-4o for analysis
- Returns security score, risks, quick wins, and recommendations
NextAuth.js is configured to use GitHub OAuth, allowing users to:
- Sign in with their GitHub account
- Access private repositories (with proper scopes)
- Scan repositories they have access to
npm run build
npm startThe easiest way to deploy SafeDev is using Vercel:
- Push your code to GitHub
- Import the project in Vercel
- Add environment variables in Vercel dashboard
- Deploy
SafeDev is open source! Contributions are welcome:
- Fork the repository
- Create a feature branch (
git checkout -b feature/amazing-feature) - Commit your changes (
git commit -m 'Add amazing feature') - Push to the branch (
git push origin feature/amazing-feature) - Open a Pull Request
This project is open source and available under the MIT License.
- Built with Next.js
- UI components styled with Tailwind CSS
- Animations powered by Framer Motion
- AI analysis using OpenAI GPT-4o
SafeDev - Security that helps you ship faster, not get in your way.