Skip to content

Commit f71488f

Browse files
authored
docs: update security documentation with comprehensive guidelines (#922)
1 parent d690d1b commit f71488f

1 file changed

Lines changed: 47 additions & 23 deletions

File tree

SECURITY.md

Lines changed: 47 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -1,37 +1,61 @@
1-
# GitHub Readme Profile Security Policies and Procedures <!-- omit in toc -->
1+
# Security Policies and Procedures
22

3-
This document outlines security procedures and general policies for the
4-
GitHub Readme Profile project.
3+
This document outlines security procedures and general policies for the GitHub Readme Profile project.
54

65
- [Reporting a Vulnerability](#reporting-a-vulnerability)
76
- [Disclosure Policy](#disclosure-policy)
7+
- [Security Features](#security-features)
8+
- [Scope of Vulnerabilities](#scope-of-vulnerabilities)
9+
- [Dependencies](#dependencies)
810

9-
## Reporting a Vulnerability
11+
## Reporting a Vulnerability
1012

11-
The GitHub Readme Profile team and community take all security vulnerabilities
12-
seriously. Thank you for improving the security of our open source
13-
software. We appreciate your efforts and responsible disclosure and will
14-
make every effort to acknowledge your contributions.
13+
The GitHub Readme Profile team and community take all security vulnerabilities seriously. Thank you for improving the security of our open source software. We appreciate your efforts and responsible disclosure and will make every effort to acknowledge your contributions.
1514

16-
Report security vulnerabilities by emailing the GitHub Readme Profile team at:
15+
**Report security vulnerabilities by emailing the maintainer:**
1716

18-
[![Mail](https://custom-icon-badges.demolab.com/badge/Mail-fajarrkim%40gmail.com-blue?s&labelColor=302d41&color=b7bdf8&logoColor=d9e0ee&style=for-the-badge&logo=mail)](mailto:fajarrkim@gmail.com)
17+
[![Mail](https://custom-icon-badges.demolab.com/badge/Mail-fajarrkim%40gmail.com-blue?labelColor=302d41&color=b7bdf8&logoColor=d9e0ee&style=for-the-badge&logo=mail)](mailto:fajarrkim@gmail.com)
1918

20-
The lead maintainer will acknowledge your email within 24 hours, and will
21-
send a more detailed response within 48 hours indicating the next steps in
22-
handling your report. After the initial reply to your report, the security
23-
team will endeavor to keep you informed of the progress towards a fix and
24-
full announcement, and may ask for additional information or guidance.
19+
The lead maintainer will acknowledge your email within 48 hours and will send a more detailed response within 72 hours, indicating the next steps in handling your report. After the initial reply, the security team will endeavor to keep you informed of the progress toward a fix and full announcement, and may ask for additional information or guidance.
2520

26-
Report security vulnerabilities in third-party modules to the person or
27-
team maintaining the module.
21+
**For vulnerabilities in third‑party modules**, please report them to the person or team maintaining that module.
2822

2923
## Disclosure Policy
3024

31-
When the security team receives a security bug report, they will assign it
32-
to a primary handler. This person will coordinate the fix and release
33-
process, involving the following steps:
25+
When the security team receives a security bug report, they will assign it to a primary handler. This person will coordinate the fix and release process, involving the following steps:
3426

35-
* Confirm the problem.
36-
* Audit code to find any potential similar problems.
37-
* Prepare fixes and release them as fast as possible.
27+
1. Confirm the problem and determine its impact.
28+
2. Audit the codebase to find any potential similar problems.
29+
3. Prepare fixes and test them thoroughly.
30+
4. Release the fixes as soon as possible, with an explanation of the issue and the mitigation.
31+
32+
## Security Features
33+
34+
- **Environment Variables**: The project uses a `GH_TOKEN` environment variable to authenticate with the GitHub API. This token should be kept secret and never exposed in client‑side code.
35+
- **Proxy Middleware**: The application includes a middleware that proxies all requests (except those to `/api`, `/themes`, and `/i18n`) to an external generator. This middleware is carefully configured to avoid leaking sensitive headers or internal paths.
36+
- **Input Sanitization**: User‑supplied parameters (e.g., `username`, `title`, `theme`, colors) are sanitized to prevent injection attacks in the generated SVG.
37+
- **Generator CAPTCHA Security**: The external generator service (`https://gh-readme-profile-generator.vercel.app`) implements CAPTCHA verification before allowing access to the generation form. This helps prevent automated abuse and protects the infrastructure from excessive load.
38+
- **Content Security Policy (CSP)**: The API responds with appropriate headers to reduce the risk of XSS and other client‑side attacks.
39+
40+
## Scope of Vulnerabilities
41+
42+
Vulnerabilities may exist in any part of the codebase, including but not limited to:
43+
44+
- The main API endpoint at `https://gh-readme-profile.vercel.app/api`
45+
- The proxy middleware that forwards requests to the generator
46+
- The theme and translation loading systems (`themes/index.ts`, `i18n/index.ts`)
47+
- The SVG rendering logic
48+
- The handling of GitHub API responses
49+
- The Vercel deployment configuration
50+
51+
If you discover a vulnerability in the **generator** (hosted at `https://gh-readme-profile-generator.vercel.app`), please report it through the same channel.
52+
53+
## Dependencies
54+
55+
The project relies on several npm packages. We regularly update dependencies to include security patches. If you find a vulnerability in one of these dependencies, please report it using the process above or, if the vulnerability is in a direct dependency, consider opening a security advisory through GitHub.
56+
57+
We encourage contributors to keep an eye on the dependency list and run `npm audit` periodically to identify potential issues.
58+
59+
---
60+
61+
Thank you for helping keep GitHub Readme Profile secure.

0 commit comments

Comments
 (0)