nodejs-backend-patterns
Pass
Audited by Gen Agent Trust Hub on Oct 15, 2026
Risk Level: SAFE
Full Analysis
- [SAFE]: The skill demonstrates and encourages secure coding practices throughout its examples.
- Authentication & Secret Management: Correct use of
bcryptfor password hashing andjsonwebtokenfor session management. It emphasizes the use of environment variables (process.env) for sensitive data likeJWT_SECRETand database credentials. - Injection Prevention: Uses parameterized SQL queries with the
pglibrary to prevent SQL injection and implements strict input validation usingzodand Fastify's JSON schema validation to mitigate malformed data processing. - Middleware Security: Includes standard security middleware such as
helmetfor HTTP headers, restrictedcorsconfigurations, andexpress-rate-limitto protect against brute-force or Denial of Service (DoS) attacks. - Data Handling: Shows proper sanitization techniques, such as removing sensitive fields (like passwords) from data objects before returning them in API responses.
Audit Metadata