← all rules

code/nestjs-enablecors-wildcard

NestJS enableCors() with default (wildcard) origin

mediumFramework-awareframework:nestjsCWE-942js

What it detects

`app.enableCors()` with no options allows any origin. Pass an explicit `origin` option restricting it to known front-ends.

How it runs

Gated on framework detection: the repo's manifests (package.json, requirements.txt, pom.xml, Gemfile, composer.json) are read to identify the stack, and the rule only runs against matching-language files when its framework is present.

Found a false positive or want this rule tuned? File an issue. You can also suppress per-repo via a .repoguardignore line.