TechNodes2-0 / ElectiveHub

ElectiveHub is an Education Management System designed to simplify and enhance the management of student information and elective subject selection in educational institutions. It offers a suite of applications for students, teachers, and administrators, providing a user-friendly platform.
https://electivehub.onrender.com
MIT License
82 stars 124 forks source link

[Feat]: rate-limiting, helmet and nosql injection protection in server #108

Open Puskar-Roy opened 1 month ago

Puskar-Roy commented 1 month ago

Is your feature request related to a problem? Please describe.

Problem Statement:

Rate Limiting

Without rate limiting, the server is vulnerable to abuse, such as brute-force attacks, by allowing a single user or IP address to send a large number of requests in a short period, potentially leading to service disruption or denial of service.

Helmet

Helmet helps secure the server by setting various HTTP headers to protect against common vulnerabilities, such as XSS (Cross-Site Scripting), clickjacking, etc., reducing the risk of attacks and improving overall security posture.

NoSQL Injection Protection

Without proper protection, the server is susceptible to NoSQL injection attacks, where attackers manipulate input to access or modify data in the NoSQL database, potentially leading to data breaches or data corruption.

Describe the solution you'd like.

Solution

Rate Limiting

Implementing rate limiting ensures that each user or IP address can only send a certain number of requests within a specified time frame, mitigating the risk of abuse and ensuring fair usage of server resources.

Helmet

Integrating Helmet sets secure HTTP headers, such as X-XSS-Protection, Strict-Transport-Security, etc., which helps prevent various types of attacks, enhancing the overall security of the server.

NoSQL Injection Protection

By sanitizing and validating input, implementing prepared statements, and using ORM libraries with built-in protection, the server can prevent NoSQL injection attacks, safeguarding the integrity and confidentiality of data in the NoSQL database.

Describe alternatives you've considered.

Alternatives

Alternatives to adding rate-limiting, Helmet, and NoSQL injection protection features include implementing custom logic, manually configuring headers, creating custom middleware, using input sanitization, and employing ORM libraries. However, dedicated solutions offer more robust and comprehensive protection against common security vulnerabilities.

Additional context.

No response

Show us the magic with screenshots

No response

Checklist

anshdeep0504 commented 1 month ago

Hey, allow me to work on this under GSSOC' 2024