Back to skill

Security audit

auto-test-skill

Security checks for vulnerabilities and agentic risk

Overview

This stock analysis skill is mostly purpose-aligned, but its optional social scanning handles session tokens and broad local access in ways users should review carefully.

Review before installing if you plan to use Twitter/X scanning. Prefer running hot scans with --no-social, do not grant Terminal Full Disk Access, avoid browser-cookie extraction when possible, keep AUTH_TOKEN and CT0 out of repositories and shared folders, and treat stored portfolio/watchlist JSON as private financial data.

Vulnerability Patterns
  • Unauthorized Access and Privilege EscalationObtains permissions beyond the task's legitimate needs
  • 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
Findings (4)

T09 · Insecure Skill Coding Practices

Error
Location
scripts/hot_scanner.py:22
Finding

Complete Process Environment Exposed to a Network-Capable Third-Party CLI

Content
View full analysis
Remediation
View remediation

T08 · Insecure Dependencies

Error
Location
scripts/hot_scanner.py:363
Finding

Unpinned Global Dependency and PATH-Resolved Executable Create a Supply-Chain Execution Risk

Content
View full analysis
=0.2.40", # "pandas>=2.0.0", # "fear-and-greed>=0.4", # "edgartools>=2.0.0", # "feedparser>=6.0.0", # ] ``` ### Technical Analysis The documented npm command installs an unpinned package globally. No exact version, lockfile, package integrity value, or reviewed artifact digest is provided. A future package release or registry compromise can therefore alter the code executed by users after the Skill itself has been reviewed. Hot Scanner additionally falls back to the unqualified executable name `bird`. Command arguments are passed as a list and are not vulnerable to shell metacharacter injection, but executable selection is still controlled by `PATH`. An attacker who can place an executable named `bird` in an earlier PATH directory can cause arbitrary local code execution. The risk is amplified because the selected executable receives X session cookies and, under the separate environme ...[truncated 1813 chars]
Remediation
View remediation

T05 · Unauthorized Access and Privilege Escalation

Error
Location
docs/HOT_SCANNER.md:132
Finding

Setup Instructions Recommend Excessive Full Disk Access

Content
View full analysis
Remediation
View remediation

T09 · Insecure Skill Coding Practices

Warning
Location
scripts/portfolio.py:44
Finding

Financial Portfolio and Watchlist Data Are Stored Without Explicit Restrictive Permissions

Content
View full analysis
Path: """Get the portfolio storage path.""" # Use ~/.clawdbot/skills/stock-analysis/portfolios.json state_dir = os.environ.get("CLAWDBOT_STATE_DIR", os.path.expanduser("~/.clawdbot")) portfolio_dir = Path(state_dir) / "skills" / "stock-analysis" portfolio_dir.mkdir(parents=True, exist_ok=True) return portfolio_dir / "portfolios.json" ``` ```python # Ensure directory exists self.path.parent.mkdir(parents=True, exist_ok=True) # Atomic write: write to temp file, then rename tmp_path = self.path.with_suffix(".tmp") try: with open(tmp_path, "w", encoding="utf-8") as f: json.dump(self._data, f, indent=2) tmp_path.replace(self.path) ``` From `scripts/watchlist.py`: ```python def ensure_dirs(): """Create storage directories.""" WATCHLIST_DIR.mkdir(parents=True, exist_ok=True) def load_watchlist() -> list[WatchlistItem]: """Load watchlist from file.""" if WATCHLIST_FILE.exists(): data = json.loads(WATCHLIST_FILE.read_text()) return [WatchlistItem(**item) for item in data] return [] def save_watchlist(items: list[WatchlistItem]): """Save watchlist to file.""" ensure_dirs() data = [asdict(item) for item in items] WATCHLIST_FILE.write_text(json.dumps(data, indent=2)) ``` ### Technical Analysis The files can contain portfolio names, asset tickers, quantities, cost bases, target prices, stop prices, timestamps, and free-form notes. The storage directories and files are created without explicitly setting user-only permissions. Resulting access permissions depend on the process umask and the permissions of any configured `CLAWDBOT_STATE_DIR`. On a system with a ...[truncated 1467 chars]
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 (53)

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
93% confidence
Finding

The document states that the skill writes persistent portfolio data to a local path while no permissions are declared. Undeclared persistence is security-relevant because it can surprise users, retain sensitive financial positions on disk, and bypass least-privilege expectations for an analysis-oriented skill.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
97% confidence
Finding

The document states that the skill writes persistent portfolio data to a local path while no permissions are declared. Undeclared persistence is security-relevant because it can surprise users, retain sensitive financial positions on disk, and bypass least-privilege expectations for an analysis-oriented skill.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
95% confidence
Finding

The document states that the skill writes persistent portfolio data to a local path while no permissions are declared. Undeclared persistence is security-relevant because it can surprise users, retain sensitive financial positions on disk, and bypass least-privilege expectations for an analysis-oriented skill.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
98% confidence
Finding

The document states that the skill writes persistent portfolio data to a local path while no permissions are declared. Undeclared persistence is security-relevant because it can surprise users, retain sensitive financial positions on disk, and bypass least-privilege expectations for an analysis-oriented skill.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
95% confidence
Finding

The document states that the skill writes persistent portfolio data to a local path while no permissions are declared. Undeclared persistence is security-relevant because it can surprise users, retain sensitive financial positions on disk, and bypass least-privilege expectations for an analysis-oriented skill.

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

Credential Access

High
Category
Privilege Escalation
Confidence
96% confidence
Finding

The documentation tells users to place Twitter/X auth secrets in a .env file inside the project directory, which is a common source of accidental disclosure via version control, backups, support bundles, or permissive filesystem access. Because the named values are session/authentication tokens rather than low-scope app credentials, exposure could allow direct abuse of the associated account.

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
88% confidence
Finding

The code explicitly accesses a repository-adjacent .env file, which is a common location for API keys and tokens. In isolation this may be configuration handling, but in the context of subsequent subprocess invocation and network access it meaningfully raises the credential exposure risk.

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
88% confidence
Finding

Checking for and consuming .env content at startup indicates the skill is designed to ingest local credentials opportunistically. Because the skill also interacts with external services and passes environment variables to a subprocess, this behavior increases the potential for unauthorized credential access or leakage.

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:

Context-Inappropriate Capability

High
Category
Not specified by scanner
Confidence
95% confidence
Finding

The scanner executes an external Twitter/X CLI and processes its output, which is a materially broader capability than simple finance-data retrieval. In an agent skill, invoking third-party binaries with ambient credentials creates a strong supply-chain and data-exfiltration risk if the binary is replaced, misconfigured, or behaves unexpectedly.

Content

No source excerpt is available for this finding.

Env Variable Harvesting

High
Category
Data Exfiltration
Confidence
97% confidence
Finding

Copying the full process environment into the subprocess gives the external bird binary access to every loaded secret, including anything imported from .env. In this skill, that is especially dangerous because the binary is third-party and network-capable, so a compromise or malicious replacement could exfiltrate credentials without further barriers.

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
88% confidence
Finding

Referencing a repository-adjacent .env file for runtime credentials is risky because such files are commonly mishandled, overbroad, or accidentally exposed, and they are later fed to an external process. In this skill, the danger is amplified by combining local secret loading with subprocess execution for third-party data collection.

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
90% confidence
Finding

The code actively reads the .env contents and imports every matching line into environment variables, which constitutes broad credential access without least privilege. This is more dangerous in context because the imported secrets are then available to downstream subprocesses and any imported libraries.

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
94% confidence
Finding

Copying the full process environment and passing it to a child process can expose unrelated secrets such as API keys, tokens, and credentials to the external Bird CLI. Since the script also preloads values from a local .env, the child process receives a much broader secret set than is necessary, increasing the blast radius if the CLI or its dependencies are compromised.

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
94% confidence
Finding

This second subprocess path has the same issue: it forwards the entire environment to an external executable during buzz searches. In a finance-analysis skill that may run in an automation context, broad environment inheritance materially raises the risk of credential exposure and unintended secret access.

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 analytics and monitoring via Mixpanel/Amplitude, Sentry, and business KPI tracking, which can affect user privacy by collecting behavioral and error data. Although the document includes general security and compliance notes elsewhere, it does not warn users here that usage data and error telemetry may be collected or require consent/notice.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The README instructs users to obtain AUTH_TOKEN and CT0 directly from browser cookies and place them in a local .env file, but it does not warn that these are sensitive session credentials that can grant account access if exposed. In a skill intended for automation and social-media scraping, this increases the chance users mishandle high-value tokens, commit them to source control, or leak them through logs or support requests.

Content

No source excerpt is available for this finding.

Undeclared Tool Scope

Medium
Category
MCP Least Privilege
Confidence
90% confidence
Finding

The skill advertises commands that invoke shell execution, network access, and persistent local storage, but it declares no explicit tool scope or permissions. This creates an authorization and transparency gap: a host may grant broader capabilities than users expect, and file/network actions can occur without clear consent boundaries.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
92% confidence
Finding

The instructions tell users to place Twitter/X authentication tokens in a local .env file but do not warn about secrecy, file permissions, accidental commits, or reuse risk. This can lead to credential disclosure, account takeover of the linked social account, and unintended exposure through logs, backups, or version control.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
91% confidence
Finding

This markdown file documents that the skill stores portfolio holdings, quantities, cost basis, target prices, and signals in portfolios.json and watchlist.json. Because this behavior affects user data and privacy, the skill description should clearly warn users that their financial data is persisted locally.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
97% confidence
Finding

The documentation tells users how to obtain and use Twitter/X authentication material but does not warn that these values are effectively session secrets. Reusing browser-derived auth tokens in a local tool increases the chance of credential theft, account takeover, and unintended exposure through shell history, files, logs, or repository commits.

Content

No source excerpt is available for this finding.