Back to skill

Security audit

sn-da-large-file-analysis

Security checks for vulnerabilities and agentic risk

Overview

This skill provides coherent guidance for handling large Excel files, with a report-export safety caveat but no hidden persistence, credential use, or deceptive behavior.

Reasonable to install for large Excel workflows. Use it on files you trust, and sanitize formula-like strings in headers or cells before sharing generated CSV/XLSX reports with others. The CJK font setup is only a presentation default and does not install fonts or search the system broadly.

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
SKILL.md:217
Finding

Spreadsheet Formula Injection in Exported Excel and CSV Files

Content
View full analysis
1_000_000: csv_path = output_path.rsplit('.', 1)[0] + '.csv' df.to_csv(csv_path, index=False) print(f"Over 1M rows — exported as CSV: {csv_path}") return csv_path if total_cells > 50_000: from openpyxl import Workbook from openpyxl.cell import WriteOnlyCell wb = Workbook(write_only=True) ws = wb.create_sheet(title=sheet_name) ws.append(list(df.columns)) for idx, row in enumerate(df.itertuples(index=False)): ws.append([None if pd.isna(v) else v for v in row]) if (idx + 1) % 100_000 == 0: print(f" Written {idx + 1:,} rows...") wb.save(output_path) wb.close() print(f"write_only mode: {len(df):,} rows -> {output_path}") else: df.to_excel(output_path, index=False, sheet_name=sheet_name) print(f"Standard write: {len(df):,} rows -> {output_path}") return output_path ``` ### Technical Analysis The export function writes DataFrame column names and values directly into CSV or XLSX output without sanitizing untrusted strings that begin with spreadsheet formula indicators such as `=`, `+`, `-`, or `@`. The issue affects all three export paths: - `df.to_csv(...)` writes formula-like values directly into CSV fields. - `ws.append(...)` passes values directly to `openpyxl`, which can treat strings beginning with `=` as formulas. - `df.to_excel(...)` can produce formula cells when formula-like strings are passed through an Excel writer. - `ws.append(list(df.columns))` also leave ...[truncated 2392 chars]
Remediation
View remediation
Vulnerability Patterns
  • Rogue AgentSelf-Modification, Session Persistence
  • 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 (2)

Session Persistence

Medium
Category
Rogue Agent
Confidence
60% confidence
Finding

Skill establishes unauthorized persistence across sessions via cron jobs, startup scripts, or state files. Session persistence allows an attacker to maintain access beyond the current interaction.

Content

Scanner excerpt · SKILL.md (reported line 35)May include surrounding context.

md
import os
import gc

pd.options.mode.copy_on_write = True

# CJK font setup (fixed paths — do NOT search for fonts)
# ⚠️ Copy this block as-is. Do NOT use fc-list, find, subprocess, or glob to locate fonts.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The skill hard-codes 'CJK font setup' and fixed SimHei/WenQuanYi font paths, which imposes a specific language/locale presentation choice rather than offering a user choice. This is a natural-language locale policy issue because the skill bakes in Chinese font handling as a default behavior with no opt-in or justification as a region-specific tool.

Content

No source excerpt is available for this finding.

Static analysis

No suspicious patterns detected.