Hub rules-nuxtjs

rules-nuxtjs

v3 public Verified

Nuxt.js

Nuxt.js is an open-source framework based on Vue.js for creating modern web applications. These rules govern server-side rendering, directory structure, and component lifecycle management.

@sigmashakeinc 2 pulls 7 rules published Apr 8, 2026 synced Nov 22, 2026 sigmashakeinc/rules/rulesets/rules-nuxtjs →
Severity
5 error 1 warn 1 info
demo.cast
Nuxt.js is an open-source framework based on Vue.js for creating modern web applications. These rules govern server-side rendering, directory structure, and component lifecycle management.

Rules index

7 governance rules

Indexed from the repository's .rules files, grouped by technology. Expand any rule to read the raw source.

nuxtjs

nuxtjs-block-unsafe-patterns error block

RISK: v-html bypasses Vue/Nuxt's template escaping and inserts raw HTML into the DOM — any attacker-controlled string becomes a stored XSS vector (OWASP A03, CWE-79). FIX: render text content as {{ variable }} (auto-escaped) or sanitize the input with DOMPurify.sanitize(html) before using v-html.

Rule source requires an active Pro or Enterprise subscription.
nuxtjs-force-updated-api info log

INFO: asyncData is the Nuxt 2 Pages-Router data-fetching hook; in Nuxt 3 (Bridge / Nuxt 3 app) the replacement is useAsyncData() or useFetch() composables inside setup(). Migrating avoids SSR hydration mismatches.

Rule source requires an active Pro or Enterprise subscription.
nuxtjs-hardcoded-secret error block

RISK: a hardcoded secret in nuxt.config or a server handler leaks the key to any user with repo read access and bundles it into the server build artifact (CWE-798). FIX: use process.env.SECRET_NAME (accessed via useRuntimeConfig in Nuxt 3) and inject values from environment variables or a secrets manager.

Rule source requires an active Pro or Enterprise subscription.
nuxtjs-open-redirect warning log

RISK: passing a user-controlled value to sendRedirect/navigateTo without validation creates an open redirect — phishing kits abuse this to lend legitimacy to malicious URLs (CWE-601). FIX: validate the destination against an allow-list of internal paths or require it to start with '/' and reject external schemes.

Rule source requires an active Pro or Enterprise subscription.
nuxtjs-runtimeconfig-public-secret error block

RISK: secrets placed under runtimeConfig.public are exposed to the client bundle and visible to every browser visitor — this is the Nuxt equivalent of the NEXT_PUBLIC_ leak (CWE-200). FIX: place secrets only in the root runtimeConfig (not inside the public key) so they remain server-only.

Rule source requires an active Pro or Enterprise subscription.
nuxtjs-server-route-eval error block

RISK: eval() or new Function() in a Nuxt server route/middleware runs on the Node.js server process — any untrusted string interpolated into it is RCE (CWE-94). FIX: parse JSON with JSON.parse, resolve values with a lookup table, or use a sandboxed expression library.

Rule source requires an active Pro or Enterprise subscription.
nuxtjs-ssrf-fetch-user-input error block

RISK: passing a user-supplied URL directly to $fetch/fetch in a server route enables SSRF — attackers can probe internal cloud metadata (AWS IMDSv1 169.254.169.254) and internal services (CWE-918). FIX: validate the URL against an allow-list of trusted origins and never forward a URL from the request body/query without strict checking.

Rule source requires an active Pro or Enterprise subscription.

Version metadata

Published metadata

The hash-locked record of this published ruleset. When source contents change, the maintainer resyncs and the version bumps.

Version
v3
Published
Apr 8, 2026
Source commits
0
Synced
Nov 22, 2026
Hash
d2468b6ebfc6901b663ad7f6cb7844601c7e1e9c73a455908ab79aabba08aa0e
Signature
Verified (publisher key)
Tested with
claude-code@current
Plan
Starter (free)
Visibility
Public

Source history

Recent commits

Latest commits touching rulesets/rules-nuxtjs/.sigmashake/rules in sigmashakeinc/rules/rulesets/rules-nuxtjs. The published version only bumps when a maintainer resyncs.

No commit history available.