- Fonseka S.A.N.P (IT22192400) — Implemented Google OAuth (SSO) & fixed Denial of Service (ReDoS)
- Tiny H.D.K (IT22060976) — Fixed Sensitive Data Exposure & implemented Rate Limiting
- Perera R.L.S.B (IT22256164) — Fixed CSRF vulnerabilities & removed Hardcoded URLs
- Rangika G.K.H (IT22178336) — Fixed SQL Injection & performed Dependency Updates
- Source (pre-fixes): 🔗 Original GitHub Repository
Note: The original repository commit history predates the semester start date (as required in the assignment brief).
- Modified Project (with fixes): 🔗 Secured GitHub Repository
- Key Branches:
main→ Stable branch (final secured version)nuwani-oauth→ OAuth + DoS (ReDoS) work branchtiny-rate-limit→ Sensitive Data Exposure + Rate Limitinghasindu-sql→ SQL Injection + Dependency updatessadeesha-csrf→ CSRF + Hardcoded URL fixes
📽️ YouTube Walkthrough of Vulnerabilities, Fixes & OAuth Implementation
- Duration: ≤ 10 minutes
- Each member explains their 2 vulnerabilities (or OAuth work)
- Shows both before & after fixes with code + tool screenshots
Across the application, we identified 12 major vulnerabilities using SonarQube and GitHub Security:
- Lack of OAuth (implemented via Google)
- Regex Injection → DoS (ReDoS)
- SQL Injection
- Missing Rate Limiting
- CSRF (Cross-Site Request Forgery)
- Stack Trace Exposure
- Double Escaping
- Weak Authentication Implementation
- Outdated Dependencies
- Denial of Service (DoS via resource exhaustion)
- Sensitive Data Exposure
- Hardcoded URLs
Each of these was fixed or mitigated with secure coding practices, validated through SonarQube Quality Gates, Postman tests, and GitHub’s dependency scans.
# Clone repository
git clone <INSERT MODIFIED REPO LINK>
cd mainapp/backend
# Setup environment variables
cp .env
# Required fields in .env:
# PORT=5003
# MONGO_URI=mongodb+srv://<...>
# SESSION_SECRET=<your-secret>
# FRONTEND_URL=http://localhost:3003
# GOOGLE_CLIENT_ID=<your-client-id>
# GOOGLE_CLIENT_SECRET=<your-client-secret>
# GOOGLE_CALLBACK_URL=http://localhost:5003/auth/google/callback
# Install dependencies
npm install
# Start frontend & backend
npm start
## How to run
```bash
cd mainapp/backend
cp .env
# .env requires:
# PORT=5003
# MONGO_URI=mongodb+srv://<...>