Back to skill

Security audit

csig-skill-0625

Security checks for vulnerabilities and agentic risk

Overview

This stock-analysis skill is mostly coherent, but its optional Twitter/X features ask users to expose session cookies and pass broad environment data to an external CLI.

Review the Twitter/X features carefully before installing. Avoid granting Full Disk Access, do not place live browser session cookies in the skill directory, and prefer running the scanners with social media disabled unless you can isolate the credentials and trust the bird executable. Pin or review dependencies before use.

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/analyze_stock.py:4
Finding

Unpinned Third-Party Dependencies Allow Unreviewed Code Execution

Content
View full analysis
=0.2.40", # "pandas>=2.0.0", # "fear-and-greed>=0.4", # "edgartools>=2.0.0", # "feedparser>=6.0.0", # ] ``` The other executable scripts use the same open-ended dependency pattern: ```python # scripts/dividends.py # dependencies = [ # "yfinance>=0.2.40", # "pandas>=2.0.0", # ] # scripts/portfolio.py # dependencies = ["yfinance>=0.2.40"] # scripts/watchlist.py # dependencies = [ # "yfinance>=0.2.40", # ] ``` `README.md:143` and `SKILL.md:152` instruct users to install an unpinned global npm package: ```bash npm install -g @steipete/bird ``` ### Technical Analysis The PEP 723 dependency declarations specify minimum versions but no upper bounds, exact versions, hashes, or audited lockfile. When the scripts are launched through `uv run`, a future package release satisfying these constraints can be downloaded and executed even though that release was not part of the reviewed project. The Twitter integration also directs users to install the latest available version of `@steipete/bird` globally. The resulting executable is invoked while Twitter session credentials are available in its environment. This makes compromise of that package, its publisher, or its distribution channel particularly consequential. No evidence was found that the currently named dependencies are malicious. The vulnerability is that dependency resolution permits future, unreviewed code to execute automatically. ### Attack Path 1. An attacker compromises a dependency publisher account, package release process, or upstream distribution channel. 2. The attack ...[truncated 1162 chars]
Remediation
View remediation

T09 · Insecure Skill Coding Practices

Warning
Location
scripts/hot_scanner.py:22
Finding

Plaintext Browser Session Tokens and Excessive Subprocess Environment Exposure

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
  • Excessive AgencyUnrestricted Tool Access, Autonomous Decision Making, Scope Creep
  • Tool MisuseTool Parameter Abuse, Chaining Abuse, Unsafe Defaults
  • Rogue AgentSelf-Modification, Session Persistence
Findings (49)

Tool Parameter Abuse

High
Category
Tool Misuse
Confidence
80% 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 · App-Plan.md (reported line 114)May include surrounding context.

md
GET  /portfolios
   POST /portfolios
   PUT  /portfolios/{id}
   DELETE /portfolios/{id}

   GET  /portfolios/{id}/assets
   POST /portfolios/{id}/assets

Tool Parameter Abuse

High
Category
Tool Misuse
Confidence
80% 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 · App-Plan.md (reported line 119)May include surrounding context.

md
GET  /portfolios/{id}/assets
   POST /portfolios/{id}/assets
   PUT  /portfolios/{id}/assets/{ticker}
   DELETE /portfolios/{id}/assets/{ticker}

   GET  /portfolios/{id}/performance?period=weekly
   GET  /portfolios/{id}/summary

Tool Parameter Abuse

High
Category
Tool Misuse
Confidence
80% 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 · App-Plan.md (reported line 126)May include surrounding context.

md
GET  /alerts
   POST /alerts
   DELETE /alerts/{id}

   GET  /user/subscription
   POST /user/subscription/upgrade

Tp4

High
Category
MCP Tool Poisoning
Confidence
95% confidence
Finding

This finding highlights undeclared use of additional sources like CoinGecko, Google News, Reddit, and Twitter/X, plus invocation of an external CLI ('bird') and local cache writes. External subprocess execution and broader network collection materially expand the attack surface and data-handling risk beyond the stated Yahoo Finance analysis purpose.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
96% confidence
Finding

This finding highlights undeclared use of additional sources like CoinGecko, Google News, Reddit, and Twitter/X, plus invocation of an external CLI ('bird') and local cache writes. External subprocess execution and broader network collection materially expand the attack surface and data-handling risk beyond the stated Yahoo Finance analysis purpose.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
97% confidence
Finding

This finding highlights undeclared use of additional sources like CoinGecko, Google News, Reddit, and Twitter/X, plus invocation of an external CLI ('bird') and local cache writes. External subprocess execution and broader network collection materially expand the attack surface and data-handling risk beyond the stated Yahoo Finance analysis purpose.

Content

No source excerpt is available for this finding.

Self-Modification

High
Category
Rogue Agent
Confidence
85% confidence
Finding

Skill modifies its own code, configuration, or behavior at runtime. Self-modification enables an agent to escalate privileges, disable safety constraints, or install persistent backdoors.

Content

Scanner excerpt · TODO.md (reported line 88)May include surrounding context.

md
- [ ] Add timeout per indicator (10s max)
- [ ] Test with multiple stocks in sequence
- [ ] Measure actual runtime improvement
- [ ] Update SKILL.md with new runtime (target: 3-4s)

**Expected Impact**:
- Reduce runtime from 6-10s to 3-4s per stock

Self-Modification

High
Category
Rogue Agent
Confidence
85% confidence
Finding

Skill modifies its own code, configuration, or behavior at runtime. Self-modification enables an agent to escalate privileges, disable safety constraints, or install persistent backdoors.

Content

Scanner excerpt · TODO.md (reported line 193)May include surrounding context.

md
- [ ] Add timeout per indicator (10s max)
- [ ] Test with multiple stocks in sequence
- [ ] Measure actual runtime improvement
- [ ] Update SKILL.md with new runtime (target: 3-4s)

**Expected Impact**:
- Reduce runtime from 6-10s to 3-4s per stock

Context-Inappropriate Capability

High
Category
Not specified by scanner
Confidence
98% confidence
Finding

Telling users to grant Terminal Full Disk Access so a CLI can read browser-derived session state is an unjustified elevation of host privileges for a stock-analysis tool. That permission can expose far more than Twitter auth material, including other sensitive local data, and materially increases the blast radius if the CLI, shell environment, or surrounding agent is compromised.

Content

No source excerpt is available for this finding.

Credential Access

High
Category
Privilege Escalation
Confidence
90% confidence
Finding

The documentation tells users to store live Twitter/X session credentials in a local .env file inside the skill directory. In agent or automation contexts, files in the project tree are often easier to accidentally commit, read, log, or expose to other tooling, turning a documentation convenience into a credential-handling weakness.

Content

Scanner excerpt · docs/HOT_SCANNER.md (reported line 149)May include surrounding context.

Create .env file in the skill directory:

bash
# /path/to/stock-analysis/.env
AUTH_TOKEN=your_auth_token_here
CT0=your_ct0_token_here

Credential Access

High
Category
Privilege Escalation
Confidence
86% confidence
Finding

Reading a project .env file is not inherently malicious, but it is credential-access behavior because .env commonly stores secrets. In this skill, the danger is elevated by subsequent subprocess execution with inherited environment, turning passive access into potential credential exposure.

Content

Scanner excerpt · scripts/hot_scanner.py (reported line 22)May include surrounding context.

python
from collections import defaultdict
from concurrent.futures import ThreadPoolExecutor, as_completed

# Load .env file if exists
ENV_FILE = Path(__file__).parent.parent / ".env"
if ENV_FILE.exists():
    with open(ENV_FILE) as f:

Credential Access

High
Category
Privilege Escalation
Confidence
86% confidence
Finding

The explicit existence check and reading of .env indicates the script is designed to ingest local credentials/configuration. In the context of a finance-analysis skill, broad credential loading is more dangerous than necessary, especially when paired with downstream subprocess environment inheritance.

Content

Scanner excerpt · scripts/hot_scanner.py (reported line 23)May include surrounding context.

python
from concurrent.futures import ThreadPoolExecutor, as_completed

# Load .env file if exists
ENV_FILE = Path(__file__).parent.parent / ".env"
if ENV_FILE.exists():
    with open(ENV_FILE) as f:
        for line in f:

Env Variable Harvesting

High
Category
Data Exfiltration
Confidence
98% confidence
Finding

Copying the entire process environment and handing it to an external executable is a strong indicator of secret exposure risk. Because the process environment was previously populated from .env, any credentials present there become available to the bird CLI, which could log, exfiltrate, or misuse them if compromised or misconfigured.

Content

Scanner excerpt · scripts/hot_scanner.py (reported line 387)May include surrounding context.

python
for category, query in searches:
                try:
                    env = os.environ.copy()
                    result = subprocess.run(
                        [bird_bin, "search", query, "-n", "15", "--json"],
                        capture_output=True, text=True, timeout=30, env=env

Credential Access

High
Category
Privilege Escalation
Confidence
60% confidence
Finding

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

Content

Scanner excerpt · scripts/rumor_scanner.py (reported line 30)May include surrounding context.

python
# Bird CLI path
BIRD_CLI = "/home/clawdbot/.nvm/versions/node/v24.12.0/bin/bird"
BIRD_ENV = Path(__file__).parent.parent / ".env"

def load_env():
    """Load environment variables from .env file."""

Credential Access

High
Category
Privilege Escalation
Confidence
60% confidence
Finding

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

Content

Scanner excerpt · scripts/rumor_scanner.py (reported line 33)May include surrounding context.

python
BIRD_ENV = Path(__file__).parent.parent / ".env"

def load_env():
    """Load environment variables from .env file."""
    if BIRD_ENV.exists():
        for line in BIRD_ENV.read_text().splitlines():
            if '=' in line and not line.startswith('#'):

Env Variable Harvesting

High
Category
Data Exfiltration
Confidence
90% confidence
Finding

Copying the entire environment after loading a .env file passes all available secrets to the external Bird CLI, not just the one token it may need. If that CLI is compromised, overly permissive, or logs its environment, unrelated credentials can be exposed to another process and potentially to external services.

Content

Scanner excerpt · scripts/rumor_scanner.py (reported line 79)May include surrounding context.

python
for query in queries[:4]:  # Limit to avoid rate limits
        try:
            cmd = [BIRD_CLI, 'search', query, '-n', '10', '--json']
            env = os.environ.copy()
            
            result = subprocess.run(cmd, capture_output=True, text=True, timeout=30, env=env)

Env Variable Harvesting

High
Category
Data Exfiltration
Confidence
90% confidence
Finding

This second use repeats the same overbroad secret propagation pattern, forwarding the full environment to an external CLI for another search workflow. Repeated exposure increases the chance that credentials unrelated to this feature are leaked or mishandled.

Content

Scanner excerpt · scripts/rumor_scanner.py (reported line 132)May include surrounding context.

python
for query in queries[:3]:
        try:
            cmd = [BIRD_CLI, 'search', query, '-n', '15', '--json']
            env = os.environ.copy()
            
            result = subprocess.run(cmd, capture_output=True, text=True, timeout=30, env=env)

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
89% confidence
Finding

This markdown file describes adding Mixpanel/Amplitude, Sentry, and CloudWatch telemetry, which can collect user activity and diagnostic data. The document does not provide any explicit warning or disclosure near these features about data collection, privacy implications, or user consent controls.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
94% confidence
Finding

The README instructs users to obtain raw Twitter/X session cookies (AUTH_TOKEN and CT0) from browser DevTools and store them in a local .env file, but provides no warning about the sensitivity of those credentials or the risks of session hijacking. These tokens can grant account access or API-equivalent capabilities, so normalizing manual cookie extraction increases the chance of credential theft, accidental disclosure, or unsafe reuse outside intended auth flows.

Content

No source excerpt is available for this finding.

Undeclared Tool Scope

Medium
Category
MCP Least Privilege
Confidence
95% confidence
Finding

The skill advertises commands that read and write local files, invoke shell commands, and access multiple network resources, but it does not declare any tool scope or permissions. That makes the operational boundary opaque to users and any policy layer, increasing the chance of over-privileged execution or unexpected external access.

Content

No source excerpt is available for this finding.

Context-Inappropriate Capability

Medium
Category
Not specified by scanner
Confidence
92% confidence
Finding

The documentation expands the skill from passive market analysis into collection of Twitter/X session-derived data through an external CLI and user-supplied auth tokens. Requiring social-media credentials is not necessary for the core stock/crypto analysis use case described, and it increases the attack surface by encouraging users to expose reusable session secrets to local tools and the skill environment.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The guide instructs users to extract auth_token and ct0 values from browser cookies and use them for the tool, but it does not provide clear warnings about account takeover risk, token reuse, storage risk, or the sensitivity of browser session credentials. Omitting these warnings makes accidental credential exposure and unsafe handling more likely.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The module docstring says the script provides stock analysis using Yahoo Finance data, but the code later pulls Google News RSS headlines and SEC Form 4 insider-trading data via edgartools. Those are materially different data sources and capabilities, not just implementation details of Yahoo Finance access.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

Medium
Category
Not specified by scanner
Confidence
91% confidence
Finding

The usage docstring describes analyzing one or more tickers, yet the implemented behavior includes portfolio loading, portfolio valuation, concentration analysis, and period-return calculations. That is a broader operational scope than the file-level documentation advertises.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
92% confidence
Finding

The script hard-codes an identity email and transmits it to SEC EDGAR in outbound requests without user awareness or configuration. This creates a privacy and attribution risk: executions can be linked to a fixed identity, and users or operators may unknowingly disclose contact information or misrepresent request origin.

Content

No source excerpt is available for this finding.

Static analysis

No suspicious patterns detected.