|
1 | | -# GitHub Readme Profile Security Policies and Procedures <!-- omit in toc --> |
| 1 | +# Security Policies and Procedures |
2 | 2 |
|
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. |
5 | 4 |
|
6 | 5 | - [Reporting a Vulnerability](#reporting-a-vulnerability) |
7 | 6 | - [Disclosure Policy](#disclosure-policy) |
| 7 | +- [Security Features](#security-features) |
| 8 | +- [Scope of Vulnerabilities](#scope-of-vulnerabilities) |
| 9 | +- [Dependencies](#dependencies) |
8 | 10 |
|
9 | | -## Reporting a Vulnerability |
| 11 | +## Reporting a Vulnerability |
10 | 12 |
|
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. |
15 | 14 |
|
16 | | -Report security vulnerabilities by emailing the GitHub Readme Profile team at: |
| 15 | +**Report security vulnerabilities by emailing the maintainer:** |
17 | 16 |
|
18 | | -[](mailto:fajarrkim@gmail.com) |
| 17 | +[](mailto:fajarrkim@gmail.com) |
19 | 18 |
|
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. |
25 | 20 |
|
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. |
28 | 22 |
|
29 | 23 | ## Disclosure Policy |
30 | 24 |
|
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: |
34 | 26 |
|
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