Back to skill

Security audit

A Stock Daily Market Sense

Security checks across malware telemetry and agentic risk

Overview

The skill largely matches its A-share market-report purpose, but it deserves review because it uses broad local credential lookup and disables proxy environment settings while making third-party network calls.

Install only if you are comfortable giving the skill access to market-data API credentials, a PostgreSQL/alpha-data database, report-file writes, and outbound network access to the listed data/search providers. Prefer setting credentials explicitly in the runtime environment, avoid running it from directories with unrelated .env files, and review proxy/egress expectations before using the daily runner.

SkillSpector

By NVIDIA
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
  • Trigger AbuseOverly Broad Trigger, Shadow Command Trigger, Keyword Baiting Trigger
  • MCP Least PrivilegeUnderdeclared Capability, Wildcard Permission, Missing Permission Declaration
Findings (18)

Lp3

Medium
Category
MCP Least Privilege
Confidence
84% confidence
Finding
The skill declares no permissions while explicitly instructing the host to use environment variables, read and write local report files, and perform network/database access. This weakens the trust boundary: a host or reviewer may authorize the skill under the assumption it is low-privilege, while it actually requires broad capabilities including outbound connectivity and persistent storage.

Tp4

High
Category
MCP Tool Poisoning
Confidence
91% confidence
Finding
The description frames the skill as a deterministic market-report generator, but the body includes substantially broader behaviors: web/news search, fallback scraping, database state mutation, experiment logging, lifecycle registry maintenance, and HTML post-processing. This mismatch can mislead users and orchestrators about the skill's real attack surface, causing them to permit external access, persistence, and data ingestion they would not otherwise allow.

Description-Behavior Mismatch

Medium
Confidence
93% confidence
Finding
This helper adds a general/news internet search capability that is broader than the skill’s stated deterministic market-data pipeline. In a security review, that scope expansion matters because it allows untrusted external content to influence downstream analysis and outputs, increasing prompt/data poisoning and policy-bypass risk even if this script itself only fetches data.

Context-Inappropriate Capability

Medium
Confidence
90% confidence
Finding
The code searches both environment variables and nearby .env files for an API key for a capability not justified by the manifest. Reading credentials from multiple nearby paths expands the secret-access surface and can unintentionally couple this skill to repository-level or operator secrets that were not meant for it.

Description-Behavior Mismatch

Medium
Confidence
87% confidence
Finding
The script is described as an evidence-pack builder, but it mutates and persists market history into CSV/JSON or a database as part of normal execution. That side effect increases the blast radius of running the skill: it can silently alter shared reference data, poison later analyses, and make outputs depend on prior runs rather than only fetched source data.

Description-Behavior Mismatch

Medium
Confidence
92% confidence
Finding
The manifest claims Tushare Pro and Baostock as data sources, but the code also fetches from Sohu and later JRJ. Undisclosed third-party network access can leak usage patterns, introduce unvetted external dependencies into the trust boundary, and make the skill's behavior differ from what operators expect.

Vague Triggers

Medium
Confidence
76% confidence
Finding
The activation criteria are very broad, covering daily analysis, historical review, feature grouping, factor mining, style analysis, catalysts, and several specialized market patterns. Overbroad triggers increase the chance the skill auto-activates in contexts where the user did not intend networked analysis, file generation, or database updates, expanding exposure to unnecessary privileged actions.

Missing User Warnings

Medium
Confidence
83% confidence
Finding
Remote Google Fonts are enabled by default, causing generated reports to contact third-party infrastructure when opened. This leaks viewer metadata such as IP address, user agent, access time, and possibly referrer context, which is a privacy and environment-disclosure concern, especially for reports expected to be offline or internally distributed.

Missing User Warnings

Low
Confidence
84% confidence
Finding
The code performs direct HTTP requests to Sohu without clear call-site disclosure or an explicit opt-in. In an agent skill, hidden network egress matters because operators may assume only declared financial APIs are used, while this introduces extra external visibility and dependency risk.

Missing User Warnings

Low
Confidence
88% confidence
Finding
The JRJ POST workflow reaches a third-party endpoint with custom headers and request metadata, yet the skill description does not clearly surface this behavior. This is primarily a transparency and data-governance issue: it expands network exposure beyond expected sources and may conflict with operator policy.

Missing User Warnings

Medium
Confidence
76% confidence
Finding
Cleanup mode irreversibly deletes files with no confirmation, dry-run, or execution-time warning. In an agent/tooling context, a mistaken invocation or argument injection could silently destroy generated artifacts and impede auditing or reproducibility, especially because the skill is supposed to generate evidence packs and reports.

External Transmission

Medium
Category
Data Exfiltration
Content
payload["exclude_domains"] = exclude_domains

    try:
        resp = requests.post(TAVILY_ENDPOINT, json=payload, timeout=30)
    except requests.RequestException as exc:
        return {
            "query": query,
Confidence
94% confidence
Finding
This call transmits the user-supplied query, filters, and the API key to a third-party service over the network. That is a real data exfiltration/trust-boundary crossing because sensitive prompts, internal terms, or investigative queries may leave the local environment and be processed by an external provider.

Env Variable Harvesting

High
Category
Data Exfiltration
Content
def get_tavily_key() -> str:
    """TAVILY_API_KEY:优先环境变量,否则就近的 .env(cwd 或脚本上溯的仓库根)。"""
    key = os.environ.get("TAVILY_API_KEY", "").strip()
    if key:
        return key
Confidence
81% confidence
Finding
Reading an API key from an environment variable is normal, but in this skill it supports an undeclared external-search capability and therefore represents real secret access beyond the expected scope. The risk is not theft by itself here, but unauthorized use of available credentials to enable outbound communication and broaden the skill’s power.

External Transmission

Medium
Category
Data Exfiltration
Content
"pageNum": page_num,
                "pageSize": page_size,
            }
            response = requests.post(JRJ_LIMIT_UP_URL, headers=headers, json=payload, timeout=15)
            response.raise_for_status()
            data = response.json()
            if not isinstance(data, dict) or data.get("code") != 20000:
Confidence
90% confidence
Finding
The skill transmits data to an external JRJ endpoint over HTTP POST. Even though the payload is market-query metadata rather than obvious secrets, this is still an external transmission path that can reveal usage timing, queried dates, and environment fingerprints via headers, which is more sensitive in an agent skill than in a standalone analyst script.

Credential Access

High
Category
Privilege Escalation
Content
def _read_key_from_env_file(path: Path) -> str:
    """从单个 .env 文件里读 TAVILY_API_KEY(容错,读不到返回空串)。"""
    try:
        with open(path, "r", encoding="utf-8") as fh:
            for line in fh:
Confidence
91% confidence
Finding
This function implements direct reading of .env files to obtain credentials. Accessing repository-local and ancestor .env files increases the chance of pulling in unrelated secrets and creates an implicit secret-discovery mechanism that exceeds the skill’s stated data-source boundary.

Credential Access

High
Category
Privilege Escalation
Content
if key:
        return key

    candidates = [Path.cwd() / ".env"]
    here = Path(__file__).resolve()
    candidates += [parent / ".env" for parent in list(here.parents)[:6]]
Confidence
92% confidence
Finding
Adding the current working directory .env as a credential source makes secret access dependent on execution context, which can cause accidental ingestion of unrelated credentials. In shared repos or orchestrated environments, cwd-based lookup is especially error-prone and can widen the blast radius of available secrets.

Credential Access

High
Category
Privilege Escalation
Content
candidates = [Path.cwd() / ".env"]
    here = Path(__file__).resolve()
    candidates += [parent / ".env" for parent in list(here.parents)[:6]]

    seen: set[Path] = set()
    for cand in candidates:
Confidence
95% confidence
Finding
Scanning multiple parent directories for .env files is a broad credential-harvesting pattern because it searches beyond the script’s own boundary for secrets. In a multi-project or monorepo environment, this can inadvertently capture higher-scope API keys and enable unauthorized external operations using credentials never intended for this component.

Credential Access

High
Category
Privilege Escalation
Content
if token:
        return token

    env_path = os.path.join(os.getcwd(), ".env")
    if not os.path.exists(env_path):
        return ""
Confidence
82% confidence
Finding
Falling back to reading credentials from cwd/.env is riskier than environment-only handling because the current working directory may be attacker-influenced or unexpectedly shared in agent/runtime environments. This can cause credential substitution, accidental use of the wrong account, or secret exposure through weak file controls.

VirusTotal

65/65 vendors flagged this skill as clean.

View on VirusTotal

Static analysis

No suspicious patterns detected.