Back to skill

Security audit

Paycheck

Security checks for vulnerabilities and agentic risk

Overview

This paycheck-branded skill mainly records, searches, and exports pay-related text instead of calculating pay, which creates review-worthy privacy risk for sensitive salary data.

Review this carefully before installing. Treat it as a local plaintext paycheck note logger, not a paycheck calculator. Do not enter real salary, tax, benefit, or offer details unless you are comfortable with them being stored under ~/.local/share/paycheck and possibly included in search results or exports. Prefer a version that actually calculates pay, minimizes retention, supports deletion, and locks down file permissions.

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:5
Finding

Sensitive Payroll Records Are Stored Without Enforced Restrictive Permissions

Content
View full analysis

Vulnerability Details

File Location: scripts/script.sh:5-8, with sensitive-data writes represented at scripts/script.sh:130-136
Vulnerability Type: Insecure local storage permissions for sensitive financial data
Risk Level: Medium

Vulnerable Code

bash
DATA_DIR="${HOME}/.local/share/paycheck"
mkdir -p "$DATA_DIR"

_log() { echo "$(date '+%m-%d %H:%M') $1: $2" >> "$DATA_DIR/history.log"; }

A representative sensitive-data write is:

bash
local input="$*"
local ts=$(date '+%Y-%m-%d %H:%M')
echo "$ts|$input" >> "$DATA_DIR/run.log"
local total=$(wc -l < "$DATA_DIR/run.log")
echo "  [Paycheck] run: $input"
echo "  Saved. Total run entries: $total"
_log "run" "$input"

The same storage pattern is repeated by the other recording commands.

Technical Analysis

The application is intended to record salary, tax, insurance, deduction, and other payroll-related information. It creates its data directory and log files without explicitly enforcing access modes. Consequently, permissions are inherited from the invoking process's umask.

Under a permissive umask, the directory may be accessible to other local users and the generated log files may be readable beyond the owning account. Sensitive input is also written twice: once to the command-specific log and once to history.log. This duplication expands the number of files from which payroll information can be disclosed.

This is an insecure coding practice rather than a privilege-escalation primitive. Exploitation requires local filesystem access and sufficiently permissive effective permissions. The code does not itself grant elevated privileges.

Attack Path

  1. A user runs a recording command and supplies sensitive payroll information, such as salary, tax withholding, insurance, or deduction details.
  2. The script creates ~/.local/share/paycheck and its log files using permissions determined solely by the user's curr ...[truncated 919 chars]
Remediation
View remediation

Remediation Suggestions

  1. Set a restrictive umask before creating any data directories or files:

    bash
    umask 077
    
  2. Create and validate the data directory with owner-only permissions:

    bash
    DATA_DIR="${HOME}/.local/share/paycheck"
    mkdir -p -m 700 "$DATA_DIR"
    chmod 700 "$DATA_DIR"
    
  3. Ensure every log and export file is owner-readable and owner-writable only. Files can be initialized explicitly before use:

    bash
    touch "$DATA_DIR/history.log"
    chmod 600 "$DATA_DIR/history.log"
    

    Apply mode 600 to command logs and generated export files as well.

  4. Check that the data directory is owned by the current user and reject symlinks or unexpected file types before writing. This reduces the risk of writing through attacker-prepared filesystem objects in environments where the home directory is not fully trusted.

  5. Avoid unnecessary duplication of sensitive values in history.log, or record only non-sensitive metadata such as the command name and timestamp.

  6. Clearly document that payroll details are persisted in plaintext and provide a deletion or retention mechanism. If the threat model includes compromise of the user's account or storage device, consider authenticated encryption using a securely managed key.

Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Excessive AgencyUnrestricted Tool Access, Autonomous Decision Making, Scope Creep
  • MCP Tool PoisoningHidden Instructions, Unicode Deception, Parameter Description Injection
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
Findings (12)

Tp4

High
Category
MCP Tool Poisoning
Confidence
99% confidence
Finding

The skill is presented as a paycheck calculator, but the documented behavior is actually a generic persistent logging/export utility for arbitrary user input. That mismatch can mislead users into entering sensitive payroll, compensation, or tax data under the assumption they are performing local calculations, when the real effect is long-term storage and easy retrieval/export of that data.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

High
Category
Not specified by scanner
Confidence
99% confidence
Finding

The manifest and heading claim salary/tax calculation functionality, but the body describes a system for recording, searching, and exporting arbitrary entries. This deceptive interface increases the chance that users will disclose highly sensitive compensation data they would not otherwise store, creating a privacy and data-handling risk.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

High
Category
Not specified by scanner
Confidence
99% confidence
Finding

The implementation is materially inconsistent with the declared paycheck-calculation purpose and instead behaves as a generic persistence, search, and export utility for arbitrary user input. That mismatch is dangerous in an agent-skill context because it broadens data collection and retention beyond user expectations, enabling covert logging of sensitive financial or personal content under the guise of a salary tool.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
93% confidence
Finding

Although the document later mentions local storage, the high-level skill description does not clearly warn users that entered paycheck data will be persistently written to disk. Because paycheck details often include salary, deductions, and other confidential financial data, insufficient disclosure can lead to unintended exposure on shared or compromised systems.

Content

No source excerpt is available for this finding.

Ssd 3

Medium
Category
Not specified by scanner
Confidence
94% confidence
Finding

The skill encourages persistent storage and export of paycheck-related information, which is sensitive personal financial data. Even without network exfiltration, plaintext local logs and export files can be accessed by other local users, backup systems, endpoint tooling, or malware, broadening exposure unnecessarily.

Content

No source excerpt is available for this finding.

Intent-Code Divergence

Medium
Category
Not specified by scanner
Confidence
94% confidence
Finding

The commands are named as if they perform payroll-related processing, but each command merely records inputs to local files or shows prior entries. This can trick users into treating the tool like a calculator or analyzer while it silently accumulates a searchable dataset of sensitive financial information.

Content

No source excerpt is available for this finding.

Ssd 3

Medium
Category
Not specified by scanner
Confidence
92% confidence
Finding

The examples normalize logging and later searching/exporting detailed compensation records such as gross salary, taxes, insurance, and offer comparisons. This makes the skill more dangerous in context because it actively promotes creation of a centralized plaintext archive of sensitive payroll and employment data.

Content

No source excerpt is available for this finding.

Intent-Code Divergence

Medium
Category
Not specified by scanner
Confidence
91% confidence
Finding

Branding the script as a generic 'utility toolkit' contradicts the manifest claim that it calculates salary breakdowns, indicating deceptive presentation. Misrepresentation is dangerous because users and agent operators may grant trust and supply sensitive payroll information based on the advertised purpose while the implementation serves a different data-collection role.

Content

No source excerpt is available for this finding.

Context-Inappropriate Capability

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The script creates a persistent data directory and stores user-supplied inputs in local history files despite the skill being described as a paycheck estimator. In context, retained storage and later export of arbitrary inputs can capture salary details, tax IDs, deductions, or other sensitive data without necessity, increasing privacy and data-exposure risk.

Content

No source excerpt is available for this finding.

Context-Inappropriate Capability

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The command surface is unusually broad and generic for a paycheck skill, exposing multiple arbitrary-input entry points that all feed into local logging. In an agent environment, this expands opportunities to solicit and retain unrelated user data under innocuous command names, which is inconsistent with least privilege and stated functionality.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
96% confidence
Finding

The export routine aggregates prior log contents into JSON, CSV, or TXT files on disk without clearly informing the user that historical entries are being recopied and preserved. This increases the blast radius of previously collected sensitive data by creating additional artifacts that may be easier to discover, share, or exfiltrate.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
97% confidence
Finding

These command handlers persist all user-provided input to log files without any clear warning, consent flow, or data-minimization controls. Because a paycheck tool is likely to receive sensitive compensation and deduction data, silent logging materially increases privacy risk and could expose data to other local users, backups, or later exports.

Content

No source excerpt is available for this finding.

Static analysis

No suspicious patterns detected.