47fac22230
- .claude/CLAUDE.md - .claude/commands/subagentes.md - .claude/rules/INDEX.md - .mcp.json - bash/functions/cybersecurity/analyze_dns.md - bash/functions/cybersecurity/audit_http_headers.md - bash/functions/cybersecurity/audit_ssh_config.md - bash/functions/cybersecurity/check_firewall.md - bash/functions/cybersecurity/detect_suspicious_users.md - bash/functions/cybersecurity/encrypt_file.md - ... Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
45 lines
1.2 KiB
Markdown
45 lines
1.2 KiB
Markdown
---
|
|
name: keepass_set
|
|
kind: function
|
|
lang: bash
|
|
domain: infra
|
|
version: "1.0.0"
|
|
purity: impure
|
|
signature: "keepass_set(entry: string, password: string, username?: string, url?: string)"
|
|
description: "Crea o sobreescribe una entry en el KeePassXC database. Auto-detecta si existe (edit) o no (add). Soporta username y url opcionales."
|
|
tags: [keepass, keepassxc, secret, credential, set, write, pendiente-usar]
|
|
uses_functions: []
|
|
uses_types: []
|
|
returns: []
|
|
returns_optional: false
|
|
error_type: "error_go_core"
|
|
imports: []
|
|
params:
|
|
- name: entry
|
|
desc: "path de la entry (ej. 'Servers/prod-mysql'); si el grupo no existe falla"
|
|
- name: password
|
|
desc: "password en texto plano a almacenar"
|
|
- name: username
|
|
desc: "username opcional"
|
|
- name: url
|
|
desc: "url opcional"
|
|
output: "ninguno (exit 0 si OK)"
|
|
tested: false
|
|
tests: []
|
|
test_file_path: ""
|
|
file_path: "bash/functions/infra/keepass_set.sh"
|
|
---
|
|
|
|
## Ejemplo
|
|
|
|
```bash
|
|
source keepass_set.sh
|
|
keepass_set "Servers/prod-mysql" "secret123" "admin" "https://prod.example.com"
|
|
```
|
|
|
|
## Notas
|
|
|
|
- Add: `keepassxc-cli add -p`. Edit: `keepassxc-cli edit -p`.
|
|
- Existencia detectada via `show -q` (exit code).
|
|
- El grupo (parte antes del ultimo `/`) debe existir; KeePassXC no auto-crea jerarquia.
|