Dama12 commited on
Commit
d55c3ba
·
1 Parent(s): c78b0fb

docs: create SECURITY.md policy file

Browse files
Files changed (1) hide show
  1. SECURITY.md +40 -0
SECURITY.md ADDED
@@ -0,0 +1,40 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # Security Policy & Implementation Details (Scoinvestigator)
2
+
3
+ This document outlines the security features, updates, policies, and vulnerability reporting procedures for the Scoinvestigator SaaS platform backend.
4
+
5
+ ## 🛡️ Implemented Security Measures
6
+
7
+ The following security systems have been integrated into the Scoinvestigator production environment:
8
+
9
+ ### 1. Strict Cross-Origin Resource Sharing (CORS)
10
+ To prevent unauthorized domains from invoking K2 Think backend endpoints:
11
+ - The `ALLOWED_ORIGINS` middleware setting is restricted strictly to authorized production and staging hosts.
12
+ - **Allowed Hosts:**
13
+ - `https://www.scoinvestigator.com`
14
+ - `https://scoinvestigator.com`
15
+ - `https://ai-scientific-coinvestigator-ui.vercel.app` (Staging UI)
16
+ - `http://localhost:3000` (Local Frontend Development)
17
+
18
+ ### 2. IP-Based Rate Limiting (SlowAPI)
19
+ To protect the AI analysis pipeline from brute-force exploitation and API cost flooding, IP-based request limits are enforced globally:
20
+ - **Authentication & Onboarding:**
21
+ - `/api/v1/users/login` — Maximum `5 requests per minute` per IP.
22
+ - `/api/v1/users/register` — Maximum `3 requests per minute` per IP.
23
+ - **AI Processing Engine:**
24
+ - `/api/v1/analysis/{project_id}` (Core K2 Engine Trigger) — Maximum `2 requests per minute` per IP.
25
+
26
+ Exceeding these limits triggers an automatic `HTTP 429 Too Many Requests` response.
27
+
28
+ ---
29
+
30
+ ## 🔒 Vulnerability Reporting
31
+
32
+ If you discover a security vulnerability in this project, please report it immediately:
33
+ - **Contact:** Send an email to [soumanadama93@gmail.com](mailto:soumanadama93@gmail.com).
34
+ - Please do not open public GitHub issues for security vulnerabilities.
35
+
36
+ ---
37
+
38
+ ## 🛠️ Security Configuration Updates
39
+
40
+ All future security hardening updates (CSP headers, token encryption, database SSL config) should be documented here to maintain a clean production trail.