Use this skill when adding authentication, handling user input, working with secrets, creating API endpoints, or implementing payment/sensitive features.
Install the skill above, then run this in your AI tool:
/security-review <your description>
About
This skill ensures all code follows security best practices and identifies potential vulnerabilities.
Source
What gets added to your project
Preview every file this package writes on install before you run the command above.
Summary
Use this skill when adding authentication, handling user input, working with secrets, creating API endpoints, or implementing payment/sensitive features. Provides comprehensive security checklist and patterns.
Skill instructions
Security Review Skill
This skill ensures all code follows security best practices and identifies potential vulnerabilities.
// DANGEROUS - SQL Injection vulnerabilityconst query = `SELECT * FROM users WHERE email = '${userEmail}'`await db.query(query)
PASS: ALWAYS Use Parameterized Queries
typescript
// Safe - parameterized queryconst { data } = await supabase
.from('users')
.select('*')
.eq('email', userEmail)
// Or with raw SQL -- the value goes in the params array, never in the// string. Use your driver's placeholder syntax (Postgres numbers its// placeholders, MySQL uses "?").await db.query(
'SELECT * FROM users WHERE email = ?',
[userEmail]
)
<!-- Do not write a literal dollar-sign-N placeholder anywhere in this file.
Invoking this skill with arguments substitutes it away, and the example
above then renders as concatenated SQL -- the exact anti-pattern this
section warns against. Use "?" and name the Postgres form in prose. -->
Verification Steps
All database queries use parameterized queries
No string concatenation in SQL
ORM/query builder used correctly
Supabase queries properly sanitized
4. Authentication & Authorization
JWT Token Handling
typescript
// FAIL: WRONG: localStorage (vulnerable to XSS)localStorage.setItem('token', token)
// PASS: CORRECT: httpOnly cookies
res.setHeader('Set-Cookie',
`token=${token}; HttpOnly; Secure; SameSite=Strict; Max-Age=3600`)
-- Enable RLS on all tablesALTER TABLE users ENABLE ROW LEVEL SECURITY;
-- Users can only view their own dataCREATE POLICY "Users view own data"
ON users FORSELECTUSING (auth.uid() = id);
-- Users can only update their own dataCREATE POLICY "Users update own data"
ON users FORUPDATEUSING (auth.uid() = id);
Verification Steps
Tokens stored in httpOnly cookies (not localStorage)
Start strict and loosen only with a documented removal plan. Do not default to
'unsafe-inline' or 'unsafe-eval'; they neutralize much of CSP's protection
and should be treated as temporary compatibility debt.
Add this badge to a GitHub README so readers can open the package page and install the same version.
[](https://www.aipm-registry.com/skills/affaan-m/security-review/1.0.0?utm_source=github&utm_medium=readme&utm_campaign=package_badge)
This imported publisher has not claimed its AIPM account. A connected account confirms account control, but it does not guarantee that a package is safe.
AI assistant context
What this skill is for
@affaan-m/security-review@1.0.0 is an AIPM skill package for All tools. Use it when a project needs the reusable AI behavior described as: Use this skill when adding authentication, handling user input, working with secrets, creating API endpoints, or implementing payment/sensitive features. Provides comprehensive security checklist and patterns.
Preview a UI component mockup in a local browser canvas where the human directly edits it (move, resize, edit text, delete, restyle), switches mobile/desktop/custom viewports, tests it, chats with you, and clicks Save and Finish. You the...
Run aipm add @affaan-m/security-review@1.0.0 in a project that has AIPM initialized.
Supported tools
@affaan-m/security-review@1.0.0 supports All tools.
Before installing
AIPM skills can add files to your project. Review the package name, target, description, license, and publisher before installing. Use a clean branch when trying a new skill.