Back to skill

Security audit

Tmp Skill

Security checks for vulnerabilities and agentic risk

Overview

The skill is a local sales-template and lead-tracking helper, but its lead script can write outside its intended sales folder and stores contact data in plaintext.

Review before installing. Use only with trusted lead names or fix filename validation first, because crafted company names can target other Markdown files. Treat the stored sales records as sensitive plaintext data and avoid putting regulated or unnecessary personal information in them unless your workspace protections and retention practices are appropriate.

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/lead-tracker.sh:17
Finding

Path Traversal Allows Unintended Markdown File Overwrite or Modification

Content
View full analysis

Vulnerability Details

File Location: scripts/lead-tracker.sh, lines 17–22 and 71–79
Vulnerability Type: Path traversal through an insufficiently sanitized company name
Risk Level: Medium

Vulnerable Code

The add command constructs a file path directly from the user-controlled company name and then overwrites that path:

bash
# Create filename from company name
filename=$(echo "$2" | tr '[:upper:]' '[:lower:]' | tr ' ' '-')
lead_file="$LEADS_DIR/${filename}.md"

cat > "$lead_file" << EOF
# Lead: $2

The update command repeats the same unsafe path construction and appends data to the selected file:

bash
filename=$(echo "$2" | tr '[:upper:]' '[:lower:]' | tr ' ' '-')
lead_file="$LEADS_DIR/${filename}.md"

if [ -f "$lead_file" ]; then
    echo "| $(date +%Y-%m-%d) | Stage update | Moved to: $4 |" >> "$lead_file"
    echo "✅ Updated $2 to stage: $4"
else
    echo "❌ Lead not found: $2"
fi

Technical Analysis

The company name in $2 is treated as untrusted input. The transformation only converts uppercase characters to lowercase and spaces to hyphens. It does not remove or reject:

  • Forward slashes
  • .. parent-directory components
  • Absolute paths
  • Repeated separators
  • Symbolic-link destinations

As a result, a value such as ../pipeline/current produces:

text
$LEADS_DIR/../pipeline/current.md

After filesystem path resolution, this points to the pipeline file rather than a file beneath the leads directory.

The add operation uses the shell redirection operator >, so the targeted Markdown file is truncated and replaced. The update operation uses >>, so attacker-controlled stage data is appended to an existing Markdown file.

The .md suffix limits direct targeting to Markdown files. However, the affected application deliberately stores operational data and templates in Markdown, and other agent environments may also interp ...[truncated 2352 chars]

Remediation
View remediation

Remediation Suggestions

  1. Validate company-derived filenames with a strict allowlist. Permit only lowercase ASCII letters, digits, and single hyphens:

    bash
    filename=$(printf '%s' "$2" |
        tr '[:upper:]' '[:lower:]' |
        sed -E 's/[^a-z0-9]+/-/g; s/^-+//; s/-+$//')
    
    if [ -z "$filename" ]; then
        echo "Invalid company name" >&2
        exit 1
    fi
    
  2. Explicitly reject path separators, parent-directory references, and absolute paths before constructing the destination:

    bash
    case "$2" in
        *"/"*|*".."*)
            echo "Company name contains prohibited path characters" >&2
            exit 1
            ;;
    esac
    
  3. Canonicalize the destination and verify that it remains beneath the canonical leads directory. The containment check should be performed after resolving existing parent directories and before opening the file.

  4. Use one shared filename-validation function for both add and update so the operations cannot apply inconsistent security rules.

  5. Prevent accidental destruction of existing records. Use noclobber behavior or explicitly refuse to overwrite a destination unless the user supplies a deliberate replacement option:

    bash
    if [ -e "$lead_file" ]; then
        echo "Lead already exists: $lead_file" >&2
        exit 1
    fi
    
  6. Consider rejecting symbolic links and checking the destination immediately before writing. Where stronger guarantees are required, use a language or API capable of opening files relative to a trusted directory without following links.

  7. Add regression tests for inputs including ../pipeline/current, absolute paths, repeated separators, empty sanitized names, leading dots, and symbolic-link destinations.

Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • MCP Tool PoisoningHidden Instructions, Unicode Deception, Parameter Description Injection
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
  • Supply ChainUnpinned Dependencies, External Script Fetching, Obfuscated Code
Findings (5)

Tp4

High
Category
MCP Tool Poisoning
Confidence
95% confidence
Finding

The declared description promises a broad sales-assistant capability set: CRM integration, lead tracking, outreach automation, and pipeline management. The supplied code does not implement any integration with a CRM, does not track leads, automate outreach, or manage a pipeline. Instead, it only generates static Markdown templates for weekly pipeline reports and forecasts under a local sales analytics directory and can list those files. While report generation is loosely related to sales/pipeline operations, the actual behavior is much narrower and materially different from the declared primary purpose. Therefore this is a description-behavior mismatch.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
96% confidence
Finding

The code does support parts of the declared purpose related to lead tracking and pipeline management by scaffolding local files for those workflows. However, it does not implement any CRM integration, external system connectivity, or outreach automation. Its actual behavior is limited to local filesystem initialization and creation of Markdown templates. Because the declared description emphasizes CRM integration and outreach automation, the description materially overstates what the code chunk actually does.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
90% confidence
Finding

The skill explicitly encourages collecting and storing personal contact data such as names, emails, phone numbers, LinkedIn URLs, titles, and notes, but provides no privacy, retention, access control, consent, or secure-handling guidance. In a sales-assistant context this is common business data, but the absence of safeguards increases the risk of unauthorized exposure, regulatory noncompliance, and over-collection of personal information.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
92% confidence
Finding

The skill recommends syncing lead data to external CRM APIs and automating outreach without warning that contact and deal data may be transmitted to third-party services. This is dangerous because users may unknowingly export personal and business-sensitive information to external platforms without reviewing permissions, data residency, vendor trust, or compliance obligations.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
91% confidence
Finding

The script writes personally identifiable lead data, including names and email addresses, into persistent plaintext files under the user's home directory without any notice, consent, retention control, or access protection. In a sales/CRM skill this is directly in-scope business data, so silent local persistence increases privacy, compliance, and accidental disclosure risk if the workstation is shared, backed up, or compromised.

Content

No source excerpt is available for this finding.

Static analysis

No suspicious patterns detected.