Saltar al contenido principal

Menú de comandos

Ve a una página o busca en el catálogo

Herramientas y scripts de IA

NestJS Safety Check

Este anuncio se muestra en su idioma original (inglés).

Check NestJS apps before you deploy: TypeORM synchronize, hard-coded JWT secrets, SQL built with template strings, ValidationPipe gaps, open CORS, missing helmet and rate limits, exposed Swagger and auth guards that let requests through.

$5.00

Qué recibes: 1 archivo · 57.23 KB · ZIP

Ver opciones de compra

Descripción del producto

One synchronize: true left in TypeOrmModule.forRoot, as in the docs example, lets TypeORM drop a column and its data the first time someone renames an entity property in production. One handleRequest override that returns the user without throwing lets every request through your JwtAuthGuard, token or not. This skill finds those and eleven other NestJS mistakes before you deploy, and tells you how to fix each one.

Your agent runs a scanner on your NestJS source: main.ts, modules, controllers, guards, Passport strategies, TypeORM entities and data sources, services and ormconfig.json. It knows the NestJS patterns (useGlobalPipes and APP_PIPE, APP_GUARD with ThrottlerGuard, the docs' @Public() decorator with a global JwtAuthGuard, JwtModule.register, ClassSerializerInterceptor with @Exclude), follows SQL text through the variables that build it, judges each app of a monorepo on its own, skips comments and test files, and accepts the usual fixes (query parameters, ParseIntPipe, config.getOrThrow, an environment check around Swagger). The safe example project, written the way the NestJS docs recommend, passes clean. It never runs Nest or your app. It returns BLOCK, REVIEW, or NOT FLAGGED, with the file, line, reason, and a safer approach. Secrets are never printed, even on lines another rule reports.

What it checks

BLOCK (fix before shipping)

  • NS01: TypeORM synchronize or dropSchema set to true, or Sequelize sync with force or alter, in app config

  • NS02: hard-coded secrets (JWT secret or secretOrKey, jwtConstants, database passwords and connection URLs in code or ormconfig.json, literal fallbacks such as process.env.JWT_SECRET || '...')

  • NS03: SQL built from changing values (query(), $queryRawUnsafe, QueryBuilder where or having with ${...} or +)

REVIEW (check before release)

  • NS11: no global ValidationPipe, or one without whitelist: true

  • NS12: @Body() or @Query() typed any, as an interface or generic, or as an array without ParseArrayPipe

  • NS13: CORS that allows credentials from any origin (origin: true or '*' with credentials: true)

  • NS14: no helmet in an HTTP app

  • NS15: Swagger UI with no environment check, or GraphiQL or introspection forced on

  • NS16: login and other auth routes without rate limiting (no ThrottlerGuard bound, or @SkipThrottle)

  • NS17: guards that let requests through (handleRequest that never throws, canActivate that only returns true, ignoreExpiration: true)

  • NS18: @Public() on routes or controllers that create, change or delete data

  • NS19: password columns that can end up in responses (no select: false, or @Exclude without ClassSerializerInterceptor)

  • NS20: sort columns taken from request values (orderBy(dto.sort), orderByp.${sort})) with no allow-list check

What's included

  • The scanner (Python 3.9+, standard library only)

  • A rules guide with the reason and safer approach for each rule

  • A risky and a safe example NestJS project (main.ts, app module, auth module, JWT strategy and guard, controllers, a TypeORM entity and a service), and the real report the scanner produces on the risky one

Limits

It reads each file on its own, plus a few app-wide facts (helmet, a global pipe, a bound throttler guard, a serializer) when you check a folder. Values passed between files, DTO classes defined elsewhere, guards built by factories and options built at run time are not followed. Authorization inside handlers, CSRF, Mongoose queries, WebSocket gateways and dependency vulnerabilities are not checked. NOT FLAGGED is not a guarantee.

Contents

One ZIP file with 38 files: SKILL.md, the scanner in scripts/ (6 Python files), references/rules.md (every rule with its reason and safer approach), and examples/ (29 example files plus report.md, the real scanner output on the risky example).

How to use: This is an agent skill: a folder with a SKILL.md file and Python scripts that an AI coding agent such as Claude Code, Cursor, or Codex CLI can run. Unzip it into your agent's skills folder (for Claude Code: ~/.claude/skills/), then ask your agent to check your project. The scripts also run on their own with Python 3.9 or newer, with nothing to install. They read your files only: no network access, and nothing is sent anywhere.

Qué recibes

1 archivo · 57.23 KB

  • nestjs-safety-check-1.0.0.zipZIP · 57.23 KB

Incluido en Getly ProObtener Pro

LicenciaUso comercial permitido
Publicado12 nov 2026
Tamaño del archivo57.23 KB
Formato de archivoZIP
Versiónv1.0

Etiquetas

nestjstypescriptbackendapisecurityai agent skill
R
RR HH

Preguntas frecuentes

¿Tengo acceso al instante?

Sí. Es un producto digital: puedes descargarlo justo después del pago, directamente desde tu biblioteca.

¿Puedo usarlo en proyectos comerciales?

Sí. Se permite el uso comercial: úsalo en tu propio negocio y en cosas que vendas. No puedes revender ni redistribuir el archivo en sí.

¿Cuál es vuestra política de reembolso?

Puedes pedir un reembolso dentro de 30 días. Si algo no va bien, solicítalo desde tu pedido y el equipo de Getly lo revisa.

¿Qué formatos y tamaños de archivo recibiré?

Descargarás 1 archivo - ZIP - 57.23 KB en total.

¿Recibo actualizaciones gratis?

Sí: cuando el vendedor publica una versión nueva, puedes volver a descargar los archivos más recientes desde tu biblioteca sin coste extra. Mira el registro de cambios para ver las últimas actualizaciones.

Precio

$5.00