next-intl-app-router
Pass
Audited by Gen Agent Trust Hub on Sep 16, 2026
Risk Level: SAFEINDIRECT_PROMPT_INJECTION
Full Analysis
- [INDIRECT_PROMPT_INJECTION]: The skill handles untrusted input from the URL locale segment (
[locale]) which is used to dynamically load translation files. The implementation follows security best practices by validating the input against a strict whitelist before use. - Ingestion points: The
localeparameter is extracted fromparamsinapp/[locale]/layout.tsxandapp/[locale]/page.tsx. - Boundary markers: Not applicable as the data is used for file resolution rather than prompt construction.
- Capability inventory: The skill uses dynamic
import()insrc/i18n/request.tsto load JSON files from themessages/directory. - Sanitization: The
localevariable is validated usinghasLocale(routing.locales, requested)insrc/i18n/request.ts, whererouting.localesis a hardcoded list of allowed language codes (en,ja,zh-CN,zh-TW). This prevents directory traversal or arbitrary file inclusion attacks.
Audit Metadata