CodeFort is an AI-native security platform that intercepts malicious GitHub pull requests, detects software supply chain poisoning, and stops CI/CD workflow injection attacks before code merges into production.
Powered by Barq-AIβa frontier multi-provider reasoning engine combining Qwen 2.5 Coder MoE and Google Gemini with real-time Google OSV telemetry grounding, deterministic backend risk scoring, and autonomous 1-click patch verification.
| Component | Target URL | Description |
|---|---|---|
| Firefox Add-on | addons.mozilla.org |
Official Reviewed & Approved Store Listing (1-Click Install) |
| Web Dashboard | codefort-web.vercel.app |
Cyber Brutalist UI for PR forensics, policy management, & multi-repo audits |
| Barq-AI Copilot Studio | codefort-web.vercel.app/chat |
Interactive AI security assistant & unified git diff code rewriter |
| Extension Setup Guide | codefort-web.vercel.app/extension |
Step-by-step browser extension installer & pairing assistant |
| Barq-AI Engine Repo | codefort-sec/barqai |
Dedicated AI reasoning engine, LoRA training pipeline, & benchmark datasets |
| Backend API Core | codefort-lilac.vercel.app/docs |
FastAPI OpenAPI 3.0 documentation, detection engines, & remediation endpoints |
| Chrome Extension | v0.1.3 (.zip) |
Manifest V3 extension with PR badges, inline diff warnings, & side panel |
| Firefox Binaries | v0.1.3 (.xpi) / .zip |
Standalone Mozilla WebExtension package (codefort-guard@codefort.sec) |
| Malicious Test Repo | vulnerable-test-repo |
Live attack playground with adversarial PRs (#1, #2, #3) |
| Clean Baseline Repo | clean-test-repo |
Clean baseline repository verifying 0 risk score PASS PRs |
Humans miss subtle typosquats, remote lifecycle droppers, and workflow privilege escalations during code review. Traditional linters emit noisy false positives and lack the context to understand multi-stage exploits.
Barq-AI solves this by coupling frontier LLM reasoning with deterministic static analysis and vulnerability databases:
- Grounded Evidence Citations (
[EVIDENCE: ...]): Never hallucinates CVE numbers or false threats. Every claim is anchored to concrete AST and OSV telemetry. - Autonomous 1-Click Remediation: Synthesizes verified unified git diffs (
clean_patch) tested in-memory to confirm 0 regressions. - Developer-Native Workflow: Injected directly into GitHub PRs via our approved browser extension, GitHub Checks API, and web dashboard.
flowchart TD
subgraph GitHub["GitHub Platform"]
PR["Pull Request Created / Synced"]
DOM["GitHub PR View & Diff Viewer"]
end
subgraph Extension["CodeFort Guard Extension (Chrome & Firefox)"]
SW["Service Worker (Cache & Alerts)"]
CS["Content Script (Observer & DOM Injection)"]
Badge["PR Status Badge (PASS / REVIEW / BLOCK)"]
LineWarn["Inline Diff Warnings & 'Fix with BARQAI'"]
SidePanel["BARQAI Side Panel Cockpit"]
end
subgraph Backend["FastAPI Detection & Remediation Engine"]
Router["API Gateway /api/v1"]
E1["Static Shell & AST Dropper Analyzer"]
E2["Dependency Intel (OSV + Levenshtein)"]
E3["Workflow Linter (GitHub Actions AST)"]
E4["Dynamic Sandbox Telemetry"]
Correlator["Cross-Engine Threat Correlator"]
Policy["Deterministic Policy & Risk Scorer (0-100)"]
BarqAI["Barq-AI Reasoning (Qwen 2.5 Coder + Gemini)"]
Verifier["In-Memory PatchVerifier (0 Regressions)"]
end
subgraph WebApp["Web Dashboard (Next.js 14)"]
Dash["/dashboard β Multi-Repo Audits"]
Chat["/chat β Barq-AI Copilot & Code Rewriter"]
Foren["/scans/[id] β Forensic Breakdown & Fixes"]
end
PR -->|Webhook / API| Router
DOM -->|Injected by| CS
CS <--> SW <--> Router
CS --> Badge & LineWarn & SidePanel
Router --> E1 & E2 & E3 & E4 --> Correlator --> Policy --> BarqAI --> Verifier
Router <--> WebApp
- Monitors lifecycle hooks (
preinstall,postinstall,prepare) while ignoring benign build tasks (build,test,start). - Intercepts remote execution pipes (
curl | bash,wget | sh), base64 obfuscation (eval(Buffer.from)), and reverse shells. - Zero False-Positive Guarantee: 0.0% false alarm rate on benign utility libraries.
- Evaluates package manifests against the live Google OSV (Open Source Vulnerability) database for known CVEs/GHSAs across npm, PyPI, and Go.
- Heuristic Levenshtein distance matching with length threshold (
$\ge 5$ chars) and curated whitelists (jest,vite,eslint,zod).
- Flags privilege escalation in GitHub Actions (e.g.
pull_request_targetchecking out untrusted fork branches). - Detects excessive
write-allpermission scopes and untrusted context interpolation (${{ github.event.pull_request.title }}).
- Dual-Provider Architecture: Google Gemini (
gemini-3.8-flash) cascading to Qwen 2.5 Coder 32B Instruct with a 0ms deterministic fail-safe. - In-Memory Verification: Every synthesized patch is syntax-checked and re-scanned in-memory to prove vulnerability eradication with zero regressions.
Tested via python -m app.ai.eval_suite --compare against standard supply-chain attack benchmarks:
| Evaluation Metric | Qwen 2.5 Coder 32B | Google Gemini 1.5 Flash | Deterministic Fail-Safe |
|---|---|---|---|
| Verdict Accuracy | 100.0% (4/4) | 100.0% (4/4) | 100.0% (4/4) |
| Evidence Grounding Rate | 100.0% | 100.0% | 100.0% |
| Remediation Viability | 100.0% | 100.0% | 100.0% |
| Independent Patch Verify | 100.0% (0 Regressions) | 100.0% (0 Regressions) | 100.0% (0 Regressions) |
| False Positive Resilience | 100.0% | 100.0% | 100.0% |
| Average Latency | 0.17s | 0.16s | 0.15s |
| OSV 20-Case Benchmark | 20/20 (100%) | 20/20 (100%) | 20/20 (100%) |
| Scenario | Live PR Demo | Attack Vector | Detection Rule | Verdict | Risk Score | Remediation |
|---|---|---|---|---|---|---|
01_malicious_preinstall |
vulnerable-test-repo#1 |
curl | bash C2 dropper in package.json |
npm.lifecycle.preinstall |
BLOCKED |
100 / 100 | Verified Fix |
02_typosquat_dependency |
vulnerable-test-repo#2 |
Typosquatted package reqeusts |
dep.typosquat |
REVIEW |
65 / 100 | Verified Fix |
03_unsafe_workflow_injection |
vulnerable-test-repo#3 |
pull_request_target + write-all |
workflow.target.checkout |
BLOCKED |
100 / 100 | Verified Fix |
04_clean_feature_pr |
clean-test-repo#1 |
Benign AST math parser | N/A (clean baseline) | PASS |
0 / 100 | Clean Baseline |
Interactive installer & pairing guide: codefort-web.vercel.app/extension
- Open CodeFort Guard on Firefox Add-ons (AMO).
- Click + Add to Firefox. The extension activates immediately with automatic updates!
- Download
codefort-guard-chrome-v0.1.3.zipand extract it. - Go to
chrome://extensions/and toggle Developer mode (top-right). - Click Load unpacked and select the extracted folder.
- Generate a single-use token on
codefort-web.vercel.app/settings. - Click the extension toolbar icon, paste the token, and click Pair Extension (status turns green
ONLINE).
- Node.js
$\ge 18$ - Python
$\ge 3.11$ (uvrecommended)
# 1. Clone repository
git clone https://github.com/codefort-sec/codefort.git
cd codefort
# 2. Run Backend API (FastAPI)
cd services/api
uv sync
uv run uvicorn app.main:app --reload --port 8000
# 3. Run Web Dashboard (Next.js 14)
cd ../../apps/web
npm install
npm run dev
# 4. Build & Package Browser Extension
cd ../extension
npm install
npm run package
# Packages Chrome ZIP, Firefox XPI, and syncs to web downloads
# 5. Run Backend Tests & Benchmark
cd ../../services/api
uv run pytest tests/
python -m app.ai.eval_suite --comparecodefort/
βββ apps/
β βββ web/ # Next.js 14 Cyber Brutalist Dashboard & Barq-AI Copilot
β β βββ app/ # /dashboard, /chat, /extension, /settings, /scans/[id]
β βββ extension/ # CodeFort Guard MV3 Extension (Vite + React, IIFE content script)
β βββ public/ # Chrome & Firefox manifest definitions (Gecko ID configured)
β βββ src/ # SidePanel.tsx, github-observer.ts, pr-header-injector.tsx
βββ services/
β βββ api/ # FastAPI Core, Multi-Engine Scanners & Barq-AI
β βββ app/ai/ # eval_suite.py (benchmarks), knowledge_base.py, dataset.jsonl
β βββ app/api/v1/ # repositories, scans, extension, remediation, webhooks
β βββ app/services/engines/# barqai.py, remediation_engine.py, patch_verifier.py
β βββ tests/ # 82 automated pytest suites (100% pass rate)
βββ scripts/
βββ demo_scan.py # CLI terminal PR security scanner demonstration
- Lead Platform Maintainer: Mohammed Nishal (@nichroot)
- Lead AI Maintainer: Muhammad Farsheen (@muhammadfarshi)
- Organization: CodeFort Security
- License: Apache 2.0