Works with the AI Agents you already use
security review pro
by Mgnlocki
AppSec-grade security reviews for code and PRs with evidence-based findings and copy-paste fixes.
$5
security review pro
Example session with this skill installed
Review my recent changes in routes/auth.js and controllers/userController.js. I've added a password reset flow. Focus on medium severity and above.
- Read your context and instructions
- Compiled the security review pro
I have completed the security review of the password reset implementation. The review focused on routes/auth.js and controllers/userController.js.
Security Review — Auth Flow Update — 2024-05-20
Verdict: 🛑 NO-SHIP
The password reset token generation uses a cryptographically weak PRNG, making account takeover trivial via brute-force. This must be fixed before merging.
Findings (2: 1 critical, 1 medium, 0 low)
🔴 F-1: Weak Token Generation — controllers/userController.js:42 (confidence: high)
What's there: const token = Math.random().toString(36).substring(2);
Attack scenario: An external attacker requests a reset for a target email. Because Math.random() is predictable, the attacker can synchronize their local PRNG state and predict the token, bypassing email ownership verification to reset the victim's password.
Fix:
const crypto = require('crypto');
const token = crypto.randomBytes(32).toString('hex');
const expiry = Date.now() + 3600000; // 1 hour
Reference: CWE-338 (Use of Insufficiently Cryptographically Strong PRNG)
🟡 F-2: User Enumeration via Timing — routes/auth.js:18 (confidence: medium)
What's there: The API returns 404 Not Found if the email doesn't exist, but 200 OK if it does.
Attack scenario: An attacker scripts requests against the endpoint to validify a list of target emails registered on the platform.
Fix: Return a generic 200 OK message ("If an account exists, a reset link has been sent") regardless of whether the email was found in the database.
Reference: CWE-204 (Response Discrepancy Information Leakage)
Checked & clean
- Injection: Verified that
db.users.findOne()uses parameterized queries. - Secrets: No hardcoded API keys found in the reviewed controller.
Not reviewed
services/mailer.js: The actual email delivery logic was out of scope.
Fix plan (priority order)
- F-1: Weak Token — Critical risk of account takeover — ~10 mins effort.
- F-2: Enumeration — Privacy improvement — ~15 mins effort.
Next steps
- Would you like me to apply the
cryptofix touserController.jsnow? - Shall I update the response logic in
auth.jsto prevent enumeration? - Should I review
services/mailer.jsto ensure the token isn't leaked in logs?
Connects securely to your tools. The creator never sees your data.
About this skill
AppSec-grade static review for your PR, fileset, or pre-launch sweep. OWASP-based checklist mapped to real code patterns (injection, broken auth, secrets, SSRF, weak crypto, XSS, uploads, deserialization, logging, rate limits, supply chain). Every finding: evidence → attack scenario → severity + confidence → concrete fix code. Ship / no-ship verdict and prioritized fix plan. Honest by design: quotes only code it actually read, lists what was NOT reviewed, never echoes leaked secrets in full.
Static analysis only; no dynamic testing or live exploitation. Findings are limited to code within the provided context window. Requires manual verification of high-complexity logic.
How to use
- 1
Connect your agent to the Agensi MCP
Copy the prompt and paste it into Claude, ChatGPT, Cursor or any agent that supports MCP. It sets up the connection for you. Manual setup
- 2
Sign in to Agensi
Your agent shows a sign-in link. Sign in and click Allow.
- 3
Ask for what you need
Your agent loads this skill and uses it on your task. It always asks before buying a skill.
Reviews
No reviews yet
Be one of the first to try it. Every listed skill goes through the trust checks below.
Security scanned
Checked by our 8-point scan before listing
Fresh listing
Recently published to Agensi
Money-back guarantee
Doesn't do what its page promises? You get your money back.
Trust & safety
Security scan
Security scan passed 2 months ago
Permissions
What's inside
Frequently Asked Questions
New in Security
Find more skills like this on the Claude Skills Marketplace, the Codex Skills Marketplace and the Gemini Skills Marketplace, or browse Claude Skills for Security.