T09 · Insecure Skill Coding Practices
- Location
fa_advisor/advisor.py:131- Finding
User-Controlled Project Name Enables Path Traversal and Arbitrary PDF Overwrite
- Content
View full analysis
- Remediation
View remediation
Security audit
Security checks for vulnerabilities and agentic risk
The skill is a coherent fundraising assistant, but it needs Review because its Python report generation can save sensitive PDFs by default and build output paths from unsanitized company names.
Review this skill before installing if you plan to process real financial statements or confidential fundraising data. Use an isolated workspace, redact unnecessary sensitive details, avoid running administrator install commands unless you understand them, disable automatic PDF generation where possible, and only save reports to explicitly chosen safe paths.
fa_advisor/advisor.py:131User-Controlled Project Name Enables Path Traversal and Arbitrary PDF Overwrite
fa_advisor/advisor.py:67Confidential Financial Reports Are Persisted by Default Without Separate Save Consent
fa_advisor/pdf/ocr.py:37Unbounded PDF Conversion and OCR Permit Resource-Exhaustion Attacks
pyproject.toml:52Unnecessary Third-Party Asyncio Dependency Expands the Supply-Chain Attack Surface
Most of the declared description aligns with the demonstrated behavior: startup project assessment, valuation analysis, pitch deck generation, and PDF-related capabilities are all represented. However, the declared purpose includes investor matching as a capability, while the code's own summary says '投资人匹配算法' needs to be completed and references the TypeScript version for that remaining module. That makes the description overstate the implemented functionality for this code chunk. No undeclared sensitive behaviors, resource access, or unrelated triggers are evident.
Most of the declared fundraising advisory capabilities are accurately represented: the code clearly supports startup assessment, pitch deck and business plan generation, valuation, investor matching, and investor analysis. However, the description explicitly claims PDF processing, including financial statements, OCR, and reports, and no such functionality appears in this code chunk. The actual code is centered on advisory workflows and exported modules, with no evidence of file handling, PDF parsing, OCR, or report extraction. Therefore, this is a description-to-behavior mismatch due to overclaiming document-processing capabilities.
The supplied code focuses on analyzing a startup project object and producing investor-oriented outputs: an investment memo, a formatted memo document, due diligence checklist, risk analysis, financial analysis, and a recommendation decision. This partially overlaps with the declared 'project assessment' and 'valuation analysis' themes, but several prominent declared capabilities are not represented here, including pitch deck generation, investor matching, and any PDF/OCR or document-processing behavior. Additionally, the code’s framing is more for investment institutions generating memos and diligence materials than for a general startup fundraising advisor. No suspicious external access or trigger mismatch is visible in this chunk, but the description overstates and somewhat mischaracterizes the implemented behavior.
The code is aligned with one portion of the description: project assessment for startup fundraising readiness. However, the declared description presents a broader multi-capability fundraising advisory skill including pitch deck generation, valuation analysis, investor matching, and PDF/OCR processing. None of those additional capabilities appear in this code chunk. There is no file handling, OCR, PDF parsing, investor database access, valuation modeling, or presentation generation logic. Therefore the code chunk materially under-implements the declared functionality, so the description does not accurately represent what this supplied code actually does.
The supplied code matches part of the declared description: it generates pitch deck content and a business plan for startup fundraising materials. However, the declared purpose is substantially broader and specifically includes project assessment, valuation analysis, investor matching, and PDF/OCR processing. None of those capabilities appear in this code chunk. The code is a deterministic content formatter/builder over a Project object, with no document ingestion, OCR, external matching, valuation logic, or analysis engine. Therefore the description does not accurately represent what this code chunk actually does.
The skill tells users it cannot read external files or documents while simultaneously advertising PDF processing and OCR capabilities. This contradiction can cause users to misunderstand what data may be ingested or exposed, weakening informed consent around sensitive financial documents.
This markdown file is predominantly written in Chinese, which effectively forces a specific language for contributors. Under the policy, language constraints should either offer user choice or be clearly documented as a justified locale-specific limitation, neither of which appears here.
This markdown file presents all user-facing instructions, status, and usage guidance exclusively in Chinese. Under the policy, forcing a specific language without user opt-in is a natural-language policy violation unless the locale constraint is explicitly documented and justified.
This markdown file uses Chinese as the default language throughout, including headings, instructions, and release guidance. Under the policy, forcing a specific language without user opt-in can be a natural-language policy violation unless the locale constraint is clearly documented and justified, which is not present here.
该文档从标题到正文均以中文呈现,且没有说明这是特定受众或地区限定的发布指南,也没有提供其他语言选项。根据语言/地区政策,强制单一语言且未取得用户选择或明确正当说明,属于自然语言层面的政策问题。
Skill enumerates or reads other installed skills. Access to other skills' SKILL.md files or the skills directory reveals prompt instructions, capabilities, and secrets that should be invisible to peer skills.
cp -r /path/to/ai-fa/* skills/fa-advisor/
ls skills/fa-advisor/SKILL.md
4. 提交并创建 PR:
The entire publishing guide is written in Chinese and does not indicate that other languages are supported or that Chinese is required for a region-specific reason. This is a natural-language locale policy concern because it imposes a language choice on users without opt-in.
Skill enumerates or reads other installed skills. Access to other skills' SKILL.md files or the skills directory reveals prompt instructions, capabilities, and secrets that should be invisible to peer skills.
/home/justin/ai-fa/ skills/fa-advisor-python/
ls skills/fa-advisor-python/SKILL.md
### Step 3: 提交 Pull Request
The document encourages OCR/PDF parsing of financial statements and scanned documents, which are likely to contain sensitive business and personal data, but it provides no warning about confidentiality, retention, consent, or secure handling. In a fundraising advisory skill, this omission is more dangerous because users are specifically likely to upload highly sensitive financial records and investor materials.
The report-generation example states that PDF reports are saved to an output directory but does not warn that potentially sensitive assessment, valuation, and financial data will be written to disk. In this skill context, that creates avoidable exposure through local file leakage, backups, shared workstations, or insecure permissions.
The markdown includes operational shell commands that create files, install dependencies, and execute code directly on the user's system without prominent safety warnings, sandboxing guidance, or least-privilege recommendations. In a skill context, users may copy-paste these commands verbatim, which can lead to unintended system modification, package installation, or execution of unreviewed code.
The document instructs users to run a sudo apt-get install command, which requires elevated privileges and changes the host system. Even though the command itself is a common package installation step, including privileged execution guidance in a skill increases risk because users may execute it without understanding system-wide effects or verifying necessity.
brew install ghostscript tcl-tk
# Ubuntu
sudo apt-get install ghostscript python3-tk
# 然后重试
pip install "camelot-py[cv]"
The entire skill quickstart, including headings, instructions, examples, and trigger phrases, is written in Chinese with no indication that users may choose another language. Under the stated policy, forcing a specific language without opt-in is a natural-language policy violation unless the locale constraint is explicitly justified.
Commands invoke sudo or root privileges. Verify this elevated access is necessary and justified.
Ubuntu/Debian:
sudo apt-get update
sudo apt-get install tesseract-ocr poppler-utils ghostscript
sudo apt-get install tesseract-ocr-chi-sim # 中文支持
Commands invoke sudo or root privileges. Verify this elevated access is necessary and justified.
Ubuntu/Debian:
sudo apt-get update
sudo apt-get install tesseract-ocr poppler-utils ghostscript
sudo apt-get install tesseract-ocr-chi-sim # 中文支持
Commands invoke sudo or root privileges. Verify this elevated access is necessary and justified.
Ubuntu/Debian:
sudo apt-get update
sudo apt-get install tesseract-ocr poppler-utils ghostscript
sudo apt-get install tesseract-ocr-chi-sim # 中文支持
Commands invoke sudo or root privileges. Verify this elevated access is necessary and justified.
Ubuntu/Debian:
sudo apt-get update
sudo apt-get install tesseract-ocr poppler-utils ghostscript
sudo apt-get install tesseract-ocr-chi-sim # 中文支持
Commands invoke sudo or root privileges. Verify this elevated access is necessary and justified.
Ubuntu/Debian:
sudo apt-get update
sudo apt-get install tesseract-ocr poppler-utils ghostscript
sudo apt-get install tesseract-ocr-chi-sim # 中文支持
Commands invoke sudo or root privileges. Verify this elevated access is necessary and justified.
Ubuntu/Debian:
sudo apt-get update
sudo apt-get install tesseract-ocr poppler-utils ghostscript
sudo apt-get install tesseract-ocr-chi-sim # 中文支持
Commands invoke sudo or root privileges. Verify this elevated access is necessary and justified.
Ubuntu/Debian:
sudo apt-get update
sudo apt-get install tesseract-ocr poppler-utils ghostscript
sudo apt-get install tesseract-ocr-chi-sim # 中文支持
No suspicious patterns detected.