From 48df2acdacf01118daf3ce812f9df5db5a2320f0 Mon Sep 17 00:00:00 2001 From: Yogesh Date: Sun, 15 Nov 2026 15:30:49 +0530 Subject: [PATCH 1/3] docs: create security md --- SECURITY.md | 60 +++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 60 insertions(+) create mode 100644 SECURITY.md diff --git a/SECURITY.md b/SECURITY.md new file mode 100644 index 0000000..6575325 --- /dev/null +++ b/SECURITY.md @@ -0,0 +1,60 @@ +# Security Policy + +Papers is an open-source project maintained by student developers at CodeChef-VIT to help students prepare for their CATs, FATs. + +Keeping the platform secure, reliable, and online for students is important to us. If you discover a security vulnerability, we appreciate your help in disclosing it responsibly. + +--- + +## Supported Branches + +We actively maintain and accept security patches for the following branches: + +| Branch | Description | Supported | +| --- | --- | --- | +| `prod` | Production branch (Live site) | Yes | +| `staging` | Development branch (Active development and testing) | Yes | +| Other branches | Feature branches / forks | No | + +--- + +## Ground Rules for Researchers + +We welcome students reviewing the codebase and reporting security issues. Please follow these guidelines: + +- **Do not disrupt the live service**: Avoid denial-of-service attempts or automated vulnerability scanning tools that could exhaust API quotas or disrupt student access during exam periods. +- **Do not access or alter real data**: Do not view, modify, or delete question papers or records belonging to other users. +- **Test in development**: Test against a local setup (`pnpm dev`) or against test fixtures whenever possible. +- **Coordinate disclosure**: Give our team reasonable time to review and deploy a fix before publicly sharing details of the vulnerability. + +--- + +## Reporting a Vulnerability + +Please do not open public GitHub issues for security vulnerabilities. + +To report an issue privately: + +1. **GitHub Security Advisory (Recommended)**: + Navigate to the [Security Advisories](https://github.com/CodeChefVIT/papers-codechef/security/advisories) tab and click **Report a vulnerability**. +2. **Email**: + Send an email to our core technical team at **codechefvit@gmail.com** with the subject line `[Security] Vulnerability Report - Papers`. + +### What to include in your report: +- A clear description of the issue. +- Step-by-step reproduction instructions, a proof-of-concept, or a sample payload. +- Potential impact and affected endpoints or components. + +--- + +## Response Timeline + +We are full-time students balancing academics, but we treat security reports as a priority: +- **Initial acknowledgment**: Typically within 24 to 48 hours. +- **Triage and remediation**: Once verified, we will work on deploying a patch to `staging` and merging it into `prod`. + +--- + +## Attribution + +If you responsibly disclose a valid security issue, we will gladly credit you in the official GitHub Security Advisory and release notes. From 20fbcdc03e88cc12744e6732e94e10596b90ffb2 Mon Sep 17 00:00:00 2001 From: Yogesh Date: Sun, 15 Nov 2026 15:38:25 +0530 Subject: [PATCH 2/3] docs: update README, CONTRIBUTING --- .github/ISSUE_TEMPLATE/bug_report.md | 4 ++++ CONTRIBUTING.md | 5 +++-- README.md | 31 +++++++++++++++++++--------- 3 files changed, 28 insertions(+), 12 deletions(-) diff --git a/.github/ISSUE_TEMPLATE/bug_report.md b/.github/ISSUE_TEMPLATE/bug_report.md index dd84ea7..ec4ad3e 100644 --- a/.github/ISSUE_TEMPLATE/bug_report.md +++ b/.github/ISSUE_TEMPLATE/bug_report.md @@ -7,6 +7,10 @@ assignees: '' --- +> [!CAUTION] +> If this is a **security vulnerability**, do NOT use this form. +> Report it privately via [SECURITY.md](../../SECURITY.md) instead. + **Describe the bug** A clear and concise description of what the bug is. diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index f8d3542..ba4b169 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -6,7 +6,8 @@ We appreciate your interest in contributing to the `papers-codechef` repository! ## Getting started - If you're looking for ideas about what to work on, check out our [issues](https://github.com/CodeChefVIT/papers-codechef/issues) -- If you have a bugfix to report ensure that you are on the latest pkull and no similar issue exists. You can then [create an bug report](https://github.com/CodeChefVIT/papers-codechef/issues/new?template=bug_report.md) +- If you have a bugfix to report ensure that you are on the latest pull and no similar issue exists. You can then [create a bug report](https://github.com/CodeChefVIT/papers-codechef/issues/new?template=bug_report.md) +- **Found a security issue?** Please do NOT open a public GitHub issue. See [SECURITY.md](SECURITY.md) for how to report it privately. - You can also propose a [feature request](https://github.com/CodeChefVIT/papers-codechef/issues/new?template=feature_request.md). Begin by filling out the template, write a brief problem statement that clearly explains the issue you want to address, without tying it to any specific solution. It doesn’t need to be long or formal; just provide enough context to clearly understand the problem before discussing possible solutions. ## Setting up @@ -47,7 +48,7 @@ Please ensure that any Pull Request you make contains these things - - List of the major changes made in this PR. - Mention of any bug fixes, known issues or follow-ups needed. -**Important:** Ensure no merge conflicts exist before making a PR and run `pnpm build` to check for build errors. +**Important:** Ensure no merge conflicts exist before making a PR. Run `pnpm build` to check for build errors and `npx tsc --noEmit` to catch any TypeScript type errors. ### Tips to improve the chances of your PR getting reviewed and merged diff --git a/README.md b/README.md index 007d02f..8de8b2a 100644 --- a/README.md +++ b/README.md @@ -12,18 +12,25 @@ ## ⚙️ Tech Stack: -- Next.js : Framework for React applications with server-side rendering. -- Tailwind CSS : Utility-first CSS framework for rapid UI development. -- MongoDB & Mongoose : Database and object data modeling (ODM) for Node.js. -- Google Cloud Storage: Media storage and optimization service. -- Shadcn : Collection of pre-built components using Radix UI and Tailwind CSS. +- **Next.js** - Framework for React applications with server-side rendering. +- **Tailwind CSS** - Utility-first CSS framework for rapid UI development. +- **MongoDB & Mongoose** - Database and ODM for Node.js. +- **Google Cloud Storage** - Media storage for papers and thumbnails. +- **Shadcn/UI** - Pre-built components using Radix UI and Tailwind CSS. +- **Upstash Redis** - Rate limiting for API routes. +- **Fuse.js** - Fuzzy search for papers and subjects. +- **JSZip** - Client-side bulk download as a ZIP. +- **PostHog** - Anonymous usage analytics. + ## 💡 Features: -- Access a vast collection of past CAT and FAT papers -- Review papers sorted by subject, year, and difficulty -- Download papers for offline use -- Familiarize yourself with exam patterns and types of questions -- Stay updated with any new additions to the repository +- Access a large collection of past CAT and FAT papers from VIT +- Search papers by subject, slot, or course code +- Download individual papers or bulk-download as a ZIP +- Pin frequently used subjects for quick access +- In-browser PDF viewer — no need to download just to read +- Upload papers directly (pending admin approval) +- Stay updated with new additions to the repository ## 🏁 Get Started Note: To get started with contributing to the repo visit [CONTRIBUTE.md](CONTRIBUTING.md) @@ -147,6 +154,10 @@ Our top maintainers, making sure the database of papers is maintained and upto-d +## Security + +If you find a security vulnerability, please do NOT open a public issue. See [SECURITY.md](SECURITY.md) for the responsible disclosure process. + ## License [![License](http://img.shields.io/:license-mit-blue.svg?style=flat-square)](http://badges.mit-license.org) From 381b702bf0b6d07f6213274f048bd748c844fab6 Mon Sep 17 00:00:00 2001 From: Yogesh Date: Mon, 16 Nov 2026 19:35:21 +0530 Subject: [PATCH 3/3] update docs --- SECURITY.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/SECURITY.md b/SECURITY.md index 6575325..7e48195 100644 --- a/SECURITY.md +++ b/SECURITY.md @@ -23,7 +23,7 @@ We actively maintain and accept security patches for the following branches: We welcome students reviewing the codebase and reporting security issues. Please follow these guidelines: - **Do not disrupt the live service**: Avoid denial-of-service attempts or automated vulnerability scanning tools that could exhaust API quotas or disrupt student access during exam periods. -- **Do not access or alter real data**: Do not view, modify, or delete question papers or records belonging to other users. +- **Do not tamper with production data**: Do not modify, delete, or corrupt papers, database records, or GCS files on the live site while testing a vulnerability. Demonstrate the issue on a local setup instead. - **Test in development**: Test against a local setup (`pnpm dev`) or against test fixtures whenever possible. - **Coordinate disclosure**: Give our team reasonable time to review and deploy a fix before publicly sharing details of the vulnerability.