⚡
AI Fix Prompts for Claudeclaw
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/taint-path-traversal] Path Traversal via Tainted Data
security credentials sast
Expected outcome: Secret moved to environment variable, no hardcoded credentials in source
Files to modify:
Opus46/lib/files.jsPrompt (copy this into your AI assistant)
Fix a hardcoded credential in repository 'ramsani__ClaudeClaw'.
**Issue**: Hard-coded sast found ([sast:aljefra/taint-path-traversal] Path Traversal via Tainted Data)
**File**: Opus46/lib/files.js
**Line**: 90
**Severity**: HIGH
**Current code around the issue:**
```
85 | // Leer contenido de archivo (text/code/md)
86 | function readFile(relativePath) {
87 | const fullPath = safePath(relativePath);
88 | const stat = fs.statSync(fullPath);
89 | if (stat.size > 2 * 1024 * 1024) throw new Error('file_too_large'); // 2MB max para preview texto
>>> 90 | return fs.readFileSync(fullPath, 'utf8');
91 | }
92 |
93 | // Mover archivo
94 | function moveFile(fromRel, toRel) {
95 | const from = safePath(fromRel);
```
**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's GitHub App fixes findings like these · https://github.com/apps/repobility-bot
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:
Opus46/public/sw.jsPrompt (copy this into your AI assistant)
Fix a hardcoded credential in repository 'ramsani__ClaudeClaw'.
**Issue**: Hard-coded sast found ([sast:aljefra/ssrf-http-client] SSRF via HTTP Client with Dynamic URL)
**File**: Opus46/public/sw.js
**Line**: 24
**Severity**: HIGH
**Current code around the issue:**
```
19 | self.addEventListener('fetch', e => {
20 | const url = new URL(e.request.url);
21 |
22 | // Network-first para API y WebSocket
23 | if (url.pathname.startsWith('/api/') || url.pathname.startsWith('/ws')) {
>>> 24 | e.respondWith(fetch(e.request).catch(() => new Response('{"error":"offline"}', { headers: { 'Content-Type': 'application/json' } })));
25 | return;
26 | }
27 |
28 | // Cache-first para shell estático
29 | e.respondWith(
```
**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 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:
Opus46/public/sw.jsPrompt (copy this into your AI assistant)
Fix a hardcoded credential in repository 'ramsani__ClaudeClaw'.
**Issue**: Hard-coded sast found ([sast:aljefra/ssrf-http-client] SSRF via HTTP Client with Dynamic URL)
**File**: Opus46/public/sw.js
**Line**: 30
**Severity**: HIGH
**Current code around the issue:**
```
25 | return;
26 | }
27 |
28 | // Cache-first para shell estático
29 | e.respondWith(
>>> 30 | caches.match(e.request).then(cached => cached || fetch(e.request).then(res => {
31 | if (res.ok && SHELL.includes(url.pathname)) {
32 | const clone = res.clone();
33 | caches.open(CACHE_NAME).then(c => c.put(e.request, clone));
34 | }
35 | return res;
```
**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
#4
Remove hard-coded api_key: Telegram Bot Token
security credentials api_key
Expected outcome: Secret moved to environment variable, no hardcoded credentials in source
Files to modify:
telegram-claude-bridge.jsPrompt (copy this into your AI assistant)
Fix a hardcoded credential in repository 'ramsani__ClaudeClaw'.
**Issue**: Hard-coded api_key found (Telegram Bot Token)
**File**: telegram-claude-bridge.js
**Line**: 11
**Severity**: HIGH
**Current code around the issue:**
```
6 | const path = require('path');
7 | const os = require('os');
8 | const readline = require('readline');
9 |
10 | // Configuration
>>> 11 | const TELEGRAM_BOT_TOKEN = '8507509309:AAGjHcxa4UNnPFxnvO0w5sliIXzU9Xonrjo';
12 | const TELEGRAM_API = `https://api.telegram.org/bot${TELEGRAM_BOT_TOKEN}`;
13 | const ALLOWED_USER_ID = '6106631957';
14 | const OPENAI_API_KEY = process.env.OPENAI_API_KEY;
15 | const TMUX_SESSION = 'claude-telegram';
16 | const OFFSET_FILE = path.join(__dirname, '.telegram-offset');
```
**Required fix:**
1. Remove the hardcoded credential from the source code
2. Replace it with an environment variable read: `os.environ.get('API_KEY_KEY')` (Python) or `process.env.API_KEY_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 'ramsani__ClaudeClaw'. **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 'ramsani__ClaudeClaw'. **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 'ramsani__ClaudeClaw'. **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 'ramsani__ClaudeClaw' is failing the quality gate. Failed conditions: - overall_score: actual 0.0 >= 50 (FAILED) - security_score: actual 0.0 >= 40 (FAILED) - critical_vulnerabilities: actual 4.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:
Opus46/public/sw.js, Opus46/public/sw.js, telegram-claude-bridge.js, Opus46/lib/files.jsPrompt (copy this into your AI assistant)
Repository 'ramsani__ClaudeClaw' has 10 open issues: - [CRITICAL] GHSA-wc9v-mj63-m9g5: pg - [CRITICAL] GHSA-g2q5-5433-rhrf: rc - [CRITICAL] GHSA-hr2v-3952-633q: deep-extend - [CRITICAL] GHSA-xvch-5gv4-984h: minimist - [HIGH] Hard-coded sast: [sast:aljefra/ssrf-http-client] SSRF via HTTP Client with Dynamic URL (Opus46/public/sw.js) - [HIGH] Hard-coded sast: [sast:aljefra/ssrf-http-client] SSRF via HTTP Client with Dynamic URL (Opus46/public/sw.js) - [HIGH] Hard-coded api_key: Telegram Bot Token (telegram-claude-bridge.js) - [HIGH] Hard-coded sast: [sast:aljefra/taint-path-traversal] Path Traversal via Tainted Data (Opus46/lib/files.js) - [HIGH] GHSA-qqgx-2p2h-9c37: ini - [HIGH] GHSA-c2qf-rxjj-qqgw: semver Resolve each issue. For security issues, apply the appropriate fix. For quality issues, refactor the affected code.
About: code-quality intelligence by Repobility · https://repobility.com
HIGH
⚙ moderate
#10
Fix 3 SAST/security code findings
sast security code-fix
Expected outcome: All SAST findings resolved
Files to modify:
Opus46/public/sw.js, Opus46/lib/files.jsPrompt (copy this into your AI assistant)
Static analysis found 3 security issues in 'ramsani__ClaudeClaw': - [HIGH] [sast:aljefra/taint-path-traversal] Path Traversal via Tainted Data at Opus46/lib/files.js:90 - [HIGH] [sast:aljefra/ssrf-http-client] SSRF via HTTP Client with Dynamic URL at Opus46/public/sw.js:24 - [HIGH] [sast:aljefra/ssrf-http-client] SSRF via HTTP Client with Dynamic URL at Opus46/public/sw.js:30 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