Back to skill

Security audit

Cover Letter

Security checks for vulnerabilities and agentic risk

Overview

This cover-letter skill is not malicious, but it should be reviewed because one bundled launcher quietly stores user-provided arguments in local plaintext files and does not match the advertised cover-letter behavior.

Install only if you are comfortable with a Chinese-focused, template-based cover-letter helper. Avoid putting sensitive personal details into the cover-letter command wrapper unless you have checked or cleaned its local data files, because one script records arguments under the user's local data directory in plaintext.

Vulnerability Patterns
  • Insecure Skill Coding PracticesFinds exploitable flaws such as hardcoded secrets or command injection
  • Skill Instruction HijackingAlters the agent's session goals or safety constraints when the skill loads
  • Agent Memory PoisoningWrites attacker-controlled rules into memory that affect later sessions
  • Remote Payload Retrieval and ExecutionFetches external code whose behavior can change after review
  • Embedded Malicious CodeShips malicious scripts inside the skill and executes them locally
Findings (1)

T09 · Insecure Skill Coding Practices

Warning
Location
scripts/script.sh:6
Finding
Undisclosed Plaintext Persistence of User-Supplied Arguments## Vulnerability Details **File Location**: `scripts/script.sh:6-9, 34, 36-38, 55-58` **Vulnerability Type**: Undisclosed plaintext storage of potentially sensitive user input **Risk Level**: Medium ### Vulnerable Code ```bash DATA_DIR="${COVER_LETTER_DIR:-${XDG_DATA_HOME:-$HOME/.local/share}/cover-letter}" DB="$DATA_DIR/data.log" mkdir -p "$DATA_DIR" ``` ```bash _log() { echo "$(date '+%m-%d %H:%M') $1: $2" >> "$DATA_DIR/history.log"; } cmd_run() { echo " Running: $1" _log "run" "${1:-}" } ``` ```bash cmd_add() { echo "$(date +%Y-%m-%d) $*" >> "$DB"; echo " Added: $*" _log "add" "${1:-}" } ``` ### Technical Analysis The launcher creates persistent storage under the user's data directory on every invocation. It then writes command arguments to `history.log`; the `add` command additionally writes the complete argument list to `data.log`. The project documentation presents the tool as a cover-letter generator and directs users to invoke `cover-letter run`. Users may consequently supply names, employers, job titles, contact information, employment history, or other personal data. The script does not disclose that arguments are retained, request consent, define a retention policy, redact sensitive fields, or establish restrictive file permissions. The files are created using the process's existing `umask`. On systems with permissive defaults, other local accounts may be able to read the stored information. The append operations also do not verify that `history.log` and `data.log` are regular files rather than symbolic links. If an attacker can modify the data directory—for example, through an unsafe custom `COVER_LETTER_DIR`, prior directory compromise, or another process running as the same user—the attacker can redirect appended content to another file writable by the victim. This behavior is especially concerning because `scripts/script.sh` does not implement the advertised cover-letter generation functionality; it behaves as a generi ...[truncated 1571 chars]
Remediation
## Remediation Suggestions 1. Remove the generic logging and CRUD subsystem from the cover-letter launcher unless persistent storage is necessary for its documented purpose. 2. Do not log raw command arguments. Record only non-sensitive operational metadata, or redact names, contact details, employers, and free-form content. 3. Clearly disclose all persistent storage behavior and obtain explicit user consent before retaining cover-letter data. 4. Apply restrictive permissions before creating storage: ```bash umask 077 mkdir -p -- "$DATA_DIR" chmod 700 -- "$DATA_DIR" ``` 5. Create data files with mode `0600` and verify ownership before every write. 6. Reject symbolic links and non-regular files. Prefer securely opened file descriptors with no-follow protections where supported rather than shell redirection to attacker-influenced paths. 7. Validate `COVER_LETTER_DIR` and avoid using a directory that is shared, group-writable, world-writable, or owned by another user. 8. Implement an explicit deletion command and a documented retention period. 9. Align `scripts/script.sh` with the documented cover-letter functionality, or update the documentation so users are not misled about what `cover-letter run` executes.
Vulnerability Patterns
  • MCP Tool PoisoningHidden Instructions, Unicode Deception, Parameter Description Injection
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
  • Supply ChainUnpinned Dependencies, External Script Fetching, Obfuscated Code
Findings (7)

Natural-Language Policy Violations

Medium
Confidence
91% confidence
Finding
The phrase '专为中文用户设计,理解中国市场和文化' indicates a locale-specific orientation as a preferred default. Because the skill also claims Chinese/English support elsewhere, but does not present this locale focus as an opt-in or clearly justified regional constraint, it creates a natural-language locale policy concern.

Natural-Language Policy Violations

Medium
Confidence
93% confidence
Finding
This shell script's user-facing comments, help text, generated output, and scoring messages all assume Chinese as the required language. The policy requires flagging skills that force a specific language without user opt-in or a clearly justified regional scope.

Intent-Code Divergence

Medium
Confidence
97% confidence
Finding
The header comment and help text identify the tool as 'cover-letter', which implies functionality centered on drafting or managing cover letters. However, the code only implements generic commands like add/list/search/export against a local log file, with no cover-letter-specific processing or document functionality, creating an active contradiction between the script's stated identity and its behavior.

Missing User Warnings

Medium
Confidence
90% confidence
Finding
The logging helper silently writes command activity and user-supplied arguments to a persistent history file under the user’s data directory. This creates an undisclosed privacy risk because potentially sensitive inputs may be retained on disk longer than the user expects and could later be accessed by other local processes or users depending on system configuration.

Missing User Warnings

Medium
Confidence
95% confidence
Finding
The add command persists arbitrary user-provided content to a local database file without clearly informing the user that the data will be stored. If users enter sensitive material, it may remain on disk indefinitely and be exposed through backups, local compromise, or accidental disclosure.

Intent-Code Divergence

Low
Confidence
94% confidence
Finding
The comment describes the script as a '求职信生成器(真实生成版)', implying substantive content generation. In practice, the code emits fixed, hard-coded template text with placeholder fields substituted, rather than generating tailored original content beyond template interpolation.

Natural-Language Policy Violations

Low
Confidence
86% confidence
Finding
This markdown file contains user-facing guidance exclusively in Chinese, and there is no indication that the skill supports multiple languages or that Chinese is an explicitly opt-in locale. Per the policy rule, forcing a specific language without user choice can be a natural-language policy violation.

Static analysis

No suspicious patterns detected.