Back to skill

Security audit

Stock Info Explorer Jarvis

Security checks for vulnerabilities and agentic risk

Overview

This skill is a straightforward Yahoo Finance helper that fetches market data and generates local summaries/charts, with some routine dependency and temporary-file hygiene caveats.

Install only if you are comfortable with it fetching ticker data from Yahoo Finance and resolving Python packages at runtime. For stronger safety, run it in an isolated environment and avoid shared multi-user systems until dependencies are pinned and chart output uses unique private temp files.

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

T08 · Insecure Dependencies

Warning
Location
scripts/yf.py:2
Finding
Unpinned Runtime Dependencies Create a Supply-Chain Risk## Vulnerability Details **File Location**: `scripts/yf.py`, lines 2-10 **Vulnerability Type**: Unpinned third-party runtime dependencies **Risk Level**: Medium ```python # /// script # dependencies = [ # "yfinance", # "rich", # "pandas", # "plotille", # "matplotlib", # "mplfinance" # ] # /// ``` ### Technical Analysis The inline dependency declaration specifies six third-party packages without exact versions, hashes, or a committed lockfile. The documented execution method uses `uv run --script`, which may resolve and install dependencies when the script is run. Because dependency resolution is not constrained to reviewed artifacts, the effective code executed by the skill can change after the project itself has been audited. A compromised upstream release, malicious dependency takeover, or incompatible future release could be selected automatically. Package build hooks may execute during installation, and imported package initialization code executes with the privileges of the skill process. No evidence indicates that the currently named packages are intentionally malicious. The vulnerability is the absence of dependency integrity and reproducibility controls. ### Attack Path 1. An attacker compromises the distribution account or release process of one of the declared packages or one of its transitive dependencies. 2. The attacker publishes a malicious version that remains compatible with the unconstrained dependency declaration. 3. A user invokes the documented `uv run --script scripts/yf.py ...` command in an environment where dependencies must be resolved. 4. `uv` retrieves and installs the malicious package version. 5. Attacker-controlled code executes through a package build hook or when the package is imported by `scripts/yf.py`. ### Impact Assessment Successful exploitation provides code execution with the same operating-system identity and privileges as the skill process. Depend ...[truncated 436 chars]
Remediation
## Remediation Suggestions 1. Pin every direct dependency to an exact, reviewed version rather than allowing unconstrained resolution. 2. Generate and commit a lockfile that also fixes all transitive dependency versions. 3. Use cryptographic hash verification for downloaded distributions where supported. 4. Prefer an internal or allowlisted package index for production execution. 5. Run dependency vulnerability and provenance checks in CI, including checks for unexpected package ownership or source changes. 6. Update dependencies through a controlled review process rather than resolving new releases automatically at runtime. 7. Execute the skill in a sandbox with minimal filesystem, environment-variable, and network access to reduce the impact of a compromised dependency.

T09 · Insecure Skill Coding Practices

Warning
Location
scripts/yf.py:133
Finding
Predictable Chart Files Are Written Unsafely in a Shared Temporary Directory## Vulnerability Details **File Location**: `scripts/yf.py`, lines 133-187 **Vulnerability Type**: Predictable temporary file and potential symlink overwrite **Risk Level**: Medium ```python path = f"/tmp/{symbol}_pro.png" mc = mpf.make_marketcolors(up='red', down='blue', inherit=True) s = mpf.make_mpf_style(marketcolors=mc, gridstyle='--', y_on_right=True) addplots = [] panel_ratios = [6, 2] # main + volume next_panel = 2 # reserve panel 1 for volume close = hist['Close'] # Overlays on main panel (0) if indicators.get('bb'): upper, mid, lower = calc_bbands(close) addplots.append(mpf.make_addplot(upper, color='gray', width=0.8, panel=0)) addplots.append(mpf.make_addplot(mid, color='dimgray', width=0.8, panel=0)) addplots.append(mpf.make_addplot(lower, color='gray', width=0.8, panel=0)) if indicators.get('vwap'): vwap = calc_vwap(hist) addplots.append(mpf.make_addplot(vwap, color='purple', width=1.0, panel=0)) # RSI panel if indicators.get('rsi'): rsi = calc_rsi(close) rsi_panel = next_panel next_panel += 1 panel_ratios.append(2) addplots.append(mpf.make_addplot(rsi, panel=rsi_panel, color='orange', width=1.0, ylabel='RSI')) # guides (30/70) addplots.append(mpf.make_addplot(pd.Series(70, index=hist.index), panel=rsi_panel, color='gray', linestyle='--', width=0.7)) addplots.append(mpf.make_addplot(pd.Series(30, index=hist.index), panel=rsi_panel, color='gray', linestyle='--', width=0.7)) # MACD panel if indicators.get('macd'): macd, sig, histo = calc_macd(close) macd_panel = next_panel next_panel += 1 panel_ratios.append(2) addplots.append(mpf.make_addplot(macd, panel=macd_panel, color='blue', width=1.0, ylabel='MACD')) addplots.appen ...[truncated 3368 chars]
Remediation
## Remediation Suggestions 1. Create output files with `tempfile.NamedTemporaryFile` or `tempfile.mkstemp`, using a random name and exclusive creation. 2. Place generated charts in a private temporary directory created with `tempfile.TemporaryDirectory` and permissions accessible only to the current user. 3. Validate symbols against a strict allowlist before using them in any filename, permitting only required ticker characters and rejecting path separators or traversal sequences. 4. Avoid reopening a predictable pathname after secure creation. Pass a securely opened file handle where supported, or retain ownership of an exclusively created path. 5. Verify that an existing destination is a regular file owned by the expected user and reject symbolic links if a stable output name is operationally required. 6. Assign a unique output path to every invocation to prevent collisions between concurrent runs. 7. Run the skill under a dedicated, least-privileged account so any attempted overwrite is limited to non-sensitive files.
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

Static analysis

No suspicious patterns detected.