Audit a Codebase for 14 Common Security Issues
Review a codebase for the listed security issues and report whether each is present, where it appears, its severity, and how to fix it. Base findings only on evidence visible in the code
Prompt template
- Format
- Text
- Inputs
- Codebase (code) · Required
- Outputs
- Security_audit_report (text)
Act as a security reviewer. Audit this codebase for these 14 issues:
1. Who can see what
- Admin pages that anyone can open by typing the address
- Changing a number in the URL to view another user's data
- New users being able to make themselves admins when they sign up
- Permissions enforced only by hiding buttons, rather than checked on the server
2. Anything touching money
- Prices taken from the browser instead of the server
- Orders accepting negative quantities
- Payments marked as paid without confirmation from the payment provider
- Discount codes that can be used more than once
3. Secrets and logins
- API keys visible in the browser's code
- .env or .git files publicly accessible
- Login codes that allow unlimited guesses
4. What users type or upload
- Code hidden in a username that runs in other people's browsers
- Form text that can manipulate the database
- Uploaded files presented as images that are not actually images
- Messages that tell the app's AI to ignore its instructions
For each issue, say whether it is present, identify the exact file and line, state how serious it is, and explain the fix. Only report what you can see in the code. Do not guess.
What you'll create
This prompt asks for a code-level security review covering access control, payments, secrets and logins, and user-supplied content. The report should identify evidence and locations for each issue, assess severity, and recommend a fix
Usage instructions
Frequently asked questions
What should the reviewer do if an issue cannot be confirmed from the code?
Do not guess; report only what can be verified in the code
Comments
Tried this prompt? Share what you made, compare results, or ask a question