Back to skill

Security audit

feedback-loop-fine-tuner

Security checks for vulnerabilities and agentic risk

Overview

This is a local feedback and fine-tuning helper whose sensitive data handling is expected for its purpose, but exported or reused conversations need careful handling.

Install only if you intend to process conversation feedback for analysis or model improvement. Do not feed secrets, regulated data, or private customer content into training exports without consent, redaction, access controls, and retention rules. Prefer JSON exports or fix the CSV exporter before opening exported files in spreadsheets.

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
index.js:139
Finding

CSV Formula Injection in Feedback Export

Content
View full analysis

Vulnerability Details

File Location: index.js, lines 139–153
Vulnerability Type: CSV formula injection
Risk Level: Medium

Vulnerable Code

javascript
exportFeedback(format = 'json') {
  if (format === 'json') {
    return JSON.stringify(this.feedbackStore, null, 2);
  } else if (format === 'csv') {
    const headers = ['id', 'timestamp', 'conversationId', 'rating', 'query', 'response'];
    const rows = this.feedbackStore.map(f => [
      f.id,
      f.timestamp,
      f.conversationId,
      f.rating,
      `"${(f.query || '').replace(/"/g, '""')}"`,
      `"${(f.response || '').replace(/"/g, '""')}"`
    ]);
    return [headers.join(','), ...rows.map(r => r.join(','))].join('\n');
  }
  return this.feedbackStore;
}

Technical Analysis

The CSV exporter serializes attacker-controlled feedback fields without neutralizing spreadsheet formula prefixes. Values beginning with =, +, -, or @ may be interpreted as formulas when the resulting CSV file is opened in spreadsheet applications.

Escaping quotation marks and enclosing some fields in double quotes only provides CSV syntax escaping; it does not reliably prevent formula evaluation. Moreover, conversationId and rating are neither quoted nor escaped, which can also allow record or column structure manipulation through commas and line breaks.

Because collectFeedback() stores input fields without validation, an untrusted user can place a spreadsheet payload in query, response, conversationId, or rating, and the payload will flow into exportFeedback('csv').

Attack Path

  1. An attacker submits feedback containing a formula-prefixed value, such as a payload beginning with =, in a query, response, conversation identifier, or rating.
  2. FeedbackCollector.collectFeedback() stores the supplied value without validation or neutralization.
  3. An operator exports the collected records by calling exportFeedback('csv').
  4. The operator opens the generated CSV ...[truncated 822 chars]
Remediation
View remediation

Remediation Suggestions

  1. Neutralize every string cell whose first non-whitespace character is =, +, -, or @. Prefix such values with a single quote or another mitigation appropriate for the target spreadsheet software.
  2. Apply the protection to all exported fields, including id, timestamp, conversationId, rating, query, and response.
  3. Use a maintained CSV serialization library that correctly handles quotation marks, commas, carriage returns, and line feeds.
  4. Validate structured fields such as rating against an explicit allowlist and constrain identifiers to an expected format.
  5. Treat CSV exports as untrusted data and warn operators not to enable active content or external connections when opening them.
  6. Add regression tests covering formula prefixes, leading whitespace before formula characters, embedded commas, quotation marks, carriage returns, and line feeds.

A defensive cell-normalization function could follow this pattern:

javascript
function safeSpreadsheetCell(value) {
  const text = String(value ?? '');
  const neutralized = /^[\t\r\n ]*[=+\-@]/.test(text)
    ? `'${text}`
    : text;

  return `"${neutralized.replace(/"/g, '""')}"`;
}

const rows = this.feedbackStore.map(f => [
  safeSpreadsheetCell(f.id),
  safeSpreadsheetCell(f.timestamp),
  safeSpreadsheetCell(f.conversationId),
  safeSpreadsheetCell(f.rating),
  safeSpreadsheetCell(f.query),
  safeSpreadsheetCell(f.response)
]);
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Trigger AbuseOverly Broad Trigger, Shadow Command Trigger, Keyword Baiting Trigger
  • 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 (10)

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
94% confidence
Finding

The skill is explicitly designed to collect, store, transform, and export user feedback and conversation content into training datasets, but it provides no warning about sensitive data handling, consent, retention, or redaction. In this context, users may unknowingly include personal, confidential, or regulated data, which could then be propagated into fine-tuning corpora or exported for analysis.

Content

No source excerpt is available for this finding.

Ssd 3

Medium
Category
Not specified by scanner
Confidence
84% confidence
Finding

The feedback collector stores full query and response text from each interaction, creating a centralized accumulation of potentially sensitive conversation content. In a personalization/fine-tuning skill, this broad collection materially increases privacy risk because the stored content is later available for aggregation, export, and training reuse.

Content

No source excerpt is available for this finding.

Ssd 3

Medium
Category
Not specified by scanner
Confidence
93% confidence
Finding

The export function emits accumulated conversation content in human-readable JSON/CSV, making accidental disclosure, mishandling, or onward transfer much easier. Because the skill's purpose is feedback analysis and personalization, operators are likely to export these datasets, so the context makes this exposure more dangerous rather than less.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
94% confidence
Finding

The export path serializes stored user queries and model responses directly into JSON/CSV, which can include secrets, personal data, or regulated content from conversations. In a feedback/fine-tuning skill, this is especially risky because the feature is explicitly designed to aggregate and redistribute conversation content for analysis, increasing the chance of privacy leakage or unauthorized downstream sharing.

Content

No source excerpt is available for this finding.

Ssd 3

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

This code transforms user interactions and corrections directly into training examples, effectively converting live conversational data into reusable model-training assets. That is dangerous because sensitive or proprietary content can become embedded in datasets and potentially memorized by downstream models, creating long-lived privacy and confidentiality exposure.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
96% confidence
Finding

The training-data generator repurposes raw user prompts, model outputs, and user corrections into fine-tuning datasets without consent, filtering, or privacy review. That can propagate sensitive data into training corpora and derived models, where deletion and containment become difficult and exposure can persist across future model behavior or dataset sharing.

Content

No source excerpt is available for this finding.

Intent-Code Divergence

Medium
Category
Not specified by scanner
Confidence
96% confidence
Finding

The wrapper documented as 'Optimize prompts based on feedback' registers templates and immediately calls getBestTemplate() without ever invoking updatePerformance() on any feedback. As a result, bestTemplate remains null, suggestions are computed for a null template, and no actual feedback-driven optimization occurs despite the comment and exported API intent.

Content

No source excerpt is available for this finding.

Missing User Warnings

Low
Category
Not specified by scanner
Confidence
82% confidence
Finding

The A/B testing and prompt optimization features are framed for live use but omit safety guidance about exposing users to degraded, biased, or unstable prompt variants. In an agent-personalization skill, this can cause harmful or lower-quality outputs to be served to real users without guardrails, rollback criteria, or eligibility restrictions.

Content

No source excerpt is available for this finding.

Intent-Code Divergence

Low
Category
Not specified by scanner
Confidence
77% confidence
Finding

L372 states that all metrics are calculated locally without external dependencies, which conveys a local-only processing posture. However, the documented API also includes exportFeedback('csv') at L179-L180, indicating data can be prepared for external use or transfer, so the documentation presents a more constrained operational picture than the rest of the file.

Content

No source excerpt is available for this finding.

Vague Triggers

Low
Category
Not specified by scanner
Confidence
86% confidence
Finding

The manifest description broadly states that the skill provides tools for implementing feedback loops, fine-tuning, personalization, and improvement, but it does not define any concrete trigger phrases, scope limits, or exclusion conditions. In a manifest file, this kind of open-ended capability description can contribute to ambiguous invocation because it does not make clear when the skill should or should not be selected.

Content

No source excerpt is available for this finding.

Static analysis

No suspicious patterns detected.