Skip to content

Commit cdccdcf

Browse files
committed
docs(SECURITY): update recent security fixes section with resolved issues and solutions
1 parent 998126e commit cdccdcf

File tree

1 file changed

+50
-50
lines changed

1 file changed

+50
-50
lines changed

docs/SECURITY.md

Lines changed: 50 additions & 50 deletions
Original file line numberDiff line numberDiff line change
@@ -4,56 +4,6 @@
44

55
This document outlines the security measures implemented in the ThinkRED project and provides guidance for maintaining security best practices.
66

7-
## Recent Security Fixes
8-
9-
### 1. Sensitive Data Exposure (Issue #42) ✅ RESOLVED
10-
11-
**Problem**: Google Apps Script deployment IDs were hardcoded in source files.
12-
13-
**Solution**:
14-
- Moved deployment ID to environment variables
15-
- Created proper environment configuration files
16-
- Updated scripts to use environment variables
17-
- Added validation for missing deployment IDs
18-
19-
**Configuration**:
20-
```bash
21-
# Set in your environment or .env.local file
22-
export VITE_GOOGLE_APPS_SCRIPT_DEPLOYMENT_ID=your_deployment_id_here
23-
```
24-
25-
### 2. Content Security Policy Violations (Issue #43) ✅ RESOLVED
26-
27-
**Problem**: CSP headers needed improvement to prevent XSS attacks.
28-
29-
**Solution**:
30-
- Enhanced CSP headers in both HTML meta tags and HTTP headers
31-
- Added support for Google Apps Script domains
32-
- Implemented strict transport security
33-
- Added proper form-action policies
34-
35-
**Current CSP Policy**:
36-
```
37-
Content-Security-Policy:
38-
default-src 'self';
39-
script-src 'self' 'unsafe-inline' 'unsafe-eval';
40-
style-src 'self' 'unsafe-inline' https://fonts.googleapis.com;
41-
font-src 'self' https://fonts.gstatic.com;
42-
img-src 'self' data: https:;
43-
connect-src 'self' https://api.thinkred.tech https://script.google.com https://script.googleusercontent.com;
44-
object-src 'none';
45-
media-src 'self';
46-
child-src 'none';
47-
frame-src 'none';
48-
worker-src 'self';
49-
manifest-src 'self';
50-
frame-ancestors 'none';
51-
base-uri 'self';
52-
form-action 'self' https://script.google.com;
53-
upgrade-insecure-requests;
54-
block-all-mixed-content
55-
```
56-
577
## Environment Variables Security
588

599
### Required Variables
@@ -202,6 +152,56 @@ If security issues are detected:
202152
- ✅ Principle of least privilege
203153
- ✅ Audit access logs
204154

155+
## Recent Security Fixes
156+
157+
### 1. Sensitive Data Exposure (Issue #42) ✅ RESOLVED
158+
159+
**Problem**: Google Apps Script deployment IDs were hardcoded in source files.
160+
161+
**Solution**:
162+
- Moved deployment ID to environment variables
163+
- Created proper environment configuration files
164+
- Updated scripts to use environment variables
165+
- Added validation for missing deployment IDs
166+
167+
**Configuration**:
168+
```bash
169+
# Set in your environment or .env.local file
170+
export VITE_GOOGLE_APPS_SCRIPT_DEPLOYMENT_ID=your_deployment_id_here
171+
```
172+
173+
### 2. Content Security Policy Violations (Issue #43) ✅ RESOLVED
174+
175+
**Problem**: CSP headers needed improvement to prevent XSS attacks.
176+
177+
**Solution**:
178+
- Enhanced CSP headers in both HTML meta tags and HTTP headers
179+
- Added support for Google Apps Script domains
180+
- Implemented strict transport security
181+
- Added proper form-action policies
182+
183+
**Current CSP Policy**:
184+
```
185+
Content-Security-Policy:
186+
default-src 'self';
187+
script-src 'self' 'unsafe-inline' 'unsafe-eval';
188+
style-src 'self' 'unsafe-inline' https://fonts.googleapis.com;
189+
font-src 'self' https://fonts.gstatic.com;
190+
img-src 'self' data: https:;
191+
connect-src 'self' https://api.thinkred.tech https://script.google.com https://script.googleusercontent.com;
192+
object-src 'none';
193+
media-src 'self';
194+
child-src 'none';
195+
frame-src 'none';
196+
worker-src 'self';
197+
manifest-src 'self';
198+
frame-ancestors 'none';
199+
base-uri 'self';
200+
form-action 'self' https://script.google.com;
201+
upgrade-insecure-requests;
202+
block-all-mixed-content
203+
```
204+
205205
---
206206

207207
**Last Updated**: June 29, 2025

0 commit comments

Comments
 (0)