Back to skill

Security audit

A Stock Daily Market Sense

Security checks for vulnerabilities and agentic risk

Overview

The skill mostly matches its A-share market-reporting purpose, but review is warranted because its search launcher can execute a local file outside the packaged skill before using the bundled implementation.

Install only if you are comfortable granting network access, Tushare/Tavily credentials, and write access to a dedicated alpha_data database. Before use, remove or reverse the external-path precedence in scripts/web_search.py so the bundled implementation is used by default, and disable remote fonts for offline/private HTML reports.

Vulnerability Patterns
  • Tool Hijacking and SpoofingModifies or replaces tools so legitimate-looking calls execute attacker logic
  • 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
Findings (2)

T07 · Tool Hijacking and Spoofing

Warning
Location
scripts/web_search.py:16
Finding

External Development File Takes Precedence Over the Bundled Search Implementation

Content
View full analysis
Path: for candidate in _CANDIDATES: if candidate.exists(): return candidate looked = "\n ".join(str(candidate) for candidate in _CANDIDATES) sys.stderr.write("tavily_search.py not found. Looked in:\n " + looked + "\n") raise SystemExit(2) if __name__ == "__main__": target = _resolve_target() sys.argv[0] = str(target) runpy.run_path(str(target), run_name="__main__") ``` ### Technical Analysis The search launcher checks an external development-tree path before the implementation bundled inside the Skill. If the following path exists, it takes precedence: ```text SCRIPT_ROOT.parents[2]/shared/web_search/tavily_search.py ``` The selected file is then executed directly with `runpy.run_path(..., run_name="__main__")`. There is no verification that the external file belongs to the audited Skill, has an expected hash, is owned by a trusted user, or is not writable by a less-privileged party. This creates a local tool-hijacking boundary: a legitimate invocation of `scripts/web_search.py` may execute Python code that was not included in or reviewed as part of this Skill. The bundled implementation is available, so preferring an external implementation is not necessary for normal packaged operation. Exploitation depends on an attacker or another process being able to create or modify the preferred external path. The code does not itself grant that access, but it turns such filesystem access into Python execution under the Agent's identity. ### Attack Path 1. An attacker, compromised development tool, or lower-trust process ...[truncated 1344 chars]
Remediation
View remediation

T09 · Insecure Skill Coding Practices

Note
Location
scripts/_shared/html_report/builder.py:34
Finding

Generated HTML Contacts Google Fonts by Default Despite Self-Contained Report Expectations

Content
View full analysis
\n' ' \n' ' ' ) ``` ```python class HtmlReportBuilder: def __init__( self, title: str, theme: str = "default", meta_text: str = "", extra_css: str = "", extra_head: str = "", lang: str = "zh-CN", font_links: bool = True, ) -> None: self.title = title self.theme = theme self.meta_text = meta_text self.extra_css = extra_css self.extra_head = extra_head self.lang = lang # Themes that use system fonts (claude=system+Georgia, print=serif) can drop the # remote Google Fonts s for a truly offline, self-contained page. self.font_links = font_links ``` ```python font_block = _FONT_LINKS if self.font_links else "" ``` From `scripts/render_report_html.py`: ```python builder = HtmlReportBuilder(title=title, theme=args.theme, extra_css=MARKET_SENSE_EXTRA_CSS) ``` ### Technical Analysis `HtmlReportBuilder` enables remote font links by default. The report renderer does not override `font_links`, so generated HTML contains `preconnect` and stylesheet references to Google-controlled domains. Opening the report in a browser can therefore cause automatic requests to: - `https://fonts.googleapis.com` - `https://fonts.gstatic.com` This behavior conflicts with the builder's self-contained- ...[truncated 1730 chars]
Remediation
View remediation
``` 6. Add a test that scans generated HTML for `http://` and `https://` references and fails unless external resources were explicitly enabled. ]]>
Vulnerability Patterns
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Tool MisuseTool Parameter Abuse, Chaining Abuse, Unsafe Defaults
  • MCP Tool PoisoningHidden Instructions, Unicode Deception, Parameter Description Injection
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
Findings (97)

Tp4

High
Category
MCP Tool Poisoning
Confidence
99% confidence
Finding

This is another instance of unconstrained external web search being blended into the analysis pipeline. Even if the skill says search should not change core star ratings, untrusted web content can still bias narrative outputs, import malicious or false information, and widen the attack surface via outbound network access.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
99% confidence
Finding

This is another instance of unconstrained external web search being blended into the analysis pipeline. Even if the skill says search should not change core star ratings, untrusted web content can still bias narrative outputs, import malicious or false information, and widen the attack surface via outbound network access.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
98% confidence
Finding

This is another instance of unconstrained external web search being blended into the analysis pipeline. Even if the skill says search should not change core star ratings, untrusted web content can still bias narrative outputs, import malicious or false information, and widen the attack surface via outbound network access.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
99% confidence
Finding

This is another instance of unconstrained external web search being blended into the analysis pipeline. Even if the skill says search should not change core star ratings, untrusted web content can still bias narrative outputs, import malicious or false information, and widen the attack surface via outbound network access.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
98% confidence
Finding

This is another instance of unconstrained external web search being blended into the analysis pipeline. Even if the skill says search should not change core star ratings, untrusted web content can still bias narrative outputs, import malicious or false information, and widen the attack surface via outbound network access.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
99% confidence
Finding

This is another instance of unconstrained external web search being blended into the analysis pipeline. Even if the skill says search should not change core star ratings, untrusted web content can still bias narrative outputs, import malicious or false information, and widen the attack surface via outbound network access.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
99% confidence
Finding

This is another instance of unconstrained external web search being blended into the analysis pipeline. Even if the skill says search should not change core star ratings, untrusted web content can still bias narrative outputs, import malicious or false information, and widen the attack surface via outbound network access.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
99% confidence
Finding

This is another instance of unconstrained external web search being blended into the analysis pipeline. Even if the skill says search should not change core star ratings, untrusted web content can still bias narrative outputs, import malicious or false information, and widen the attack surface via outbound network access.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
99% confidence
Finding

This is another instance of unconstrained external web search being blended into the analysis pipeline. Even if the skill says search should not change core star ratings, untrusted web content can still bias narrative outputs, import malicious or false information, and widen the attack surface via outbound network access.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
99% confidence
Finding

This is another instance of unconstrained external web search being blended into the analysis pipeline. Even if the skill says search should not change core star ratings, untrusted web content can still bias narrative outputs, import malicious or false information, and widen the attack surface via outbound network access.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
99% confidence
Finding

This is another instance of unconstrained external web search being blended into the analysis pipeline. Even if the skill says search should not change core star ratings, untrusted web content can still bias narrative outputs, import malicious or false information, and widen the attack surface via outbound network access.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
99% confidence
Finding

This is another instance of unconstrained external web search being blended into the analysis pipeline. Even if the skill says search should not change core star ratings, untrusted web content can still bias narrative outputs, import malicious or false information, and widen the attack surface via outbound network access.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
96% confidence
Finding

This is another instance of unconstrained external web search being blended into the analysis pipeline. Even if the skill says search should not change core star ratings, untrusted web content can still bias narrative outputs, import malicious or false information, and widen the attack surface via outbound network access.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
98% confidence
Finding

This is another instance of unconstrained external web search being blended into the analysis pipeline. Even if the skill says search should not change core star ratings, untrusted web content can still bias narrative outputs, import malicious or false information, and widen the attack surface via outbound network access.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
95% confidence
Finding

This is another instance of unconstrained external web search being blended into the analysis pipeline. Even if the skill says search should not change core star ratings, untrusted web content can still bias narrative outputs, import malicious or false information, and widen the attack surface via outbound network access.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
95% confidence
Finding

This is another instance of unconstrained external web search being blended into the analysis pipeline. Even if the skill says search should not change core star ratings, untrusted web content can still bias narrative outputs, import malicious or false information, and widen the attack surface via outbound network access.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
94% confidence
Finding

This is another instance of unconstrained external web search being blended into the analysis pipeline. Even if the skill says search should not change core star ratings, untrusted web content can still bias narrative outputs, import malicious or false information, and widen the attack surface via outbound network access.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
99% confidence
Finding

This is another instance of unconstrained external web search being blended into the analysis pipeline. Even if the skill says search should not change core star ratings, untrusted web content can still bias narrative outputs, import malicious or false information, and widen the attack surface via outbound network access.

Content

No source excerpt is available for this finding.

Ae1

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

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

md
按需生成 HTML:当用户要求 HTML、网页、可视化报告或截图风格输出时,先完成并核对 `reports/report_YYYYMMDD.md`,再运行 `scripts/render_report_html.py` 生成同日期 HTML。HTML 是展示层产物,不新增研报判断、不删减 Markdown 正文;若同

Ae1

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

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

md
按需生成 HTML:当用户要求 HTML、网页、可视化报告或截图风格输出时,先完成并核对 `reports/report_YYYYMMDD.md`,再运行 `scripts/render_report_html.py` 生成同日期 HTML。HTML 是展示层产物,不新增研报判断、不删减 Markdown 正文;若同

Ae1

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

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

md
按需生成 HTML:当用户要求 HTML、网页、可视化报告或截图风格输出时,先完成并核对 `reports/report_YYYYMMDD.md`,再运行 `scripts/render_report_html.py` 生成同日期 HTML。HTML 是展示层产物,不新增研报判断、不删减 Markdown 正文;若同

Hidden Instructions

High
Category
Prompt Injection
Confidence
60% confidence
Finding

Hidden instructions were detected in comments or invisible text. These could contain malicious directives. Manual review is recommended.

Content

Scanner excerpt · references/market_data.csv (reported line 1)May include surrounding context.

text
日期,上涨,涨停,下跌,跌停,平盘,活跃度,情绪值,成交额,融资净买入,全市场换手率
2026/06/09,3322,144,2049,19,144,60.34,60.34,2666732928.5,-24533268697.0,2.5857
2026/06/08,899,63,4591,56,25,16.44,16.44,2823428977.056,-15241982335.0,2.7858
2026/06/05,3277,87,2113,18,124,59.36,59.36,3100690304.725,5357742867.0,2.9904

Tool Parameter Abuse

High
Category
Tool Misuse
Confidence
85% confidence
Finding

Tool parameters are crafted to achieve unintended or unsafe behavior. Parameter abuse can bypass intended safety checks (e.g. shell=True, --force, dangerous glob patterns).

Content

Scanner excerpt · scripts/_shared/html_report/README.md (reported line 41)May include surrounding context.

md
"""Shared CLI for ``render_report_html.py`` entrypoints.

Every skill renderer did the same dance: parse ``--input/--output/--title/
--theme/--no-validate``, read the Markdown, build an ``HtmlReportBuilder``,
render with a "warn-don't-fail" validation policy, write the file, print a
JSON summary. That orchestration lives here once. A skill supplies only the
variable part — a ``build_job(args) -> RenderJob`` that loads its evidence,

Tool Parameter Abuse

High
Category
Tool Misuse
Confidence
85% confidence
Finding

Tool parameters are crafted to achieve unintended or unsafe behavior. Parameter abuse can bypass intended safety checks (e.g. shell=True, --force, dangerous glob patterns).

Content

Scanner excerpt · scripts/_shared/html_report/cli.py (reported line 4)May include surrounding context.

python
"""Shared CLI for ``render_report_html.py`` entrypoints.

Every skill renderer did the same dance: parse ``--input/--output/--title/
--theme/--no-validate``, read the Markdown, build an ``HtmlReportBuilder``,
render with a "warn-don't-fail" validation policy, write the file, print a
JSON summary. That orchestration lives here once. A skill supplies only the
variable part — a ``build_job(args) -> RenderJob`` that loads its evidence,

Tool Parameter Abuse

High
Category
Tool Misuse
Confidence
85% confidence
Finding

Tool parameters are crafted to achieve unintended or unsafe behavior. Parameter abuse can bypass intended safety checks (e.g. shell=True, --force, dangerous glob patterns).

Content

Scanner excerpt · scripts/_shared/html_report/cli.py (reported line 86)May include surrounding context.

python
"""Shared CLI for ``render_report_html.py`` entrypoints.

Every skill renderer did the same dance: parse ``--input/--output/--title/
--theme/--no-validate``, read the Markdown, build an ``HtmlReportBuilder``,
render with a "warn-don't-fail" validation policy, write the file, print a
JSON summary. That orchestration lives here once. A skill supplies only the
variable part — a ``build_job(args) -> RenderJob`` that loads its evidence,

Static analysis

No suspicious patterns detected.