nodejs-backend-patterns
Pass
Audited by Gen Agent Trust Hub on Sep 22, 2026
Risk Level: SAFEINDIRECT_PROMPT_INJECTIONDYNAMIC_EXECUTION
Full Analysis
- [INDIRECT_PROMPT_INJECTION]: The skill implements patterns for processing untrusted external data via HTTP request bodies, parameters, and query strings, which represents a potential attack surface if the agent processes malicious data through these APIs.
- Ingestion points:
UserController.tsandFastifyroute handlers inresources/implementation-playbook.mdingest data fromreq.body,req.params, andreq.query. - Boundary markers: The skill does not explicitly define boundary markers for agent-user interactions, but it provides architectural layers (Controllers/Services/Repositories) to isolate and control data flow.
- Capability inventory: The code samples include database write/read operations (
pg,mongoose), authentication token generation (jsonwebtoken), and structured logging (pino). - Sanitization: The playbook includes a dedicated 'Validation Middleware' section using
Zodfor schema enforcement and usesbcryptfor secure password hashing. - [DYNAMIC_EXECUTION]: The
UserRepository.updateimplementation inresources/implementation-playbook.mdutilizes dynamic string concatenation to build SQLSETclauses from object keys. - Evidence: The repository layer code iterates through
Object.keys(updates)to generate thesetClausein anUPDATEquery. While query values are properly parameterized, the column names (keys) are interpolated directly into the query string. This pattern is safe only when used in conjunction with the strict upstream Zod validation demonstrated in the skill's middleware section.
Audit Metadata