AI Fix Prompts for Ansible

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.

5
Total Prompts
0
Critical (P0)
4
High (P1)
1
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 secret: FTP Credentials

security credentials secret
Expected outcome: Secret moved to environment variable, no hardcoded credentials in source
Files to modify: conf/mpv/portable_config/scripts/file-browser/addons/root.lua
Prompt (copy this into your AI assistant)
Fix a hardcoded credential in repository 'anasalqoyyum__ansible'.

**Issue**: Hard-coded secret found (FTP Credentials)
**File**: conf/mpv/portable_config/scripts/file-browser/addons/root.lua
**Line**: 16
**Severity**: HIGH

**Current code around the issue:**
```
      11 |     [
      12 |         { "name": "Favourites/" },
      13 |         { "label": "~/", "name": "C:/Users/User/" },
      14 |         { "label": "1TB HDD", "name": "D:/" },
      15 |         { "ass": "{\\c&H007700&}Green Text", "name": "E:/" },
>>>   16 |         { "label": "FTP Server", name: "ftp://user:[email protected]/" }
      17 |     ]
      18 | 
      19 |     Make sure local directories always end with `/`.
      20 |     `path` and `name` behave the same in the root but either name or label should have a value.
      21 |     ASS styling codes: https://aegi.vmoe.info/docs/3.0/ASS_Tags/
```

**Required fix:**
1. Remove the hardcoded credential from the source code
2. Replace it with an environment variable read: `os.environ.get('SECRET_KEY')` (Python) or `process.env.SECRET_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
Source: Repobility analyzer · https://repobility.com
HIGH ⚒ significant #2

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 'anasalqoyyum__ansible'.

**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 #3

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 'anasalqoyyum__ansible'.

**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 ⚒ significant #4

Resolve 10 open issues

issues bugs
Expected outcome: All listed issues resolved
Files to modify: conf/mpv/portable_config/scripts/file-browser/addons/root.lua, conf/mpv/portable_config/scripts/playlistmanager.lua, dotfiles/nvim/.config/nvim/lazy-lock.json, dotfiles/nvim/.config/nvim/lazy-lock.json, dotfiles/nvim/.config/nvim/lazy-lock.json
Prompt (copy this into your AI assistant)
Repository 'anasalqoyyum__ansible' has 10 open issues:

- [HIGH] Hard-coded secret: FTP Credentials (conf/mpv/portable_config/scripts/file-browser/addons/root.lua)
- [MEDIUM] Hard-coded wallet: Solana Address (conf/mpv/portable_config/scripts/playlistmanager.lua)
- [MEDIUM] Hard-coded wallet: Solana Address (dotfiles/nvim/.config/nvim/lazy-lock.json)
- [MEDIUM] Hard-coded wallet: Solana Address (dotfiles/nvim/.config/nvim/lazy-lock.json)
- [MEDIUM] Hard-coded wallet: Solana Address (dotfiles/nvim/.config/nvim/lazy-lock.json)
- [MEDIUM] Hard-coded wallet: Solana Address (dotfiles/nvim/.config/nvim/lazy-lock.json)
- [MEDIUM] Hard-coded wallet: Solana Address (dotfiles/nvim/.config/nvim/lazy-lock.json)
- [MEDIUM] Hard-coded wallet: Solana Address (dotfiles/nvim/.config/nvim/lazy-lock.json)
- [MEDIUM] Hard-coded wallet: Solana Address (dotfiles/nvim/.config/nvim/lazy-lock.json)
- [MEDIUM] Hard-coded wallet: Solana Address (dotfiles/nvim/.config/nvim/lazy-lock.json)

Resolve each issue. For security issues, apply the appropriate fix. For quality issues, refactor the affected code.
MEDIUM ⚒ significant #5

Simplify 5 high-complexity files

complexity refactoring quality
Expected outcome: All listed files reduced to medium or low complexity
Files to modify: conf/mpv/portable_config/scripts/SmartCopyPaste.lua, dotfiles/zsh/.p10k.zsh, conf/mpv/portable_config/scripts/thumbfast.lua, conf/mpv/portable_config/scripts/file-browser/modules/navigation/cursor.lua, dotfiles/nvim/.config/nvim/lua/config/autocmds.lua
Prompt (copy this into your AI assistant)
These files in 'anasalqoyyum__ansible' have high cyclomatic complexity:

- **conf/mpv/portable_config/scripts/SmartCopyPaste.lua**: complexity=247, max nesting=6, longest function=121 lines
- **dotfiles/zsh/.p10k.zsh**: complexity=187, max nesting=2, longest function=1291 lines
- **conf/mpv/portable_config/scripts/thumbfast.lua**: complexity=129, max nesting=6, longest function=87 lines
- **conf/mpv/portable_config/scripts/file-browser/modules/navigation/cursor.lua**: complexity=33, max nesting=4, longest function=97 lines
- **dotfiles/nvim/.config/nvim/lua/config/autocmds.lua**: complexity=31, max nesting=1, longest function=161 lines

For each file:
1. Break large functions into smaller, focused functions
2. Reduce nesting depth (extract early returns, use guard clauses)
3. Simplify conditional logic
4. Extract complex expressions into named variables