.claude/skills/quality/security-scan/SKILL.md
Scan the ResearchMate codebase for security issues — hardcoded API keys, auth bypasses, exposed secrets, XSS risks, and missing credit refunds
npx skillsauth add Unlighted01/ResearchMate-Website security-scanInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Run a security scan on the ResearchMate codebase.
Scope: $ARGUMENTS (if empty, scan entire codebase)
Search for:
sk-, AIza, Bearer , gsk_, actual key stringsEvery endpoint MUST have one of:
authenticateUser(req) call before any data accessreq.headers['x-smart-pen-key'] === process.env.SMART_PEN_SERVICE_KEYFlag any endpoint missing both.
Every AI endpoint MUST have:
creditDeducted + deductedUserId flags before try blockrefundCredit(deductedUserId) in catch blockFlag any AI endpoint missing this pattern.
dangerouslySetInnerHTML without sanitizationMust cover: .env, .env.local, *.local, *.key
Group by severity: CRITICAL → HIGH → MEDIUM → LOW Each finding: file:line + description + suggested fix
development
Add proper theme support (glass/bubble/minimalist + dark mode) to a ResearchMate component, or add new CSS variables to index.css for a specific theme
development
Write Vitest integration tests for a ResearchMate API endpoint following all established patterns from ocr.integration.test.ts
testing
Run the ResearchMate OCR integration test suite using Vitest. Optionally filter by test name.
development
Scaffold a new ResearchMate Vercel serverless API endpoint with correct fallback chain, credit refund pattern, auth, PART sections, and TypeScript