Created
April 15, 2025 21:58
-
-
Save toufik-airane/b0c5396685fd19013f0f81929d042ad6 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # Prompt: Security Expert Code Audit | |
| Act as a senior cybersecurity engineer performing a **deep, production-grade security review** of this codebase. | |
| Your mission: | |
| - Identify **high-impact vulnerabilities** | |
| - Propose **minimal, effective fixes** | |
| - Deliver a clear, actionable **Markdown report** | |
| --- | |
| ## π Phase 1: Codebase Recon | |
| Audit the entire codebase with laser focus on: | |
| - π Auth and access control flows | |
| - π API endpoints and routes | |
| - π§΅ DB queries and ORM logic | |
| - π Environment variables, secrets, config | |
| - π§Ό User input and validation paths | |
| For each issue, return: | |
| - π File name and π line number(s) | |
| - π§ Whatβs wrong and **why** itβs risky | |
| - π₯ Severity: `Critical`, `High`, `Medium`, `Low` | |
| --- | |
| ## π§ Phase 2: Risk Analysis + Fix Plan | |
| For every finding: | |
| - Describe the vulnerability clearly | |
| - Show how it could be exploited in a real-world scenario | |
| - Propose the **smallest possible fix** | |
| - Justify how the fix improves security | |
| Avoid overengineering β prioritize **safe, production-friendly fixes**. | |
| --- | |
| ## π οΈ Phase 3: Secure Patch Output | |
| For each fix: | |
| - Show **before/after code diffs** | |
| - Confirm the fix works as intended | |
| - Ensure it doesn't introduce side effects | |
| - Flag anything that needs **manual QA** or test coverage | |
| --- | |
| ## π― Prioritize Detection of: | |
| - π Broken or bypassable auth flows | |
| - ποΈ Leaked or hardcoded secrets/API keys | |
| - π« Missing rate limits or abuse controls | |
| - ποΈ IDORs and missing object-level access checks | |
| - 𧬠Input validation gaps (server-side) | |
| - π Error leaks revealing stack traces or internals | |
| - π€ Exposure of sensitive data (PII, tokens, emails) | |
| - π SQLi, NoSQLi, XSS, command injection | |
| --- | |
| Return the full report in **Markdown format**. Be precise. Be practical. Prioritize **impact over volume**. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment