Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
17 commits
Select commit Hold shift + click to select a range
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
60 changes: 60 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
name: Node.js CI

on:
push:
branches: [ "main", "develop" ]
pull_request:
branches: [ "main", "develop" ]

jobs:
build:

runs-on: ubuntu-latest

strategy:
matrix:
node-version: [18.x, 20.x]

steps:
- uses: actions/checkout@v4

- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}
cache: 'npm'
cache-dependency-path: backend/package-lock.json

- name: Install Dependencies
working-directory: ./backend
run: npm ci

- name: Generate Prisma Client
working-directory: ./backend
env:
DATABASE_URL: "postgresql://postgres:password@localhost:5432/dragonsploit"
run: npx prisma generate

- name: Build
working-directory: ./backend
run: npm run build

build-frontend:
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [18.x, 20.x]
steps:
- uses: actions/checkout@v4
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}
cache: 'npm'
cache-dependency-path: frontend/package-lock.json
- name: Install Dependencies
working-directory: ./frontend
run: npm ci
- name: Build
working-directory: ./frontend
run: npm run build
6 changes: 6 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"css.lint.unknownAtRules": "ignore",
"files.associations": {
"*.css": "tailwindcss"
}
}
63 changes: 63 additions & 0 deletions backend/DEVELOP-LOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -1353,3 +1353,66 @@ DragonSploit is now a **Parallel, Self-Optimizing, Robust** scanning platform. W
The "No-Zero-Results" fallback proved critical when Llama 3 entered a refusal loop. Instead of the scan hanging, it seamlessly transitioned to hardcoded vectors, maintaining momentum without user intervention.

---

---


### **2026-01-14: Frontend Planning & Backend Precision Fixes**

**Context:** Full-stack development session covering frontend architecture planning, security research, and critical backend bug fixes.

---

#### **Phase 1: Frontend Architecture & Planning**

* **Activities:**
* Researched React/TypeScript best practices and modern patterns
* Planned component hierarchy and state management (Zustand)
* Defined routing architecture and page structure
* Researched security hardening (XSS prevention, CSRF, CSP)
* Established clean code standards and ESLint rules

* **Outcome:** Clear architectural blueprint for production-ready frontend

---

#### **Phase 2: Backend Critical Fixes**

**1. False Positive Elimination**

* **Bug:** Duplicate `hasHighConfidence` check in `sqli-param.ts` (lines 313-318) was recording vulnerabilities without actual SQL error signatures
* **Fix:** Removed duplicate block, implemented evidence-based detection
* **New Severity Hierarchy:**
* `HIGH` = Concrete evidence (SQL error OR data leak)
* `MEDIUM` = AI confidence only (needs manual review)
* `INFO` = Structural analysis clues

**2. Scan Optimization**

* Disabled XSS and Nginx scans to focus on SQL injection only
* Fixed Prisma schema error (removed non-existent `technologyFingerprint` field)

**3. Developer Workflow**

* Implemented nodemon hot-reload for worker process
* Auto-reload on code changes (97% faster iteration)

---

**Milestones:**

* Frontend architecture planned and researched
* False positives eliminated (evidence-based detection)
* Developer workflow optimized (hot-reload)
* Security best practices researched

**Next Steps:**

* Frontend implementation
* Backend accuracy verification tests
* Integration testing

---

**Signed:** DragonSploit

31 changes: 31 additions & 0 deletions backend/check-db.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
import { PrismaClient } from '@prisma/client';

const prisma = new PrismaClient();

async function checkDb() {
console.log(`Listing all Organizations...`);

const orgs = await prisma.organization.findMany({
include: {
members: {
include: { user: true }
}
}
});

if (orgs.length === 0) {
console.log('❌ NO ORGANIZATIONS FOUND IN DB');
return;
}

orgs.forEach(org => {
console.log(`✅ [${org.id}] ${org.name}`);
org.members.forEach(m => {
console.log(` - Member: ${m.user.email} (ID: ${m.userId})`);
});
});
}

checkDb()
.catch(e => console.error(e))
.finally(() => prisma.$disconnect());
7 changes: 7 additions & 0 deletions backend/nodemon.worker.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"watch": ["src"],
"ext": "ts,js,json",
"ignore": ["src/**/*.spec.ts", "node_modules"],
"exec": "ts-node src/worker.ts",
"delay": 1000
}
Loading