Install any skill in seconds. Free to start, no credit card required.
Get Started Free →Provides security review capability for TypeScript/Node.js applications, validates code against XSS, injection, CSRF, JWT/OAuth2 flaws, dependency CVEs, and secrets exposure. Use when performing security audits, before deployment, reviewing authentication/authorization implementations, or ensuring OWASP compliance for Express, NestJS, and Next.js. Triggers on "security review", "check for security issues", "TypeScript security audit".
.claude/skills/giuseppe-trisciuoglio-typescript-security-review/SKILL.md| Test case | Without → With | Effect | Δ tokens | Δ turns |
|---|---|---|---|---|
| case-01 | ✗→✓ | ▲ Improved | 105% | 0% |
| case-04 | ✗→✓ | ▲ Improved | 324% | 0% |
| case-05 | ✗→✓ | ▲ Improved | 43% | 0% |
| case-17 | ✗→✓ | ▲ Improved | 44% | 0% |
| case-06 | ✓→✓ | = Same ✓ | 154% | 0% |
Security review for TypeScript/Node.js applications. Evaluates code against OWASP Top 10, framework-specific patterns, and production-readiness criteria. Findings are classified by severity (Critical, High, Medium, Low) with remediation examples. Delegates to the typescript-security-expert agent for deep analysis.
grep to find security-sensitive patterns (eval, exec, innerHTML, password handling, JWT operations).Checkpoint: Verify at least 3 security-sensitive files/modules identified before proceeding.
Checkpoint: Use grep to confirm all route handlers have auth guards or middleware applied.
exec/spawn, template injection, and LDAP injection. Verify parameterized queries and input validation.Checkpoint: Use grep to confirm all database queries use parameterization — no string concatenation with user input.
Checkpoint: Verify all public API endpoints have corresponding validation schemas.
dangerouslySetInnerHTML usage, check Content Security Policy headers, verify HTML sanitization for user-generated content. See references/xss-prevention.md for detailed patterns.Checkpoint: Use grep to confirm any dangerouslySetInnerHTML usage has sanitization via DOMPurify or equivalent.
.env files are gitignored, secrets accessed through proper management services.Checkpoint: Run grep -r "password\|secret\|api.*key\|token" --include="*.ts" to identify potential secrets in code.
npm audit or check package-lock.json for known vulnerabilities. Identify outdated dependencies with CVEs. Check for unnecessary dependencies.Checkpoint: Verify npm audit results are reviewed and critical vulnerabilities addressed.
references/security-headers.md for configuration examples.Checkpoint: Use grep to confirm helmet or equivalent security headers are applied globally.
Feedback Loop: If Critical or High vulnerabilities found, re-scan related modules for similar patterns before finalizing. Use grep to identify if the same vulnerability pattern exists elsewhere.
typescript// ❌ Critical: Weak JWT configuration import jwt from 'jsonwebtoken'; const SECRET = 'mysecret123'; // Hardcoded weak secret function generateToken(user: User) { return jwt.sign({ id: user.id, role: user.role }, SECRET); // Missing expiration, weak secret, no algorithm specification } // ✅ Secure: Proper JWT configuration import jwt from 'jsonwebtoken'; const JWT_SECRET = process.env.JWT_SECRET; if (!JWT_SECRET || JWT_SECRET.length < 32) { throw new Error('JWT_SECRET must be set and at least 32 characters'); } function generateToken(user: User): string { return jwt.sign( { sub: user.id }, // Minimal claims, no sensitive data JWT_SECRET, { algorithm: 'HS256', expiresIn: '15m', issuer: 'my-app', audience: 'my-app-client', } ); } function verifyToken(token: string): JwtPayload { return jwt.verify(token, JWT_SECRET, { algorithms: ['HS256'], // Restrict accepted algorithms issuer: 'my-app', audience: 'my-app-client', }) as JwtPayload; }
typescript// ❌ Critical: SQL injection vulnerability async function findUser(email: string) { const result = await db.query( `SELECT * FROM users WHERE email = '${email}'` ); return result.rows[0]; } // ✅ Secure: Parameterized query async function findUser(email: string) { const result = await db.query( 'SELECT id, name, email FROM users WHERE email = $1', [email] ); return result.rows[0]; } // ✅ Secure: ORM with type-safe queries (Drizzle example) async function findUser(email: string) { return db.select({ id: users.id, name: users.name, email: users.email, }) .from(users) .where(eq(users.email, email)) .limit(1); }
See references/xss-prevention.md for XSS patterns and references/security-headers.md for security headers configuration.
Structure all security review findings as follows:
Overall security assessment score (1-10) with key observations and risk level.
Issues that can be exploited to compromise the system, steal data, or cause unauthorized access.
Security misconfigurations, missing protections, or vulnerabilities requiring near-term remediation.
Issues that reduce security posture but have mitigating factors or limited exploitability.
Security improvements, hardening recommendations, and defense-in-depth enhancements.
Well-implemented security patterns and practices to acknowledge.
Prioritized action items with code examples for the most critical fixes.
HttpOnly, Secure, SameSite=Strictnpm audit in CI pipelines to catch dependency vulnerabilitiesSee the references/ directory for detailed security documentation:
references/owasp-typescript.md — OWASP Top 10 mapped to TypeScript/Node.js patternsreferences/common-vulnerabilities.md — Common vulnerability patterns and remediationreferences/dependency-security.md — Dependency scanning and supply chain securityreferences/xss-prevention.md — XSS prevention patterns for React and server-sidereferences/security-headers.md — Security headers and CORS configuration examplesreferences/input-validation.md — Input validation patterns with Zod and class-validator| Case | Status | Duration (ms) | Turns | Tokens | Tool calls | ||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Without | With | Δ | Without | With | Δ | Without | With | Δ | Without | With | Δ | ||
case-01 | fail→pass | 24,184 | 39,758 | +64% | 1 | 1 | 0% | 3,564 | 7,311 | +105% | 0 | 0 | — |
case-02 | fail→fail | 28,010 | 28,539 | +2% | 1 | 1 | 0% | 3,738 | 7,512 | +101% | 0 | 0 | — |
case-03 | fail→fail | 9,464 | 20,068 | +112% | 1 | 1 | 0% | 1,047 | 5,182 | +395% | 0 | 0 | — |
case-04 | fail→pass | 14,181 | 13,169 | -7% | 1 | 1 | 0% | 1,020 | 4,329 | +324% | 0 | 0 | — |
case-05 | fail→pass | 12,913 | 4,372 | -66% | 1 | 1 | 0% | 1,958 | 2,798 | +43% | 0 | 0 | — |
case-06 | pass→pass | 8,035 | 7,977 | -1% | 1 | 1 | 0% | 1,393 | 3,532 | +154% | 0 | 0 | — |
case-07 | pass→pass | 5,306 | 6,965 | +31% | 1 | 1 | 0% | 847 | 3,196 | +277% | 0 | 0 | — |
case-08 | fail→fail | 11,000 | 9,117 | -17% | 1 | 1 | 0% | 1,692 | 3,514 | +108% | 0 | 0 | — |
case-09 | pass→pass | 8,555 | 9,833 | +15% | 1 | 1 | 0% | 1,592 | 3,785 | +138% | 0 | 0 | — |
case-10 | pass→pass | 11,993 | 10,522 | -12% | 1 | 1 | 0% | 2,194 | 3,927 | +79% | 0 | 0 | — |
case-11 | pass→pass | 12,900 | 12,111 | -6% | 1 | 1 | 0% | 2,328 | 4,129 | +77% | 0 | 0 | — |
case-12 | pass→pass | 15,686 | 13,464 | -14% | 1 | 1 | 0% | 2,633 | 4,358 | +66% | 0 | 0 | — |
case-13 | pass→pass | 11,199 | 9,144 | -18% | 1 | 1 | 0% | 2,023 | 3,571 | +77% | 0 | 0 | — |
case-14 | pass→pass | 16,092 | 16,206 | +1% | 1 | 1 | 0% | 2,690 | 4,608 | +71% | 0 | 0 | — |
case-15 | pass→pass | 7,938 | 4,016 | -49% | 1 | 1 | 0% | 1,141 | 2,350 | +106% | 0 | 0 | — |
case-16 | pass→pass | 18,785 | 15,122 | -19% | 1 | 1 | 0% | 2,987 | 4,482 | +50% | 0 | 0 | — |
case-17 | fail→pass | 11,315 | 3,406 | -70% | 1 | 1 | 0% | 1,714 | 2,467 | +44% | 0 | 0 | — |
case-18 | pass→pass | 19,742 | 15,343 | -22% | 1 | 1 | 0% | 3,253 | 4,844 | +49% | 0 | 0 | — |
case-19 | fail→fail | 10,037 | 6,720 | -33% | 1 | 1 | 0% | 1,583 | 3,161 | +100% | 0 | 0 | — |
case-20 | fail→fail | 16,257 | 15,487 | -5% | 1 | 1 | 0% | 2,810 | 4,845 | +72% | 0 | 0 | — |
case-21 | fail→fail | 15,396 | 20,476 | +33% | 1 | 1 | 0% | 1,742 | 3,816 | +119% | 0 | 0 | — |
case-22 | fail→fail | 5,766 | 6,544 | +13% | 1 | 1 | 0% | 483 | 2,456 | +408% | 0 | 0 | — |
DecimalAI ran this skill against gemini-3.6-flash twice over the same eval suite — once with the skill loaded and once without — and compared the two runs case by case. 22 cases were attempted. The headline lift of +18 percentage points is the difference between those two pass rates over the 22 comparable cases. 1 case got worse with the skill loaded, and it is included in that figure.
Without the skill loaded, the model failed this case. With it loaded, the same prompt on the same model passed. This is one improved case from the latest verified run; every case, including any that regressed, is in the table above.
Other measured skills in the registry, with their headline benchmark lift.