AI Fix Prompts for Nuxt Evals

Copy any prompt below into Claude, ChatGPT, or your AI coding assistant to automatically fix the issue. Each prompt includes full context, code location, and step-by-step fix instructions.

10
Total Prompts
0
Critical (P0)
10
High (P1)
0
Medium (P2)
0
Low (P3)
Download All (Markdown) Download All (JSON) Feed these prompts to any AI coder: Claude Code, Cursor, Copilot, GPT, Ollama
HIGH ⚡ quick-fix #1

Remove hard-coded sast: [sast:aljefra/ssrf-http-client] SSRF via HTTP Client with Dynamic URL

security credentials sast
Expected outcome: Secret moved to environment variable, no hardcoded credentials in source
Files to modify: evals/nuxt-010-fix-watch-fetch/EVAL.ts
Prompt (copy this into your AI assistant)
Fix a hardcoded credential in repository 'nuxt__nuxt-evals'.

**Issue**: Hard-coded sast found ([sast:aljefra/ssrf-http-client] SSRF via HTTP Client with Dynamic URL)
**File**: evals/nuxt-010-fix-watch-fetch/EVAL.ts
**Line**: 43
**Severity**: HIGH

**Current code around the issue:**
```
      38 | test('Uses computed URL or reactive pattern for refetching', () => {
      39 |   const content = getPageContent();
      40 | 
      41 |   // Should use one of these Nuxt reactive patterns:
      42 |   // 1. Computed getter as URL: useFetch(() => `/api/users/${id.value}`)
>>>   43 |   // 2. Computed ref: const url = computed(() => ...); useFetch(url)
      44 |   // 3. Watch option: useFetch(url, { watch: [...] })
      45 |   // 4. useAsyncData with $fetch getter
      46 |   // Note: regex accounts for optional TypeScript generics like useFetch<User>(...)
      47 |   const hasComputedUrl = /useFetch\s*(?:<[^>]*>)?\s*\(\s*\(\)\s*=>/.test(content);
      48 |   const hasComputedRef = /computed\s*\(/.test(content) && /useFetch/.test(content);
```

**Required fix:**
1. Remove the hardcoded credential from the source code
2. Replace it with an environment variable read: `os.environ.get('SAST_KEY')` (Python) or `process.env.SAST_KEY` (JS)
3. Add the variable name to a `.env.example` file with a placeholder value
4. Ensure `.env` is in `.gitignore`
5. If this credential was ever committed to git, it should be considered compromised and rotated

**Do NOT:**
- Move the secret to a config file that gets committed
- Use a default fallback value that is a real credential
- Leave the old credential in a comment
Repobility analyzer · published findings · https://repobility.com
HIGH ⚡ quick-fix #2

Remove hard-coded sast: [sast:aljefra/ssrf-http-client] SSRF via HTTP Client with Dynamic URL

security credentials sast
Expected outcome: Secret moved to environment variable, no hardcoded credentials in source
Files to modify: evals/nuxt-010-fix-watch-fetch/EVAL.ts
Prompt (copy this into your AI assistant)
Fix a hardcoded credential in repository 'nuxt__nuxt-evals'.

**Issue**: Hard-coded sast found ([sast:aljefra/ssrf-http-client] SSRF via HTTP Client with Dynamic URL)
**File**: evals/nuxt-010-fix-watch-fetch/EVAL.ts
**Line**: 44
**Severity**: HIGH

**Current code around the issue:**
```
      39 |   const content = getPageContent();
      40 | 
      41 |   // Should use one of these Nuxt reactive patterns:
      42 |   // 1. Computed getter as URL: useFetch(() => `/api/users/${id.value}`)
      43 |   // 2. Computed ref: const url = computed(() => ...); useFetch(url)
>>>   44 |   // 3. Watch option: useFetch(url, { watch: [...] })
      45 |   // 4. useAsyncData with $fetch getter
      46 |   // Note: regex accounts for optional TypeScript generics like useFetch<User>(...)
      47 |   const hasComputedUrl = /useFetch\s*(?:<[^>]*>)?\s*\(\s*\(\)\s*=>/.test(content);
      48 |   const hasComputedRef = /computed\s*\(/.test(content) && /useFetch/.test(content);
      49 |   const hasWatchOption = /watch\s*:\s*\[/.test(content);
```

**Required fix:**
1. Remove the hardcoded credential from the source code
2. Replace it with an environment variable read: `os.environ.get('SAST_KEY')` (Python) or `process.env.SAST_KEY` (JS)
3. Add the variable name to a `.env.example` file with a placeholder value
4. Ensure `.env` is in `.gitignore`
5. If this credential was ever committed to git, it should be considered compromised and rotated

**Do NOT:**
- Move the secret to a config file that gets committed
- Use a default fallback value that is a real credential
- Leave the old credential in a comment
HIGH ⚡ quick-fix #3

Remove hard-coded password: Password Assignment

security credentials password
Expected outcome: Secret moved to environment variable, no hardcoded credentials in source
Files to modify: evals/nuxt-ui-003-fix-raw-form/app/pages/index.vue
Prompt (copy this into your AI assistant)
Fix a hardcoded credential in repository 'nuxt__nuxt-evals'.

**Issue**: Hard-coded password found (Password Assignment)
**File**: evals/nuxt-ui-003-fix-raw-form/app/pages/index.vue
**Line**: 17
**Severity**: HIGH

**Current code around the issue:**
```
      12 |   } else if (!/^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(email.value)) {
      13 |     errors.value.email = 'Invalid email format'
      14 |   }
      15 | 
      16 |   if (!password.value) {
>>>   17 |     errors.value.password = 'Password is required'
      18 |   } else if (password.value.length < 8) {
      19 |     errors.value.password = 'Password must be at least 8 characters'
      20 |   }
      21 | 
      22 |   return Object.keys(errors.value).length === 0
```

**Required fix:**
1. Remove the hardcoded credential from the source code
2. Replace it with an environment variable read: `os.environ.get('PASSWORD_KEY')` (Python) or `process.env.PASSWORD_KEY` (JS)
3. Add the variable name to a `.env.example` file with a placeholder value
4. Ensure `.env` is in `.gitignore`
5. If this credential was ever committed to git, it should be considered compromised and rotated

**Do NOT:**
- Move the secret to a config file that gets committed
- Use a default fallback value that is a real credential
- Leave the old credential in a comment
HIGH ⚡ quick-fix #4

Remove hard-coded password: Password Assignment

security credentials password
Expected outcome: Secret moved to environment variable, no hardcoded credentials in source
Files to modify: evals/nuxt-ui-003-fix-raw-form/app/pages/index.vue
Prompt (copy this into your AI assistant)
Fix a hardcoded credential in repository 'nuxt__nuxt-evals'.

**Issue**: Hard-coded password found (Password Assignment)
**File**: evals/nuxt-ui-003-fix-raw-form/app/pages/index.vue
**Line**: 19
**Severity**: HIGH

**Current code around the issue:**
```
      14 |   }
      15 | 
      16 |   if (!password.value) {
      17 |     errors.value.password = 'Password is required'
      18 |   } else if (password.value.length < 8) {
>>>   19 |     errors.value.password = 'Password must be at least 8 characters'
      20 |   }
      21 | 
      22 |   return Object.keys(errors.value).length === 0
      23 | }
      24 | 
```

**Required fix:**
1. Remove the hardcoded credential from the source code
2. Replace it with an environment variable read: `os.environ.get('PASSWORD_KEY')` (Python) or `process.env.PASSWORD_KEY` (JS)
3. Add the variable name to a `.env.example` file with a placeholder value
4. Ensure `.env` is in `.gitignore`
5. If this credential was ever committed to git, it should be considered compromised and rotated

**Do NOT:**
- Move the secret to a config file that gets committed
- Use a default fallback value that is a real credential
- Leave the old credential in a comment
HIGH ⚒ significant #5

Address OWASP A02 compliance gap

security compliance owasp
Expected outcome: OWASP A02 compliance issues resolved
Files to modify: Will be determined by the AI
Prompt (copy this into your AI assistant)
Address OWASP A02 (Cryptographic Failures) compliance gap in 'nuxt__nuxt-evals'.

**OWASP Category**: A02 -- Cryptographic Failures
**Fix guidance**: Remove hardcoded secrets, use strong encryption (AES-256-GCM), enforce TLS, never store passwords in plaintext (use bcrypt/argon2).

**Steps:**
1. Identify all code paths related to cryptographic failures
2. Apply the fixes described above
3. Add automated tests to verify the fix
4. Document any security assumptions in code comments
HIGH ⚒ significant #6

Address OWASP A06 compliance gap

security compliance owasp
Expected outcome: OWASP A06 compliance issues resolved
Files to modify: Will be determined by the AI
Prompt (copy this into your AI assistant)
Address OWASP A06 (Vulnerable Components) compliance gap in 'nuxt__nuxt-evals'.

**OWASP Category**: A06 -- Vulnerable Components
**Fix guidance**: Update all dependencies to latest stable versions, remove unused dependencies, monitor for new CVEs.

**Steps:**
1. Identify all code paths related to vulnerable components
2. Apply the fixes described above
3. Add automated tests to verify the fix
4. Document any security assumptions in code comments
HIGH ⚒ significant #7

Address OWASP A07 compliance gap

security compliance owasp
Expected outcome: OWASP A07 compliance issues resolved
Files to modify: Will be determined by the AI
Prompt (copy this into your AI assistant)
Address OWASP A07 (Auth Failures) compliance gap in 'nuxt__nuxt-evals'.

**OWASP Category**: A07 -- Auth Failures
**Fix guidance**: Implement proper session management, use MFA where possible, enforce strong passwords, protect against brute force.

**Steps:**
1. Identify all code paths related to auth failures
2. Apply the fixes described above
3. Add automated tests to verify the fix
4. Document any security assumptions in code comments
HIGH ⚙ moderate #8

Fix quality gate failures (3 conditions)

quality-gate quality
Expected outcome: All quality gate conditions pass
Files to modify: Will be determined by the AI
Prompt (copy this into your AI assistant)
Repository 'nuxt__nuxt-evals' is failing the quality gate.

Failed conditions:
- overall_score: actual 0.0 >= 50 (FAILED)
- security_score: actual 0.0 >= 40 (FAILED)
- critical_vulnerabilities: actual 3.0 <= 0 (FAILED)

Fix each failing condition to make the repo pass the quality gate.
HIGH ⚒ significant #9

Resolve 10 open issues

issues bugs
Expected outcome: All listed issues resolved
Files to modify: evals/nuxt-010-fix-watch-fetch/EVAL.ts, evals/nuxt-ui-003-fix-raw-form/app/pages/index.vue, evals/nuxt-ui-003-fix-raw-form/app/pages/index.vue
Prompt (copy this into your AI assistant)
Repository 'nuxt__nuxt-evals' has 10 open issues:

- [CRITICAL] GHSA-8r6j-v8pm-fqw3: fsevents
- [CRITICAL] GHSA-896r-f27r-55mw: json-schema
- [CRITICAL] GHSA-h755-8qp9-cq85: protobufjs
- [HIGH] Hard-coded sast: [sast:aljefra/ssrf-http-client] SSRF via HTTP Client with Dynamic URL (evals/nuxt-010-fix-watch-fetch/EVAL.ts)
- [HIGH] Hard-coded password: Password Assignment (evals/nuxt-ui-003-fix-raw-form/app/pages/index.vue)
- [HIGH] GHSA-652h-xwhf-q4h6: ssh2
- [HIGH] GHSA-x2mc-8fgj-3wmr: tar-fs
- [HIGH] GHSA-8cj5-5rvv-wf4v: tar-fs
- [HIGH] GHSA-pq67-2wwv-3xjx: tar-fs
- [HIGH] Hard-coded password: Password Assignment (evals/nuxt-ui-003-fix-raw-form/app/pages/index.vue)

Resolve each issue. For security issues, apply the appropriate fix. For quality issues, refactor the affected code.
Powered by Repobility — scan your code at https://repobility.com
HIGH ⚙ moderate #10

Fix 2 SAST/security code findings

sast security code-fix
Expected outcome: All SAST findings resolved
Files to modify: evals/nuxt-010-fix-watch-fetch/EVAL.ts
Prompt (copy this into your AI assistant)
Static analysis found 2 security issues in 'nuxt__nuxt-evals':

- [HIGH] [sast:aljefra/ssrf-http-client] SSRF via HTTP Client with Dynamic URL at evals/nuxt-010-fix-watch-fetch/EVAL.ts:43
- [HIGH] [sast:aljefra/ssrf-http-client] SSRF via HTTP Client with Dynamic URL at evals/nuxt-010-fix-watch-fetch/EVAL.ts:44

For each finding:
- SQL injection: use parameterized queries
- Command injection: use subprocess with list args, no shell=True
- Path traversal: validate and sanitize paths
- Insecure deserialization: use json instead of pickle
- IaC misconfigs: apply the suggested fix from the rule