hemang11/agent-core/security-review

Claude Code and agent skill by hemang11/agent-core

Trust tier 3
  • community
Source check pending

Checking that the SKILL.md file is still in the repository.

Perform security-focused code reviews for fintech and payment applications. Trigger on: "security review", "check for vulnerabilities", "is this secure", "audit this code", code involving auth/JWT/passwords/payments/KYC/PII, or when reviewing code that handles user input, API keys, tokens, or financial data. Also use when asked about OWASP, PCI-DSS compliance, or secure coding practices. Critical for payment gateways, banking integrations, and regulatory compliance.

Install

npx vskill@latest install hemang11/agent-core/security-review

SKILL.md

The same SKILL.md was published earlier as hemang11/agent-core/security-review.

Security Review (Fintech / JS/TS)

Security-focused review for financial applications. Prioritize vulnerabilities that could lead to data breach, unauthorized transactions, or compliance violations.


Review Structure

1. Threat Summary

One paragraph: What does this code handle? What's the attack surface?

2. πŸ”΄ Critical (Immediate Fix)
  • Authentication bypass
  • Authorization failures (IDOR, privilege escalation)
  • Injection (SQL, NoSQL, command, template)
  • Sensitive data exposure (logs, errors, responses)
  • Cryptographic failures
3. 🟑 High (Fix Before Deploy)
  • Missing rate limiting
  • Insufficient input validation
  • Session management issues
  • Insecure dependencies
  • Logging gaps for audit trail
4. 🟒 Low / Informational
  • Defense-in-depth suggestions
  • Code hardening opportunities
5. Compliance Notes

PCI-DSS, RBI guidelines, or other regulatory concerns if applicable.


Fintech-Specific Vulnerabilities

Payment Flow Security
typescript
// ❌ Bad: Amount from client
const { amount, userId } = req.body;
await chargeUser(userId, amount);
// βœ… Good: Amount from server-side source
const order = await Order.findById(req.body.orderId);
if (order.userId !== req.user.id) throw new ForbiddenError();
await chargeUser(order.userId, order.amount);
IDOR in Financial Data
typescript
// ❌ Bad: Direct object reference without ownership check
app.get('/api/accounts/:accountId', async (req, res) => {
const account = await Account.findById(req.params.accountId);
res.json(account); // Anyone can view any account
});
// βœ… Good: Ownership verification
app.get('/api/accounts/:accountId', async (req, res) => {
const account = await Account.findOne({
_id: req.params.accountId,
userId: req.user.id // Scoped to authenticated user
});
if (!account) throw new NotFoundError();
res.json(account);
});
JWT / Token Issues
typescript
// ❌ Bad: Algorithm confusion / weak secret
jwt.verify(token, secret); // No algorithm specified
jwt.sign(payload, 'weak-secret'); // Guessable secret
// βœ… Good: Explicit algorithm, strong secret from env
jwt.verify(token, process.env.JWT_SECRET, { algorithms: ['HS256'] });
jwt.sign(payload, process.env.JWT_SECRET, {
algorithm: 'HS256',
expiresIn: '15m'
});
Sensitive Data in Logs
typescript
// ❌ Bad: Logging PII/financial data
logger.info('Payment request', { userId, cardNumber, amount });
// βœ… Good: Redact sensitive fields
logger.info('Payment request', {
userId,
cardLast4: cardNumber.slice(-4),
amount
});

Input Validation Checklist

  • [ ] All user input validated (type, format, length, range)
  • [ ] Allowlist validation preferred over denylist
  • [ ] Numbers validated as numbers, not strings
  • [ ] Email/phone validated with proper regex or library
  • [ ] File uploads: type, size, name sanitization
  • [ ] JSON schema validation for API payloads
Example: Zod Schema for Payment
typescript
const paymentSchema = z.object({
orderId: z.string().uuid(),
paymentMethod: z.enum(['upi', 'card', 'netbanking']),
upiId: z.string().regex(/^[\w.-]+@[\w]+$/).optional(),
cardToken: z.string().min(20).optional(),
}).refine(
(data) => data.paymentMethod !== 'upi' || data.upiId,
{ message: 'UPI ID required for UPI payments' }
);

Authentication & Session

  • [ ] Passwords hashed with bcrypt/argon2 (cost factor β‰₯10)
  • [ ] Session tokens are cryptographically random
  • [ ] Sessions invalidated on logout/password change
  • [ ] Account lockout after N failed attempts
  • [ ] Secure cookie flags: httpOnly, secure, sameSite
  • [ ] CSRF protection on state-changing endpoints
  • [ ] Rate limiting on auth endpoints

API Security

  • [ ] CORS configured with explicit origins (not *)
  • [ ] Content-Type validation
  • [ ] Request size limits
  • [ ] Timeout configured
  • [ ] Error responses don't leak stack traces
  • [ ] API versioning for deprecation path

Dependency Security

bash
# Check for known vulnerabilities
npm audit
npx snyk test
# Check for outdated packages
npm outdated

Flag any:

  • Dependencies with known CVEs
  • Unmaintained packages (no updates in 2+ years)
  • Packages with excessive permissions

MongoDB-Specific Security

typescript
// ❌ Bad: NoSQL injection
db.users.findOne({ username: req.body.username }); // { "$gt": "" } bypasses
// βœ… Good: Type coercion and validation
const username = String(req.body.username);
if (!usernameRegex.test(username)) throw new ValidationError();
db.users.findOne({ username });

Secrets Management

  • [ ] No secrets in code or config files
  • [ ] Environment variables for all secrets
  • [ ] .env files in .gitignore
  • [ ] Different secrets per environment
  • [ ] Secrets rotated periodically
  • [ ] AWS Secrets Manager / Vault for production

Compliance Quick Reference

PCI-DSS (if handling card data)
  • Never store CVV
  • Encrypt PAN at rest and in transit
  • Tokenize card data where possible
  • Audit logs for all access to card data
RBI Guidelines (India)
  • 2FA for transactions above threshold
  • Card data storage restrictions
  • Transaction limits and cooling periods
  • Grievance redressal mechanisms
Data Protection
  • PII encrypted at rest
  • Data retention policies enforced
  • Right to deletion implemented
  • Cross-border transfer compliance

Security

  • Security scanPassed, 90 of 100Pattern checks on the skill's files.
  • Model reviewPassed

Quality evaluation

  • Task evaluationNot runNo evaluation yet. Run one in Skill Studio.

Source

Popularity

7-day trend score
0

Not refreshed yet.

Works with

Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.

  • Claude Code
  • Cursor
  • GitHub Copilot
  • Windsurf
  • Codex
  • Gemini CLI
  • Cline
  • Amp
  • Roo Code
  • Goose
  • Continue
  • Kilo Code
  • Junie
  • Trae
  • OpenHands
  • Qwen Code
  • AI Agent
  • Tabnine Chat
  • Sourcegraph Cody
  • Amazon Q
  • Firebase Genkit
  • Sweep
  • Devin
  • Phind
  • Mentat
  • Claude Desktop
  • Aider
  • GPT Pilot
  • Plandex
  • bolt.new
  • v0
  • Replit Agent
  • Anse
  • TypingMind
  • BetterChatGPT
  • LibreChat
  • Warp AI
  • Pieces
  • Fig AI
Embed badge
vskill VERIFIED badge
[![vskill VERIFIED](https://verified-skill.com/api/v1/skills/hemang11/agent-core/security-review/badge)](https://verified-skill.com/skills/hemang11/agent-core/security-review)

Something wrong with this skill or its page? Tell us.