T09 · Insecure Skill Coding Practices
- Location
SKILL.md:65- Finding
Execution of Unbundled and Unaudited Secret-Handling Scripts
- Content
View full analysis
- Remediation
View remediation
Security audit
Security checks for vulnerabilities and agentic risk
The skill matches its KeePassXC purpose, but it should be reviewed because it tells users to run unbundled local scripts that handle secrets and includes an unsafe password-handling example.
Review this skill before installing or using it with real secrets. Only run the referenced ~/.cursor/scripts helpers if you personally trust their source and have checked their contents, ownership, permissions, and symlink status. Replace the literal echo password example with an interactive prompt or a trusted keyring flow, and adapt the hardcoded personal paths to your own environment.
SKILL.md:65Execution of Unbundled and Unaudited Secret-Handling Scripts
SKILL.md:87KeePassXC Database Password Exposed Through Shell Command Text
Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.
# Uruchom skrypt (wymaga otwartej bazy w GUI)
~/.cursor/scripts/save-keepass-password-to-keyring.sh
The top-level description is written in Polish, and much of the operational guidance throughout the file is also Polish. This imposes a specific language/locale on users without any opt-in or explicit statement that the skill is intended only for Polish-speaking users.
The documentation asserts that only the database password is stored in the keyring and that there is no fallback to other storage, but later describes using a KeePass database entry as a fallback source for that same password. This creates a circular trust model and weakens operator understanding of where the master credential may reside, increasing the chance of insecure deployment or accidental exposure.
Skill establishes unauthorized persistence across sessions via cron jobs, startup scripts, or state files. Session persistence allows an attacker to maintain access beyond the current interaction.
1. **Sprawdzenie:** `keepassxc-cli ls "$KEEPASS_DB_PATH" "ProjectName/EnvName"` (ew. `-R`) lub `keepassxc-cli locate "$KEEPASS_DB_PATH" "EntryTitle"` — czy wpis już jest?
2. **Jeśli wpis istnieje** → użyj **edit**, nie add: `keepassxc-cli edit "$KEEPASS_DB_PATH" "ProjectName/EnvName/EntryTitle"` (opcje `-t`, `-u`, `--url`, `-p`/`-g` dla hasła).
3. **Jeśli brak grupy** → najpierw **mkdir:** `keepassxc-cli mkdir "$KEEPASS_DB_PATH" "ProjectName/EnvName"`.
4. **Jeśli wpisu nie ma** → **add:** `keepassxc-cli add "$KEEPASS_DB_PATH" "ProjectName/EnvName/EntryTitle"` z `-u username`, `--url` (opcjonalnie), `-p` (prompt hasła) lub `-g` (generuj hasło).
**Komendy keepassxc-cli:** `add`, `edit`, `show`, `ls`, `locate`, `mkdir`, `rm`. Ograniczenia: w wielu wersjach CLI **add** i **edit** nie obsługują custom attributes ani Notes; tylko Title, Username, URL, Password.
The security section claims all methods use secure keyring mechanisms, but the actual fallback chain includes reading from a KeePass entry and interactive password entry. Misstating the security properties of the retrieval flow can cause users or downstream agents to rely on weaker handling than expected, especially when automating secret access.
Commands invoke sudo or root privileges. Verify this elevated access is necessary and justified.
Rozwiązanie:
sudo apt update
sudo apt install -y keepassxc
Commands invoke sudo or root privileges. Verify this elevated access is necessary and justified.
Rozwiązanie:
sudo apt update
sudo apt install -y keepassxc