T05 · Unauthorized Access and Privilege Escalation
- Location
docs/HOT_SCANNER.md:132- Finding
Excessive Full Disk Access Requested for Social-Media Scanning
- Content
View full analysis
- Remediation
View remediation
Security audit
Security checks for vulnerabilities and agentic risk
The skill largely matches a stock and crypto analysis purpose, but it asks users to expose X session cookies and broad local access and includes risky local file-modifying code.
Install only if you are comfortable reviewing and limiting the optional social scanner. Avoid granting Terminal Full Disk Access, avoid storing X cookies in the skill directory, do not run batch_refactor.py, and keep any portfolio or watchlist data in a private directory with restrictive permissions. The core market-analysis idea is coherent, but the credential handling and local mutation risks deserve manual review before use.
docs/HOT_SCANNER.md:132Excessive Full Disk Access Requested for Social-Media Scanning
scripts/rumor_scanner.py:30Complete Process Environment Passed to Hard-Coded Third-Party Executable
scripts/trend_scanner.py:22Trend Scanner Exposes All Environment Secrets to the Social-Media CLI
README.md:127Live X Session Cookies Stored in a Plaintext Project File
scripts/market_analyzer.py:2Runtime Dependencies Are Not Reproducibly Pinned
scripts/batch_refactor.py:107Batch Refactoring Utility Automatically Rewrites the Entire Script Directory
scripts/portfolio_manager.py:42Portfolio Records Are Written Without Enforced Private Permissions
scripts/watchlist_manager.py:31Watchlist, Trading Thresholds, and Notes Are Stored Without Enforced Private Permissions
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).
GET /portfolios
POST /portfolios
PUT /portfolios/{id}
DELETE /portfolios/{id}
GET /portfolios/{id}/assets
POST /portfolios/{id}/assets
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).
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 parameters are crafted to achieve unintended or unsafe behavior. Parameter abuse can bypass intended safety checks (e.g. shell=True, --force, dangerous glob patterns).
GET /alerts
POST /alerts
DELETE /alerts/{id}
GET /user/subscription
POST /user/subscription/upgrade
If the underlying implementation stores portfolio data locally without clearly declaring that persistence in the permission/scope model, users may expose sensitive financial holdings information unintentionally. In a finance context, silent or under-disclosed local persistence increases privacy risk even if the data is not overtly exfiltrated.
If the underlying implementation stores portfolio data locally without clearly declaring that persistence in the permission/scope model, users may expose sensitive financial holdings information unintentionally. In a finance context, silent or under-disclosed local persistence increases privacy risk even if the data is not overtly exfiltrated.
If the underlying implementation stores portfolio data locally without clearly declaring that persistence in the permission/scope model, users may expose sensitive financial holdings information unintentionally. In a finance context, silent or under-disclosed local persistence increases privacy risk even if the data is not overtly exfiltrated.
If the underlying implementation stores portfolio data locally without clearly declaring that persistence in the permission/scope model, users may expose sensitive financial holdings information unintentionally. In a finance context, silent or under-disclosed local persistence increases privacy risk even if the data is not overtly exfiltrated.
If the underlying implementation stores portfolio data locally without clearly declaring that persistence in the permission/scope model, users may expose sensitive financial holdings information unintentionally. In a finance context, silent or under-disclosed local persistence increases privacy risk even if the data is not overtly exfiltrated.
If the underlying implementation stores portfolio data locally without clearly declaring that persistence in the permission/scope model, users may expose sensitive financial holdings information unintentionally. In a finance context, silent or under-disclosed local persistence increases privacy risk even if the data is not overtly exfiltrated.
The document explicitly instructs users to retrieve auth_token and ct0 cookie values from their browser and reuse them in a local tool. This is credential handling that bypasses standard authorization mechanisms and can enable account compromise, session hijacking, or unauthorized reuse if the tokens are leaked, logged, or reused by other components.
Storing live session credentials in a project .env file within the skill directory creates a realistic risk of accidental disclosure through source control, backups, logs, workspace sharing, or local compromise. While .env usage is common, the specific secrets here are browser-derived session tokens, which are especially sensitive because they can directly impersonate a user account.
Create .env file in the skill directory:
# /path/to/stock-analysis/.env
AUTH_TOKEN=your_auth_token_here
CT0=your_ct0_token_here
This file is a bulk refactoring utility that scans local Python files and rewrites them in place, which is unrelated to the advertised stock and cryptocurrency analysis purpose of the skill. In an agent skill context, unjustified local file modification is dangerous because it expands the skill’s capabilities into source-code tampering, enabling accidental corruption or intentional persistence/backdoor insertion if triggered.
The script enumerates Python files in its directory and prepares to rewrite all matching files, giving the skill mass source-code rewriting capability that is not justified by stock analysis functionality. In a mismatched skill, this kind of broad file-editing behavior materially increases the risk of supply-chain style tampering, destructive changes, or stealthy modification of adjacent code.
Copying the full process environment after loading .env contents enables broad credential exposure to the external Bird CLI. In a skill context, invoking third-party tooling with inherited secrets is especially dangerous because the tool boundary is where data exfiltration or accidental secret disclosure commonly occurs.
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)
This second environment copy repeats the same secret-propagation problem in another subprocess path. Any sensitive variables loaded into the parent environment become available to the external binary, unnecessarily expanding credential exposure.
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)
Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.
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:
Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.
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:
Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.
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:
Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.
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:
The scanner executes an external 'bird' binary to collect Twitter/X content, which introduces arbitrary code execution through a local executable outside the Python codebase. Even though arguments are passed safely as a list, trust is shifted to whatever 'bird' resolves to on disk, making the skill more dangerous than a read-only analysis tool and widening the attack surface substantially.
Using os.environ.copy() passes the full inherited environment, including any secrets loaded from .env or the host runtime, into the external 'bird' subprocess. If that binary logs, crashes, uploads diagnostics, or is replaced by a malicious executable, exposed credentials could be disclosed or abused far beyond the Twitter integration itself.
for sector, 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
The roadmap explicitly plans product analytics and error tracking, but the surrounding document does not describe a user-facing notice, consent flow, or telemetry controls for collecting behavioral and diagnostic data. In a financial app handling portfolios, alerts, and potentially sensitive usage patterns, undisclosed telemetry can create privacy and compliance risk even if the collection is not overtly malicious.
The README instructs users to extract and place Twitter/X session-related tokens (AUTH_TOKEN and CT0) from browser cookies into a local .env file. These are sensitive authentication artifacts, and documenting manual cookie extraction without an explicit warning about account/session risk, secure handling, token scope, and possible terms-of-service implications can encourage unsafe credential handling or reuse. In a market-trend skill that automates social-media access, this is more dangerous because users may routinely operationalize these secrets in scripts, logs, or shared environments.
The manifest advertises executable capabilities such as shell, network, file read/write, and environment access but does not declare any explicit tool scope or permissions boundaries. In a skill that can run local scripts and persist data, missing scope declarations weakens reviewability and increases the chance of over-privileged execution or accidental misuse.
The manifest description uses broad invocation language like 'use for stock analysis, portfolio tracking, crypto monitoring, trending stocks, or finding rumors before they hit mainstream' without clear activation constraints. Over-broad trigger language can cause the skill to be selected in contexts beyond user intent, which is riskier when the skill can access network, shell, and local files.