Problem
- Analytics: Currently, CyberShield scans URLs in real-time but doesn't keep a history. The
README.md and dashboard.html propose a Threat Analytics Dashboard, but it is currently just a placeholder.
- Security: The backend server (
server.js) does not currently throttle incoming requests, which could allow malicious actors to spam the /check endpoint and exhaust the Google Safe Browsing API quota.
Proposed Solution
- Threat Analytics Dashboard: Store scan results locally using
localStorage for a demo version. Implement dashboard.js using Chart.js to render a "Safe vs. Threat" pie chart, a "Threat Types" bar chart, and populate a table showing recent scans.
- Backend Rate Limiting: Implement the
express-rate-limit package (already in package.json) to configure a limiter (e.g., max 100 requests per 15 minutes) on the /check POST endpoint.
Why It's Needed
- The dashboard fulfills a planned roadmap feature, giving users historical visibility into their scans and providing a more premium experience.
- Rate limiting is an essential security practice to protect the backend infrastructure and API quotas.
Alternatives Considered
- For analytics, a backend database was considered, but sticking to
localStorage (as suggested in the README) keeps the demo lightweight.
- For rate limiting, custom middleware could be written, but using the industry-standard
express-rate-limit is safer and easier to maintain.
Additional Context
I am very interested in implementing these features. I am comfortable with both Chart.js for the frontend and express middleware for the backend. Please let me know if you would like me to work on this, and I would be happy to be assigned to the issue!
Problem
README.mdanddashboard.htmlpropose a Threat Analytics Dashboard, but it is currently just a placeholder.server.js) does not currently throttle incoming requests, which could allow malicious actors to spam the/checkendpoint and exhaust the Google Safe Browsing API quota.Proposed Solution
localStoragefor a demo version. Implementdashboard.jsusingChart.jsto render a "Safe vs. Threat" pie chart, a "Threat Types" bar chart, and populate a table showing recent scans.express-rate-limitpackage (already inpackage.json) to configure a limiter (e.g., max 100 requests per 15 minutes) on the/checkPOST endpoint.Why It's Needed
Alternatives Considered
localStorage(as suggested in the README) keeps the demo lightweight.express-rate-limitis safer and easier to maintain.Additional Context
I am very interested in implementing these features. I am comfortable with both
Chart.jsfor the frontend andexpressmiddleware for the backend. Please let me know if you would like me to work on this, and I would be happy to be assigned to the issue!