T09 · Insecure Skill Coding Practices
- Location
scripts/enviar.py:239- Finding
Sensitive-content controls are bypassed for outbound audio messages
- Content
View full analysis
- Remediation
View remediation
Security audit
Security checks for vulnerabilities and agentic risk
The skill appears purpose-built rather than malicious, but it needs Review because it can send WhatsApp messages for a user and some safety promises are not technically enforced.
Install only in a tightly controlled OpenClaw environment where outbound WhatsApp sending is restricted to the wrapper script, the single allowed inbound chat is enforced outside the model, and users understand that voice notes may carry secrets because they are not content-scanned before sending.
scripts/enviar.py:239Sensitive-content controls are bypassed for outbound audio messages
scripts/revisar-privacidad.sh:7Privacy publication guard does not detect contact files by filename
Hay coincidencia parcial importante: el código sí respalda la parte de 'manda sus mensajes y sus notas de voz con confirmación hablada obligatoria'. Sin embargo, la descripción general del skill es más amplia e incluye leer documentos/correo y redactar textos, funcionalidades ausentes en este fragmento. Además, el código introduce comportamientos materiales no declarados relacionados con seguridad y operación: resuelve destinatarios desde una libreta local, exige coincidencia de 4 dígitos del teléfono, maneja modos como solo-lectura/retenido, filtra contenido sensible en mensajes de texto, limita rutas de audio y escribe un registro de auditoría. Eso hace que la descripción no represente con precisión suficiente lo que este código realmente hace.
The declared description is for an end-user accessibility assistant focused on messaging, reading content, and drafting text for someone with low vision. The supplied code does none of those things. Instead, it implements a privacy/publication check over files in the project directory, searching for real-looking personal data and system keys, then signaling whether the content is safe to publish. This is a materially different primary purpose and introduces undeclared capabilities unrelated to the stated assistive functions.
The README makes a strong safety claim that nothing is sent without mandatory spoken confirmation, but later admits that key anti-send behaviors are only model instructions and are not technically enforced. In this skill’s context, the user cannot reliably verify on-screen actions, so a mismatch between claimed guarantees and actual enforcement materially increases the risk of unauthorized or mistaken communications.
The README presents a single closed-fail sending bottleneck as a core safeguard, but later discloses that the agent’s shell access allows bypassing that bottleneck entirely. For an assistive skill acting on behalf of a low-vision user, this undermines the primary trust boundary and means a compromised or misaligned agent could send messages outside the documented safety path.
The skill directs the agent to use shell execution (python3 scripts/enviar.py), read local files such as memory/contactos.md, and rely on logging/operational files, but it does not declare any explicit tool permissions or scope boundaries. In an agent environment, undeclared capabilities weaken least-privilege controls and make it easier for the skill to access or modify resources beyond what reviewers and runtime policy expect.
The description and operating instructions force a single language/locale experience for the skill user and operator. Under the policy, language constraints should either be optional or clearly documented as a justified locale-specific constraint; this file does not state such an opt-in or limitation.
The module docstring, CLI examples, and all user-facing prompts are written exclusively in Spanish, and the confirmation logic only accepts Spanish trigger phrases such as "manda" and "envia". This imposes a language constraint on users without any documented opt-in or explicit justification for a locale-specific deployment.
The log path REG is derived from LAZARILLO_BASE, which comes from an environment variable, and is later opened for append without constraining it to a trusted directory. If an attacker can influence the service environment, they can redirect writes to unintended files, potentially causing log forgery, file clobbering, or writes through symlinks in a security-sensitive workflow that treats logging as a precondition for sending.
os.makedirs(os.path.dirname(REG), exist_ok=True)
try:
import fcntl
with open(REG, "a", encoding="utf-8") as fh:
fcntl.flock(fh, fcntl.LOCK_EX)
fh.write(json.dumps(evento, ensure_ascii=False) + "\n")
fh.flush()
subprocess module calls execute external commands. Without careful input validation, this enables command injection.
if a.dry_run:
cmd.append("--dry-run")
try:
r = subprocess.run(cmd, capture_output=True, text=True, timeout=TIMEOUT_ENVIO)
rc, salida = r.returncode, (r.stdout + r.stderr).strip()
except subprocess.TimeoutExpired:
rc, salida = 124, f"se colgo mas de {TIMEOUT_ENVIO} segundos"
This markdown file uses Spanish exclusively for user-facing documentation, beginning with the heading and continuing throughout the release notes. Under the policy rule, forcing a specific language without opt-in or justification can be a natural-language policy violation.
The README includes a locale-specific statement that the skill is in use "en español de México." For a language/locale policy check, this can read as a fixed locale expectation without documenting user choice, opt-in, or a clear region-specific justification in the skill description.
Line L25 states "Respuestas siempre en audio," which imposes a fixed communication mode for all interactions. Under the policy rule, hard-coded language/locale-style communication constraints should be flagged when the user is not offered an explicit choice or opt-in.
No suspicious patterns detected.