Skip to content

Commit 1d07402

Browse files
authored
docs: streamline security documentation (#2120)
1 parent 4e4607f commit 1d07402

File tree

5 files changed

+1083
-95
lines changed

5 files changed

+1083
-95
lines changed

.github/SECURITY.md

Lines changed: 60 additions & 95 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
1-
# Security Policy
1+
# Security Policy & Incident Response Plan
22

33
## Our Security Commitment
44

5-
The React Starter Kit team and community take the security of our project seriously. We appreciate the efforts of security researchers and believe that responsible disclosure of security vulnerabilities helps us ensure the security and privacy of all users.
5+
The React Starter Kit team takes security seriously. We appreciate responsible disclosure of vulnerabilities and are committed to working with security researchers to keep our project secure.
66

7-
We are committed to working with the community to verify, reproduce, and respond to legitimate reported vulnerabilities. Thank you for helping us maintain a secure foundation for modern web applications.
7+
This document outlines our security policy, incident response procedures, and how to report vulnerabilities.
88

99
## Scope
1010

@@ -38,84 +38,59 @@ We provide security updates for the most recent version of React Starter Kit ava
3838
| main | :white_check_mark: |
3939
| < main | :x: |
4040

41-
## Reporting a Vulnerability
42-
43-
**⚠️ Please DO NOT report security vulnerabilities through public GitHub issues, discussions, or pull requests.**
44-
45-
Instead, please send a detailed report to: **security@kriasoft.com**
46-
47-
To help us triage and validate your report efficiently, please include:
48-
49-
### Required Information
41+
## Incident Response
5042

51-
- **Title**: A clear, descriptive summary of the vulnerability
52-
- **Description**: A detailed explanation of the vulnerability and its potential impact
53-
- **Affected Component(s)**: Specific files, modules, or features affected (e.g., `apps/api/src/auth.ts`, Better Auth configuration, tRPC procedures)
54-
- **Steps to Reproduce**:
55-
1. Clear, numbered steps to reproduce the issue
56-
2. Include any necessary configuration or environment details
57-
3. Expected vs. actual behavior
58-
- **Proof of Concept (PoC)**: Working code, scripts, or screenshots demonstrating the vulnerability
59-
- **Impact Assessment**: Your assessment of the severity and potential impact:
60-
- Data exposure or leakage
61-
- Authentication/authorization bypass
62-
- Remote code execution
63-
- Denial of service
64-
- Cross-site scripting (XSS)
65-
- Other security impacts
43+
- **Report Security Issues**: `security@kriasoft.com`
44+
- **Initial Response**: Within 2 business days
45+
- **Critical Issues**: Escalated immediately to maintainers
6646

67-
### Optional Information
68-
69-
- **Suggested Fix**: If you have ideas for how to address the vulnerability
70-
- **References**: Links to similar vulnerabilities or relevant documentation
71-
- **Your Contact Information**: Name/alias for public credit and preferred contact method
72-
73-
## Disclosure Process
47+
## Reporting a Vulnerability
7448

75-
Once we receive your security report, we will follow this process:
49+
**⚠️ DO NOT report security vulnerabilities through public GitHub issues.**
7650

77-
### 1. Acknowledgment (Within 2 Business Days)
51+
Report to: **security@kriasoft.com**
7852

79-
We will acknowledge receipt of your vulnerability report and provide you with a tracking reference.
53+
### Include in Your Report
8054

81-
### 2. Initial Triage (Within 7 Business Days)
55+
1. **Description**: Clear explanation of the vulnerability and impact
56+
2. **Steps to Reproduce**: Minimal steps to demonstrate the issue
57+
3. **Proof of Concept**: Code or screenshots if applicable
58+
4. **Affected Version**: Branch or commit hash
59+
5. **Suggested Fix**: Optional recommendations
8260

83-
Our team will:
61+
## Incident Response Process
8462

85-
- Validate the vulnerability
86-
- Assess its impact and severity
87-
- Determine affected components
88-
- Provide you with an initial assessment and expected timeline
63+
### Severity Classification
8964

90-
### 3. Remediation (Target: 90 Days)
65+
We classify security incidents based on their potential impact:
9166

92-
We will:
67+
- **Critical (P0)**: Remote code execution, authentication bypass, data breach affecting all users
68+
- **High (P1)**: Privilege escalation, significant data exposure, XSS in authentication flows
69+
- **Medium (P2)**: Limited data exposure, XSS in non-critical areas, CSRF vulnerabilities
70+
- **Low (P3)**: Information disclosure, minor security misconfigurations
9371

94-
- Develop and test a fix for the vulnerability
95-
- Prepare security patches for affected versions
96-
- Request a CVE identifier from GitHub if appropriate
97-
- Coordinate the release timeline with you
72+
### Response Timeline
9873

99-
### 4. Public Disclosure
74+
| Severity | Initial Response | Fix Target | Disclosure |
75+
| -------- | ---------------- | ----------- | ------------ |
76+
| Critical | 2 days | 14 days | Upon patch |
77+
| High | 3 days | 30 days | Upon patch |
78+
| Medium | 5 days | 60 days | Upon patch |
79+
| Low | 7 days | Best effort | With release |
10080

101-
Once the patch is released:
81+
### How We Handle Reports
10282

103-
- We will publish a security advisory on GitHub
104-
- Full credit will be given to the reporter (unless you prefer to remain anonymous)
105-
- The advisory will include:
106-
- Description of the vulnerability
107-
- Impact assessment
108-
- Affected versions
109-
- Patched versions
110-
- Workarounds (if any)
111-
- Credits and acknowledgments
83+
1. **Acknowledge** - We confirm receipt within 2 business days
84+
2. **Validate** - We reproduce and assess the issue
85+
3. **Fix** - We develop and test a patch
86+
4. **Release** - We publish the fix and security advisory
87+
5. **Credit** - We acknowledge your contribution (unless you prefer anonymity)
11288

113-
## Communication Expectations
89+
## Working Together
11490

115-
- All security-related communications will be conducted via email
116-
- We will keep you informed throughout the remediation process
117-
- If our investigation determines that the issue is not a security vulnerability, we will explain our reasoning
118-
- We ask that you keep the vulnerability confidential until we've had adequate time to address it
91+
- We communicate via email and keep you informed of progress
92+
- We explain our decisions if we determine something isn't a vulnerability
93+
- Please keep issues confidential until patched
11994

12095
## Safe Harbor
12196

@@ -142,43 +117,33 @@ We greatly value the contributions of security researchers. With your permission
142117
- Add your name to our security acknowledgments
143118
- Provide a letter of appreciation upon request
144119

145-
## Security Best Practices for Users
146-
147-
While this policy covers vulnerabilities in the starter kit itself, we recommend all users follow these security best practices:
148-
149-
### Configuration & Secret Management
120+
## Security Quick Start
150121

151-
- Do commit `.env` for non-sensitive defaults and documentation; never store secrets (API keys, tokens, DB URLs) in `.env`.
152-
- Do not commit secrets. Store them in:
153-
- `.env.local` (developer/runner-specific, gitignored)
154-
- `terraform.tfvars` (infra inputs that may include secrets, gitignored)
155-
- a secret manager for CI/CD and production:
156-
- GitHub Actions: Encrypted Secrets (repo/org/environment)
157-
- Cloudflare Workers: wrangler secret put / dashboard secrets
158-
- Google Cloud: Secret Manager
159-
- Ensure `.env.local` and `terraform.tfvars` are in `.gitignore` and never pushed.
160-
- Browser safety: Never reference server-only secrets in client code. Only expose explicitly public variables intended for the browser (e.g., values with a `PUBLIC_` prefix). Review bundles to ensure no server secrets are included.
161-
- Rotation and scanning: Rotate secrets regularly and enable secret scanning (GitHub Advanced Security, trufflehog, git-secrets) to prevent accidental leaks.
122+
### Essential Setup
162123

163-
### Authentication
124+
```bash
125+
# Check for vulnerabilities
126+
bun audit
164127

165-
- Implement proper session management
166-
- Use secure password policies
167-
- Enable multi-factor authentication where appropriate
168-
- Regularly update Better Auth and related dependencies
128+
# Enable GitHub security features
129+
# Settings > Security > Code security and analysis
130+
# ✓ Dependabot alerts
131+
# ✓ Secret scanning
132+
```
169133

170-
### Dependencies
134+
### Secret Management
171135

172-
- Regularly run `bun audit` to check for vulnerable dependencies
173-
- Keep all dependencies up to date
174-
- Review dependency licenses and security advisories
136+
- **Never commit secrets** - Use `.env.local` (gitignored) for local development
137+
- **Production secrets** - Store in Cloudflare Workers secrets or GitHub Actions secrets
138+
- **Client code** - Only expose `PUBLIC_*` prefixed variables to browser
175139

176-
### Deployment
140+
### Key Commands
177141

178-
- Use HTTPS for all production deployments
179-
- Implement proper CORS policies
180-
- Enable security headers (CSP, HSTS, etc.)
181-
- Regular security audits of your deployed applications
142+
```bash
143+
bun audit # Check dependencies
144+
bun test:security # Run security tests (if configured)
145+
bun update --latest # Update dependencies
146+
```
182147

183148
## Additional Resources
184149

docs/.vitepress/config.ts

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,17 @@ export default withMermaid(
3030
{ text: "Deployment", link: "/deployment" },
3131
],
3232
},
33+
{
34+
text: "Security",
35+
items: [
36+
{ text: "Security Checklist", link: "/security/checklist" },
37+
{ text: "Incident Playbook", link: "/security/incident-playbook" },
38+
{
39+
text: "Security Policy Template",
40+
link: "/security/SECURITY.template",
41+
},
42+
],
43+
},
3344
],
3445

3546
socialLinks: [

0 commit comments

Comments
 (0)