Back to skill

Security audit

Estimate Builder

Security checks for vulnerabilities and agentic risk

Overview

This skill is a coherent construction estimating helper, but users should be careful with Excel exports and formula-like text in estimate fields.

Before installing or using this skill, treat generated spreadsheets as files written to a path you choose and avoid overwriting important files. If estimates include text from untrusted sources, sanitize fields that begin with spreadsheet formula characters such as =, +, -, or @ before exporting or sharing XLSX files. Specify the desired currency when the project is not USD-based.

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

Excel Formula Injection Through Unsanitized Estimate Fields

Content
View full analysis
pd.DataFrame: """Export estimate to DataFrame.""" data = [] for item in self.items: data.append({ 'Line': item.line_number, 'WBS': item.wbs_code, 'Description': item.description, 'Qty': item.quantity, 'Unit': item.unit, 'Unit Cost': item.unit_cost, 'Total': item.total_cost, 'Category': item.category.value, 'Notes': item.notes }) return pd.DataFrame(data) def export_to_excel(self, output_path: str) -> str: """Export estimate to Excel.""" totals = self.calculate_total() with pd.ExcelWriter(output_path, engine='openpyxl') as writer: # Cover sheet cover_df = pd.DataFrame([{ 'Project Name': self.project_name, 'Project Number': self.project_number, 'Estimate Date': self.estimate_date, 'Total Items': len(self.items), 'Direct Cost': totals['cost_summary']['direct_cost'], 'Grand Total': totals['grand_total'] }]) cover_df.to_excel(writer, sheet_name='Summary', index=False) # Line items items_df = self.export_to_df() items_df.to_excel(writer, sheet_name='Line Items', index=False) ``` ### Technical Analysis The Skill accepts text fields such as WBS code, description, unit, and notes and stores them without validation or output encoding. `export_to_df()` transfers these values directly into a Pandas DataFrame, and `export_to_excel()` subsequently writes that DataFrame into an XLSX workbook. Spreadsheet applications may interpret cell values beginning with formula control characters—commonly `=`, `+`, `-`, or `@`—as formulas rather than literal text. An attacker able to supply e ...[truncated 2202 chars]
Remediation
View remediation
object: if not isinstance(value, str): return value stripped = value.lstrip() if stripped.startswith(("=", "+", "-", "@")): return "'" + value return value ``` 3. Apply the sanitizer at the final export boundary rather than relying solely on input validation: ```python data.append({ 'Line': item.line_number, 'WBS': sanitize_excel_text(item.wbs_code), 'Description': sanitize_excel_text(item.description), 'Qty': item.quantity, 'Unit': sanitize_excel_text(item.unit), 'Unit Cost': item.unit_cost, 'Total': item.total_cost, 'Category': item.category.value, 'Notes': sanitize_excel_text(item.notes) }) ``` 4. Sanitize the Summary and Markups worksheets as well, because project metadata and markup names may also originate from users. 5. Reject or remove control characters that are invalid or unsafe in spreadsheet cells. 6. Where feasible, use `openpyxl` to set attacker-controlled cells explicitly as string values and verify that the resulting workbook does not store them as formulas. 7. Add regression tests covering: - Values beginning with each formula prefix. - Prefixes preceded by spaces, tabs, carriage returns, or line feeds. - Formula-like values in every exported text field. - Benign numeric and textual values to ensure they remain unchanged. ]]>
Vulnerability Patterns
  • 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
  • Excessive AgencyUnrestricted Tool Access, Autonomous Decision Making, Scope Creep
Findings (2)

Missing User Warnings

Low
Category
Not specified by scanner
Confidence
85% confidence
Finding

This markdown file demonstrates calling export_to_excel to create an output file, which writes project estimate data to the local filesystem. While the method name implies export behavior, the skill description does not include any explicit warning or note that using this feature will create or overwrite a file on disk.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
91% confidence
Finding

The instruction 'Use USD unless user specifies otherwise' imposes a specific locale/currency convention by default. This can conflict with language/locale policy expectations when users have not opted into a US-centric format.

Content

No source excerpt is available for this finding.

Static analysis

No suspicious patterns detected.