This project is part of the SE4030 Secure Software Development module.
Our goal was to identify, analyze, and fix security vulnerabilities in an existing web/mobile application and implement an OAuth/OpenID Connect flow (Google OAuth) as a new security feature.
| Name | Index Number | Contribution |
|---|---|---|
| Member 1 | IT22573896 | OAuth Implementation, Missing CSRF Protection |
| Member 2 | IT22574572 | Cross domain misconfiguration, Hidden file found |
| Member 3 | IT22603654 | Cross domain javaScript source file inclusion, Missing Anti-Clickjaking Header, X-content-type-options header missing |
| Member 4 | IT22028464 | CSP Header Not Set, Missing Anti-Clickjaking Header, SQL Injection |
- Original Repository - Frontend (before fixes): GitHub Link
- Original Repository - Backend (before fixes): GitHub Link
- Modified Repository (after vulnerability fixes & OAuth/CSRF implementation): GitHub Link
- YouTube Link
(≤10 minutes, explaining vulnerabilities, fixes, and OAuth integration)
-
Install Dependencies:
- For the frontend, navigate to the
frontenddirectory and run:npm install
- For the backend, navigate to the
backenddirectory and run:npm install
- For the frontend, navigate to the
-
Run the Application:
- For the frontend, navigate to the
frontenddirectory and run:npm run dev
- For the backend, navigate to the
backenddirectory and run:npm start
- For the frontend, navigate to the
-
Environment Variables:
-
Create a
.envfile in thebackenddirectory with the following variables:PORT=3000 MONGO_URL=mongodb://localhost:27017/dormlk JWT_SECRET=your_jwt_secret GOOGLE_CLIENT_ID=your_google_client_id GOOGLE_CLIENT_SECRET=your_google_client_secret GOOGLE_REDIRECT_URI=http://localhost:3000/auth/google/callback -
Create a
.envfile in thefrontenddirectory with the following variables:VITE_API_URL=http://localhost:3000 VITE_GOOGLE_CLIENT_ID=your_google_client_id -
Replace
your_jwt_secret,your_google_client_id, andyour_google_client_secretwith your actual values. -
For Google OAuth, you need to set up a project in the Google Developer Console and obtain your
GOOGLE_CLIENT_IDandGOOGLE_CLIENT_SECRET. -
Ensure that the
GOOGLE_CLIENT_IDandGOOGLE_CLIENT_SECRETare set up correctly in your Google Developer Console with the appropriate redirect URIs. -
For local development, you can use
http://localhost:3000/auth/google/callbackas the redirect URI. -
For production, ensure to set the redirect URI to your live application URL.
-
Make sure to add the
GOOGLE_CLIENT_IDandGOOGLE_CLIENT_SECRETto your environment variables in your hosting service (e.g., Heroku, AWS, etc.) if deploying the application.
-