Back to skill

Security audit

Strategy Backtest

Security checks for vulnerabilities and agentic risk

Overview

The skill advertises real trading backtests and reports, but its bundled tool only logs command arguments to a local JSON file and returns success messages.

Review this before installing. Do not rely on it for actual trading analysis: it does not compute backtest results or reports. Avoid passing secrets, account identifiers, private dataset paths, or proprietary strategy details because command inputs are saved locally in the skill data file. Install dependencies only in an isolated environment if you choose to test it.

Vulnerability Patterns
  • Insecure DependenciesIntroduces malicious components through unsafe dependency sources
  • 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)

T08 · Insecure Dependencies

Warning
Location
SKILL.md:16
Finding

Unpinned Third-Party Dependencies Create a Supply-Chain Risk

Content
View full analysis

Vulnerability Details

File Location: SKILL.md:16-19; duplicated in references/strategy_backtest_guide.md:7
Vulnerability Type: T08: Insecure Dependencies
Risk Level: Medium

Complete Code Snippet:

markdown
## Prerequisites

```bash
pip install pandas numpy backtrader matplotlib
text

The reference guide repeats the installation instruction:

```markdown
- **Typical deps**: `pip install pandas numpy backtrader matplotlib`

Technical Analysis

The project instructs users to install four third-party packages from pip without exact version constraints, package hashes, a lock file, or an explicitly trusted package index. Dependency resolution therefore relies on mutable package-index state at installation time.

If a package or one of its transitive dependencies is compromised, a malicious release could execute code during installation or when subsequently imported. Unpinned dependencies also reduce build reproducibility and can introduce incompatible or vulnerable releases without any project change.

The supplied executable currently does not import these packages, so the installation requirement unnecessarily expands the project's supply-chain attack surface.

Attack Path

  1. A user follows the documented prerequisite command.
  2. pip queries its configured package index and selects currently available package versions and transitive dependencies.
  3. An attacker compromises a listed package, its release process, or a transitive dependency and publishes a malicious version.
  4. The unconstrained installation resolves to the malicious release.
  5. Malicious installation hooks or imported package code execute with the privileges of the user running pip.

This path depends on compromise of the package supply chain or package-index configuration; no evidence shows that the currently named packages are malicious.

Impact Assessment

Successful exploitation could execute arbi ...[truncated 374 chars]

Remediation
View remediation

Remediation Suggestions

  1. Remove the dependency-installation prerequisite until the implementation actually uses these packages.
  2. If the packages become necessary, pin reviewed exact versions in a requirements file.
  3. Generate and verify cryptographic hashes, then install with pip install --require-hashes -r requirements.txt.
  4. Lock all transitive dependencies using a reproducible dependency-management tool.
  5. Install dependencies inside a dedicated virtual environment under a non-privileged account.
  6. Configure an approved package index explicitly and review dependency provenance before updates.
  7. Add automated vulnerability and dependency-integrity scanning to the release process.
  8. Keep the instructions in SKILL.md and references/strategy_backtest_guide.md synchronized after remediation.
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • 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
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
Findings (9)

Tp4

High
Category
MCP Tool Poisoning
Confidence
98% confidence
Finding

The skill claims to perform quantitative backtesting, optimization, and reporting, but the analyzed behavior indicates it does not actually do those tasks and instead performs undeclared local persistence/logging of command inputs to JSON files. That mismatch is dangerous because users and agents may supply trading ideas, symbols, parameters, or research inputs under false assumptions, while the skill silently stores data and fails to provide the promised function.

Content

No source excerpt is available for this finding.

Undeclared Tool Scope

Medium
Category
MCP Least Privilege
Confidence
83% confidence
Finding

The skill advertises executable commands and appears to rely on file read/write behavior, but it does not declare any tool scope such as permissions or allowed-tools. In an agent environment, missing explicit scope can lead to overbroad tool access, weak reviewability, and accidental exposure of repository or local filesystem data beyond what the skill actually needs.

Content

No source excerpt is available for this finding.

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
91% confidence
Finding

The trigger list mixes specific phrases like 'backtest' with broader terms such as 'quant' and 'optimize parameters', which may match unrelated conversations or tasks. The file also does not provide exclusion conditions or negative examples to clarify when the skill should not activate.

Content

No source excerpt is available for this finding.

Intent-Code Divergence

Medium
Category
Not specified by scanner
Confidence
94% confidence
Finding

The top-level documentation presents the script as a tool for backtest, optimize, and report flows, implying those actions are carried out. The implementation instead stores timestamps, command names, and input strings, then returns success messages without executing any backtest or generating any report.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

Medium
Category
Not specified by scanner
Confidence
98% confidence
Finding

The skill description claims it can implement, run, and tune trading rules on historical data and provide performance metrics like CAGR, max drawdown, Sharpe, and win rate. In reality, the backtest, optimize, and report functions merely append a record of the command and raw input to local storage; no historical data processing, strategy execution, parameter sweep, or metric computation is performed.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
91% confidence
Finding

The backtest command persists raw CLI arguments to a local JSON history file without explicit disclosure or filtering. In this skill context, users may pass strategy parameters, file paths, API-related strings, or other sensitive trading inputs on the command line, causing unintended local retention and possible later exposure to other local users, backups, or tooling.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
89% confidence
Finding

The optimize command also stores raw user-supplied arguments in persistent local history without notice. Optimization workflows often include parameter ranges, dataset locations, and possibly credentials or proprietary strategy identifiers, so silent persistence increases privacy and confidentiality risk in a trading/backtesting context.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
88% confidence
Finding

The report command silently saves supplied arguments to disk, creating the same local privacy/confidentiality issue as the other commands. Report-generation arguments may reference account data, export paths, or proprietary strategy/report names, and the skill context makes such data more sensitive because trading workflows often involve confidential inputs.

Content

No source excerpt is available for this finding.

Missing User Warnings

Low
Category
Not specified by scanner
Confidence
83% confidence
Finding

When a legacy data file exists, the code automatically loads it and saves migrated content to the new data file. This is a file-writing operation, but there is no user-facing notice or confirmation that migration and persistence will occur.

Content

No source excerpt is available for this finding.

Static analysis

No suspicious patterns detected.