Back to skill

Security audit

FA Advisor

Security checks for vulnerabilities and agentic risk

Overview

This financial-advisor skill is mostly purpose-aligned, but it needs Review because local report generation can write outside its intended output folder and sensitive financial/file-access behavior is under-scoped.

Review before installing if you will handle confidential fundraising materials. Only provide the minimum sensitive business data needed, confirm any file export path, avoid untrusted company names or PDFs until filenames are sanitized, and treat generated valuations and investor matches as advisory estimates rather than professional financial, legal, or accounting advice.

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
fa_advisor/advisor.py:128
Finding
Path Traversal Allows PDF Writes Outside the Intended Output Directory<![CDATA[ ## Vulnerability Details **File Location**: `fa_advisor/advisor.py:128-145`, `fa_advisor/advisor.py:188-198`, and `fa_advisor/types/project.py:181` **Vulnerability Type**: Unsanitized user-controlled path construction **Risk Level**: Medium ### Vulnerable Code The startup package constructs report paths directly from the user-controlled project name: ```python # 6. Generate PDF reports if requested if generate_pdf: print("📝 Generating PDF reports...") output_dir = Path("output") output_dir.mkdir(exist_ok=True) result['pdf_reports'] = { 'assessment': await self.pdf_generator.generate_assessment_report( assessment, project.name, output_dir / f"{project.name}_assessment.pdf" ), 'valuation': await self.pdf_generator.generate_valuation_report( valuation, project.name, output_dir / f"{project.name}_valuation.pdf" ) } print("✅ PDF reports generated in 'output' directory\n") ``` The investor package uses the same unsafe filename construction: ```python # Generate PDF memo if requested if generate_pdf: print("📝 Generating PDF investment memo...") output_dir = Path("output") output_dir.mkdir(exist_ok=True) result['pdf_memo'] = await self.pdf_generator.generate_investment_memo( memo, project.name, output_dir / f"{project.name}_investment_memo.pdf" ) print("✅ PDF memo generated\n") ``` The project model only verifies that the name is non-empty: ```python class Project(BaseModel): """ Complete project/startup information This is the main data structure for a startup project seeking funding or being evaluated by investors. """ # Basic Information name: str = Field(min_length=1) ``` The PDF generator then writes directly to the supplied path: ```python output_path = Path(output_path) doc = SimpleDocTemplate( str(output_path), pagesize=self.pag ...[truncated 2794 chars]
Remediation
<![CDATA[ ## Remediation Suggestions 1. **Do not derive destination paths directly from company names.** Prefer a server-generated identifier such as a UUID: ```python from uuid import uuid4 report_name = f"{uuid4().hex}_assessment.pdf" ``` 2. **If readable filenames are required, apply a strict allowlist.** Replace every character other than letters, digits, hyphens, and underscores: ```python import re def safe_filename(value: str) -> str: value = re.sub(r"[^A-Za-z0-9_-]+", "_", value).strip("_") if not value: raise ValueError("Project name cannot produce an empty filename") return value[:100] ``` 3. **Resolve and enforce directory containment before writing:** ```python output_dir = Path("output").resolve() output_dir.mkdir(parents=True, exist_ok=True) safe_name = safe_filename(project.name) destination = (output_dir / f"{safe_name}_assessment.pdf").resolve() if output_dir not in destination.parents: raise ValueError("Invalid report destination") ``` 4. **Reject path semantics explicitly.** Company names used in filenames should not contain `/`, `\`, `..`, null bytes, drive prefixes, or absolute-path components. 5. **Avoid unintended overwrites.** Create reports using exclusive file creation or reject destinations that already exist unless an authorized caller explicitly enables replacement. 6. **Apply the same centralized helper to every generated report**, including assessment, valuation, and investment-memo output paths. 7. **Add regression tests** for names containing: - `../` - `..\` - Absolute POSIX paths - Windows drive paths - Repeated separators - Empty names after sanitization - Existing destination filenames ]]>
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
  • Trigger AbuseOverly Broad Trigger, Shadow Command Trigger, Keyword Baiting Trigger
  • MCP Least PrivilegeUnderdeclared Capability, Wildcard Permission, Missing Permission Declaration
  • MCP Tool PoisoningHidden Instructions, Unicode Deception, Parameter Description Injection
Findings (91)

Tp4

High
Category
MCP Tool Poisoning
Confidence
95% confidence
Finding
This finding suggests the advertised core financial-advisory functions are not actually implemented while undeclared document/PDF parsing exists instead. That is a serious trust and security issue because users may rely on the skill for one purpose while it performs another, potentially collecting or transforming documents without delivering the expected service.

Tp4

High
Category
MCP Tool Poisoning
Confidence
96% confidence
Finding
This finding suggests the advertised core financial-advisory functions are not actually implemented while undeclared document/PDF parsing exists instead. That is a serious trust and security issue because users may rely on the skill for one purpose while it performs another, potentially collecting or transforming documents without delivering the expected service.

Tp4

High
Category
MCP Tool Poisoning
Confidence
97% confidence
Finding
This finding suggests the advertised core financial-advisory functions are not actually implemented while undeclared document/PDF parsing exists instead. That is a serious trust and security issue because users may rely on the skill for one purpose while it performs another, potentially collecting or transforming documents without delivering the expected service.

Natural-Language Policy Violations

Medium
Confidence
88% confidence
Finding
This markdown file contains user-facing instructions exclusively in Chinese, including headings, steps, and operational guidance. The policy requires flagging language or locale constraints when a skill forces a specific language without user opt-in, and no alternative language option or justification is provided here.

Natural-Language Policy Violations

Medium
Confidence
82% confidence
Finding
This markdown file uses Chinese throughout for headings, instructions, and release guidance, which effectively forces a specific language for users reading the skill-readiness documentation. The policy allows locale constraints only when they are explicitly documented and justified or when users are offered a language choice, neither of which appears here.

Intent-Code Divergence

Medium
Confidence
95% confidence
Finding
At L029-L031 the document says the description is correct and the homepage merely needs updating, but later at L084-L112 it shows that multiple URLs in pyproject.toml and SKILL.md are incorrect, including links to a different repository and a placeholder username. This is more than an omission: the earlier validation language presents metadata as largely correct despite the later evidence that core identifying metadata is wrong.

Natural-Language Policy Violations

Medium
Confidence
94% confidence
Finding
This markdown file presents nearly all contributor instructions in Chinese, which effectively imposes a specific language on users. The policy allows locale or language constraints only when the skill offers a choice or clearly documents a justified region-specific limitation, neither of which is present here.

Sudo/Root Execution

Medium
Category
Privilege Escalation
Content
brew install tesseract ghostscript poppler

# Ubuntu/Debian
sudo apt-get install tesseract-ocr poppler-utils ghostscript

# 运行测试
python3 -m pytest
Confidence
70% confidence
Finding
Commands invoke sudo or root privileges. Verify this elevated access is necessary and justified.

Natural-Language Policy Violations

Medium
Confidence
93% confidence
Finding
The markdown is presented entirely in Chinese, including headings, instructions, and help text, with no indication that users may choose another language or that the skill is intentionally limited to a Chinese-speaking context. Under the stated policy, forcing a specific language without opt-in is a natural-language policy violation.

Description-Behavior Mismatch

Medium
Confidence
94% confidence
Finding
The manifest describes an AI financial advisor focused on project assessment, pitch deck generation, valuation analysis, and investor matching. This quickstart prominently introduces PDF-processing system dependencies and later documents parse_pdf, parse_financial_pdf, and ocr_pdf features, which are document-ingestion capabilities not reflected in the manifest description.

Sudo/Root Execution

Medium
Category
Privilege Escalation
Content
**Ubuntu/Debian:**
```bash
sudo apt-get update
sudo apt-get install tesseract-ocr poppler-utils ghostscript
sudo apt-get install tesseract-ocr-chi-sim  # 中文支持
```
Confidence
70% confidence
Finding
Commands invoke sudo or root privileges. Verify this elevated access is necessary and justified.

Sudo/Root Execution

Medium
Category
Privilege Escalation
Content
**Ubuntu/Debian:**
```bash
sudo apt-get update
sudo apt-get install tesseract-ocr poppler-utils ghostscript
sudo apt-get install tesseract-ocr-chi-sim  # 中文支持
```
Confidence
70% confidence
Finding
Commands invoke sudo or root privileges. Verify this elevated access is necessary and justified.

Sudo/Root Execution

Medium
Category
Privilege Escalation
Content
**Ubuntu/Debian:**
```bash
sudo apt-get update
sudo apt-get install tesseract-ocr poppler-utils ghostscript
sudo apt-get install tesseract-ocr-chi-sim  # 中文支持
```
Confidence
70% confidence
Finding
Commands invoke sudo or root privileges. Verify this elevated access is necessary and justified.

Sudo/Root Execution

Medium
Category
Privilege Escalation
Content
**Ubuntu/Debian:**
```bash
sudo apt-get update
sudo apt-get install tesseract-ocr poppler-utils ghostscript
sudo apt-get install tesseract-ocr-chi-sim  # 中文支持
```
Confidence
70% confidence
Finding
Commands invoke sudo or root privileges. Verify this elevated access is necessary and justified.

Description-Behavior Mismatch

Medium
Confidence
96% confidence
Finding
The examples show the skill being used as a general PDF parser, OCR tool, and financial PDF extractor. While financial analysis may consume documents, the manifest does not claim document parsing or OCR as part of the skill's behavior, creating a semantic mismatch between declared purpose and documented capability.

Missing User Warnings

Medium
Confidence
89% confidence
Finding
This markdown file explicitly documents parsing financial statements, OCR of business plans, and generation of reports, all of which may involve sensitive company and investor data. While the README includes valuation disclaimers, it does not warn users about privacy, confidentiality, or careful handling/storage of uploaded and generated documents.

Natural-Language Policy Violations

Medium
Confidence
92% confidence
Finding
This markdown file presents all user-facing release and publishing instructions exclusively in Chinese, including the operational steps and status guidance. Under the language/locale policy, forcing a specific language without offering the user a choice or documenting a justified locale constraint is a natural-language policy violation.

Lp3

Medium
Category
MCP Least Privilege
Confidence
78% confidence
Finding
The skill instructs the agent to save generated documents as files and includes executable code examples, but it declares no explicit tool scope or permissions boundary. That mismatch can cause the agent to use file read/write capabilities implicitly, reducing transparency and increasing the chance of unauthorized local file access or unexpected persistence of sensitive fundraising data.

Vague Triggers

Medium
Confidence
94% confidence
Finding
The activation criteria are broad enough to trigger on many ordinary business-help requests, which can cause the skill to engage outside its narrow intended context. Over-broad activation increases the chance of unnecessary collection of sensitive financial or business information from users who did not intend to invoke a fundraising-analysis workflow.

Missing User Warnings

Medium
Confidence
92% confidence
Finding
The skill requests extensive sensitive information, including financials, runway, valuation, team backgrounds, and fundraising history, without a clear upfront privacy warning or explicit consent flow. In this context, that is especially dangerous because startup fundraising data is commercially sensitive and could expose confidential business strategy if mishandled or overshared.

Intent-Code Divergence

Medium
Confidence
94% confidence
Finding
The documentation says the skill cannot read external files, yet elsewhere instructs the agent to save generated documents as files. Contradictory statements about file access can mislead users about the skill's real I/O behavior, especially when handling confidential business plans, valuations, and investment memos.

Natural-Language Policy Violations

Medium
Confidence
94% confidence
Finding
This code file contains user-facing text, sample content, and API examples entirely in Chinese, including a hard-coded OCR language example ('chi_sim+eng') and Chinese-only console messaging. Under the policy rule for language/locale, this is a natural-language constraint without any visible opt-in or alternative language selection.

Description-Behavior Mismatch

Medium
Confidence
89% confidence
Finding
The manifest describes this skill as providing project assessment, pitch deck generation, valuation analysis, and investor matching for primary market financing. This file explicitly presents PDF parsing, OCR, table extraction, and PDF report generation as core 'Python version advantages,' which are materially broader document-processing capabilities not reflected in the manifest description.

Intent-Code Divergence

Medium
Confidence
83% confidence
Finding
The manifest says the skill replaces traditional advisory services with AI-powered project assessment, pitch deck generation, valuation analysis, and investor matching. In this file's own summary, '投资人匹配算法' (investor matching algorithm) is listed under features that still need improvement/completion, which contradicts the stated delivered capability.

Natural-Language Policy Violations

Medium
Confidence
87% confidence
Finding
This Python file repeatedly describes the module and its generated outputs in Chinese, and the generated recommendation fields and analysis labels are structured around that locale without any indication that users can opt into another language. The policy requires flagging language or locale constraints when they are imposed without user choice or a documented justification.

Static analysis

No suspicious patterns detected.