Back to skill

Security audit

Jd Writer

Security checks for vulnerabilities and agentic risk

Overview

This skill appears to be a job-description helper, but the package is inconsistent and includes an undisclosed local history logger for user inputs.

Review before installing. The core JD Python script appears local and non-networked, but the package should clarify the intended entry point, remove or document the unrelated script.sh, and disable or clearly disclose local history logging before users enter confidential hiring plans, company names, or draft JD text.

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

Note
Location
scripts/script.sh:35
Finding

Undisclosed Persistent Logging of Raw User Input

Content
View full analysis

Vulnerability Details

File Location: scripts/script.sh:5-7, scripts/script.sh:35-40, and equivalent logging calls through line 82
Vulnerability Type: Plaintext storage of potentially sensitive user input
Risk Level: Low

Vulnerable Code

bash
DATA_DIR="${JD_WRITER_DIR:-${XDG_DATA_HOME:-$HOME/.local/share}/jd-writer}"
DB="$DATA_DIR/data.log"
mkdir -p "$DATA_DIR"
bash
_log() { echo "$(date '+%m-%d %H:%M') $1: $2" >> "$DATA_DIR/history.log"; }

cmd_draft() {
    echo "  Draft: $1
      Target: ${2:-800} words"
    _log "draft" "${1:-}"
}

The same _log function is invoked by the draft, headline, outline, seo, schedule, hooks, cta, repurpose, metrics, and ideas commands.

Technical Analysis

The script persistently writes the first user-supplied command argument into history.log. The project documentation does not disclose this data retention, and the logging is unrelated to the documented job-description workflow.

The data directory and history file are created without explicit restrictive permissions. Their effective permissions therefore depend on the process umask and the permissions of parent directories. Under a common umask such as 0022, the directory and newly created file may be accessible to other local principals when the parent path is traversable.

Input is recorded verbatim without redaction, minimization, expiry, or user consent. Users may pass confidential recruiting plans, business topics, company names, or other sensitive text. The JD_WRITER_DIR environment variable can also redirect the log to an unexpected location, although exploitation of that behavior requires control over the execution environment.

This issue does not provide command execution, privilege escalation, or network exfiltration. Its security effect is persistent local disclosure and retention of user data.

Attack Path

  1. A user invokes an affected command ...[truncated 1244 chars]
Remediation
View remediation

Remediation Suggestions

  1. Remove input logging if it is not essential to the documented functionality.
  2. If logging is required, make it explicitly opt-in and clearly disclose what is stored, where it is stored, and for how long.
  3. Avoid retaining raw arguments. Store only non-sensitive aggregate events such as the command name, or redact user content before writing it.
  4. Create the storage directory and log with restrictive permissions:
    bash
    umask 077
    install -d -m 700 -- "$DATA_DIR"
    touch "$DATA_DIR/history.log"
    chmod 600 "$DATA_DIR/history.log"
    
  5. Validate that JD_WRITER_DIR resolves to an approved user-owned location before writing to it.
  6. Add retention controls, log rotation, and a documented command for deleting stored history.
  7. Use printf rather than echo for predictable logging behavior:
    bash
    printf '%s %s: %s\n' "$(date '+%m-%d %H:%M')" "$1" "$2" >> "$DATA_DIR/history.log"
    
  8. Add tests confirming that sensitive command arguments are not written to persistent storage by default.
Vulnerability Patterns
  • Excessive AgencyUnrestricted Tool Access, Autonomous Decision Making, Scope Creep
  • 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 (4)

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

This code presents itself entirely as a Chinese-only '招聘JD撰写助手', and all user-facing prompts, commands, and output strings are fixed in Chinese. The file does not offer any language or locale opt-in, so it effectively imposes a specific language policy on users.

Content

No source excerpt is available for this finding.

Context-Inappropriate Capability

Medium
Category
Not specified by scanner
Confidence
92% confidence
Finding

The script logs raw user-supplied inputs to a local history file via the shared _log function, and content-assistant prompts may contain sensitive business plans, drafts, customer data, or credentials pasted by mistake. Because this persistence is automatic and not disclosed in the interface, it creates an unnecessary confidentiality risk on multi-user systems, shared backups, or compromised hosts.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

User command inputs are silently written to a local history log without any warning, consent, or privacy notice. In the context of a writing assistant, users may reasonably enter confidential prompts or proprietary text, so undisclosed local retention increases the chance of sensitive data exposure and violates user expectations.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
90% confidence
Finding

The description and usage-facing text are presented in both Chinese and English, but the skill does not state whether the user can choose their preferred language or locale. This can violate language/locale policy expectations when a skill imposes or defaults to a mixed-language experience without opt-in.

Content

No source excerpt is available for this finding.

Static analysis

No suspicious patterns detected.