⚡
AI Fix Prompts for Handoff
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.
8
Total Prompts
0
Critical (P0)
8
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-requests] SSRF via HTTP Client with Variable URL
security credentials sast
Expected outcome: Secret moved to environment variable, no hardcoded credentials in source
Files to modify:
scripts/build_full.pyPrompt (copy this into your AI assistant)
Fix a hardcoded credential in repository 'kipyin__handoff'.
**Issue**: Hard-coded sast found ([sast:aljefra/ssrf-requests] SSRF via HTTP Client with Variable URL)
**File**: scripts/build_full.py
**Line**: 104
**Severity**: HIGH
**Current code around the issue:**
```
99 | """
100 | BUILD_ROOT.mkdir(parents=True, exist_ok=True)
101 | if EMBED_ZIP_PATH.exists():
102 | return
103 | print(f"Downloading embedded Python {PY_VERSION} from {EMBED_ZIP_URL}...")
>>> 104 | with urllib.request.urlopen(EMBED_ZIP_URL) as resp, EMBED_ZIP_PATH.open("wb") as f:
105 | shutil.copyfileobj(resp, f)
106 |
107 |
108 | def _configure_pth_file() -> None:
109 | """Configure `pythonXX._pth` so Lib/site-packages and current dir are on sys.path."""
```
**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-requests] SSRF via HTTP Client with Variable URL
security credentials sast
Expected outcome: Secret moved to environment variable, no hardcoded credentials in source
Files to modify:
scripts/build_full.pyPrompt (copy this into your AI assistant)
Fix a hardcoded credential in repository 'kipyin__handoff'.
**Issue**: Hard-coded sast found ([sast:aljefra/ssrf-requests] SSRF via HTTP Client with Variable URL)
**File**: scripts/build_full.py
**Line**: 375
**Severity**: HIGH
**Current code around the issue:**
```
370 | archive_path = BUILD_ROOT / archive_name
371 | if archive_path.exists():
372 | return
373 | url = f"https://github.com/astral-sh/python-build-standalone/releases/download/{PBS_VERSION}/{archive_name}"
374 | print(f"Downloading standalone Python {PY_VERSION} for macOS from {url}...")
>>> 375 | with urllib.request.urlopen(url) as resp, archive_path.open("wb") as f:
376 | shutil.copyfileobj(resp, f)
377 |
378 |
379 | def _extract_standalone_python_mac() -> None:
380 | """Extract the standalone Python tarball into the build directory."""
```
**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/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:
src/handoff/db.pyPrompt (copy this into your AI assistant)
Fix a hardcoded credential in repository 'kipyin__handoff'.
**Issue**: Hard-coded sast found ([sast:aljefra/taint-path-traversal] Path Traversal via Tainted Data)
**File**: src/handoff/db.py
**Line**: 39
**Severity**: HIGH
**Current code around the issue:**
```
34 | Path to the SQLite database (from HANDOFF_DB_PATH or default).
35 |
36 | """
37 | override = os.environ.get("HANDOFF_DB_PATH")
38 | if override:
>>> 39 | path = Path(override).expanduser().resolve()
40 | path.parent.mkdir(parents=True, exist_ok=True)
41 | return path
42 | return _get_default_db_path()
43 |
44 |
```
**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
⚒ significant
#4
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 'kipyin__handoff'. **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
#5
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 'kipyin__handoff'. **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
⚙ moderate
#6
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 'kipyin__handoff' is failing the quality gate. Failed conditions: - overall_score: actual 0.0 >= 50 (FAILED) - security_score: actual 0.0 >= 40 (FAILED) - critical_vulnerabilities: actual 19.0 <= 0 (FAILED) Fix each failing condition to make the repo pass the quality gate.
HIGH
⚒ significant
#7
Resolve 10 open issues
issues bugs
Expected outcome: All listed issues resolved
Files to modify: Will be determined by the AI
Prompt (copy this into your AI assistant)
Repository 'kipyin__handoff' has 10 open issues: - [CRITICAL] GHSA-8m9x-pxwq-j236: pillow - [CRITICAL] GHSA-8vj2-vxx3-667w: pillow - [CRITICAL] GHSA-43fq-w8qq-v88h: pillow - [CRITICAL] GHSA-7534-mm45-c74v: pillow - [CRITICAL] GHSA-pr76-5cm5-w9cj: gitpython - [CRITICAL] GHSA-hcpj-qp55-gfph: gitpython - [CRITICAL] GHSA-9fq2-x9r6-wfmf: numpy - [CRITICAL] GHSA-3f63-hfp8-52jq: pillow - [CRITICAL] GHSA-57h3-9rgr-c24m: pillow - [CRITICAL] GHSA-hvr8-466p-75rh: pillow Resolve each issue. For security issues, apply the appropriate fix. For quality issues, refactor the affected code.
HIGH
⚙ moderate
#8
Fix 3 SAST/security code findings
sast security code-fix
Expected outcome: All SAST findings resolved
Files to modify:
scripts/build_full.py, src/handoff/db.pyPrompt (copy this into your AI assistant)
Static analysis found 3 security issues in 'kipyin__handoff': - [HIGH] [sast:aljefra/ssrf-requests] SSRF via HTTP Client with Variable URL at scripts/build_full.py:104 - [HIGH] [sast:aljefra/ssrf-requests] SSRF via HTTP Client with Variable URL at scripts/build_full.py:375 - [HIGH] [sast:aljefra/taint-path-traversal] Path Traversal via Tainted Data at src/handoff/db.py:39 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