Back to skill

Security audit

Stockmarket

Security checks for vulnerabilities and agentic risk

Overview

This appears to be a straightforward Alpha Vantage market-data helper, with minor caution around broad activation phrases and API-key handling.

Install only if you are comfortable sending market-data queries and an Alpha Vantage API key to Alpha Vantage. Prefer setting ALPHA_VANTAGE_KEY over passing --key on the command line, and be aware the broad triggers may cause the skill to be considered for generic stock-market requests.

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

Note
Location
scripts/stock_data.py:421
Finding

API Key Exposure Through Command-Line Arguments

Content
View full analysis
Remediation
View remediation
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
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Supply ChainUnpinned Dependencies, External Script Fetching, Obfuscated Code
Findings (3)

Credential Access

High
Category
Privilege Escalation
Confidence
70% confidence
Finding

Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.

Content

Scanner excerpt · scripts/stock_data.py (reported line 40)May include surrounding context.

python
BASE_URL = "https://www.alphavantage.co/query"

def get_api_key(options):
    """Get API key from options, env, or default."""
    return options.get("key") or os.environ.get("ALPHA_VANTAGE_KEY", "demo")

def api_request(params, options=None):

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The trigger list is broad and includes generic financial phrases like 'stock market', 'stock price', and 'market data', which can cause the skill to activate for many ordinary finance-related requests. Unintended activation is risky because the skill has Bash permission and may cause external API calls or command execution when a user did not explicitly intend to use this specific skill.

Content

No source excerpt is available for this finding.

Missing User Warnings

Low
Category
Not specified by scanner
Confidence
84% confidence
Finding

This code file sends command inputs such as stock symbols, search keywords, topics, and tickers to Alpha Vantage over HTTP(S). Although the module docstring names the API, there is no runtime warning, confirmation, or explicit disclosure that user-provided inputs and the API key from the environment may be transmitted to a third-party service.

Content

No source excerpt is available for this finding.

Static analysis

No suspicious patterns detected.