Back to skill

Security audit

Dexter Research

Security checks for vulnerabilities and agentic risk

Overview

This stock-research skill is mostly purpose-aligned, but it can automatically send reports to Feishu using a hard-coded default recipient and includes a realistic secret-like credential in its documentation.

Review before installing. Remove the hard-coded Feishu recipient, make Feishu delivery opt-in with an explicitly configured recipient, rotate or remove the published secret-like value, pin dependencies, and run the skill in an isolated non-root environment with output paths restricted to the workspace.

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 (3)

T09 · Insecure Skill Coding Practices

Error
Location
scripts/research.py:20
Finding

Generated reports may be sent to a hard-coded Feishu recipient

Content
View full analysis
Remediation
View remediation

T09 · Insecure Skill Coding Practices

Error
Location
SKILL.md:37
Finding

Credential-like Feishu application secret is published in documentation

Content
View full analysis
Remediation
View remediation

T08 · Insecure Dependencies

Warning
Location
requirements.txt:1
Finding

Dependencies are not reproducibly pinned or integrity verified

Content
View full analysis
=1.10.0 requests>=2.28.0 pandas>=1.5.0 numpy>=1.23.0 ``` The documented installation command in `SKILL.md:27-29` is: ```bash pip install -r requirements.txt ``` ### Technical Analysis Every dependency uses only a lower version bound. Installation can therefore select any future release satisfying the constraint. The project provides no lock file, upper bounds, package hashes, or verified artifact source. Python packages can execute code during installation, import, and runtime. A compromised future release, maliciously modified distribution, or incompatible dependency update could therefore affect the Skill without any change to this repository. No typosquatted package name or explicitly malicious package was found. This finding concerns missing reproducibility and integrity controls rather than proof that the current named packages are malicious. ### Attack Path 1. A future version of one of the permitted packages is compromised or maliciously published. 2. An operator runs `pip install -r requirements.txt`. 3. The package resolver selects the compromised release because it satisfies the unrestricted lower-bound constraint. 4. Package-controlled code executes during installation, import, or subsequent data processing. 5. That code inherits the Python process's privileges, environment variables, network access, and filesystem access. A malicious dependency executing in this Skill's process could potentially read the Feishu credentials because they are held in process environment variables. ### Impact Assessment The achievable scope is equivalent to the account running `pip` or the research script. Depending on that account's privileges, impact could include: - Reading environment variables, including Feishu cred ...[truncated 454 chars]
Remediation
View remediation
requests== pandas== numpy== ``` 2. Generate and commit a lock file containing transitive dependencies. 3. Use package hashes and install with integrity enforcement, such as: ```bash pip install --require-hashes -r requirements.txt ``` 4. Resolve packages only from an explicitly configured trusted package index. 5. Run dependency vulnerability and provenance scanning in continuous integration. 6. Review updates before regenerating the lock file. 7. Install and run the Skill in an isolated virtual environment or container under a non-root account. 8. Restrict outbound network access to the documented Feishu, Tencent, East Money, and required AKShare data endpoints. ]]>
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Supply ChainUnpinned Dependencies, External Script Fetching, Obfuscated Code
  • Excessive AgencyUnrestricted Tool Access, Autonomous Decision Making, Scope Creep
  • Trigger AbuseOverly Broad Trigger, Shadow Command Trigger, Keyword Baiting Trigger
  • Taint TrackingDirect Taint Flow, Variable-Mediated Taint Flow, Credential Exfiltration Chain
Findings (23)

Tainted flow: 'FEISHU_APP_ID' from os.environ.get (line 19, credential/environment) → requests.post (network output)

Critical
Category
Data Flow
Confidence
90% confidence
Finding

Credentials or environment variables flow to a network sink. This is a high-confidence indicator of credential exfiltration.

Content

Scanner excerpt · scripts/research.py (reported line 44)May include surrounding context.

python
def get_feishu_token():
    import requests
    url = "https://open.feishu.cn/open-apis/auth/v3/tenant_access_token/internal"
    r = requests.post(url, json={"app_id": FEISHU_APP_ID, "app_secret": FEISHU_APP_SECRET}, timeout=10)
    return r.json().get("tenant_access_token", "")

# ============ 数据获取 ============

Tainted flow: 'USER_OPEN_ID' from os.environ.get (line 21, credential/environment) → requests.post (network output)

Critical
Category
Data Flow
Confidence
90% confidence
Finding

The script transmits the generated research summary and a recipient open_id to Feishu as an automatic side effect, which expands the skill from local analysis into outbound messaging. In this skill context, that is risky because user-requested stock research does not imply consent to send analysis results to a hardcoded or environment-controlled third-party recipient.

Content

Scanner excerpt · scripts/research.py (reported line 292)May include surrounding context.

python
"""推送飞书"""
    import requests
    url = "https://open.feishu.cn/open-apis/im/v1/messages?receive_id_type=open_id"
    r = requests.post(url,
        headers={"Authorization": f"Bearer {token}", "Content-Type": "application/json"},
        json={"receive_id": USER_OPEN_ID, "msg_type": "text", "content": json.dumps({"text": msg})},
        timeout=10)

Ssd 3

High
Category
Not specified by scanner
Confidence
97% confidence
Finding

The documentation includes a real-looking Feishu App Secret example, which may be mistaken for an actual credential and copied into deployments, logs, or prompts. Even if it is only an example, publishing credential-shaped secrets normalizes unsafe handling and can lead to accidental exposure or misuse of real secrets.

Content

No source excerpt is available for this finding.

Ae1

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

Scanner excerpt · SKILL.md (reported line 59)May include surrounding context.

md
python3 scripts/research.py <股票代码>

Undeclared Tool Scope

Medium
Category
MCP Least Privilege
Confidence
89% confidence
Finding

The skill documentation describes capabilities that access environment variables, write files, and make network requests, but it does not declare any explicit tool scope or permission boundaries. This increases the risk of over-privileged execution and makes it harder to enforce least privilege, especially because the skill also sends results externally and reads credentials from the environment.

Content

No source excerpt is available for this finding.

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
93% confidence
Finding

The trigger conditions include broad natural-language phrases like analyzing a stock or researching a company, which can cause the skill to activate unintentionally in normal conversation. In this skill's context, accidental invocation is more dangerous because activation may initiate network collection, file output, and Feishu transmission without a clearly confirmed user intent for those actions.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
93% confidence
Finding

The skill description discusses report generation and Feishu push behavior but does not clearly warn that analysis results may be transmitted to an external service. This creates a privacy and data-handling risk because users may not realize their requests, generated reports, or potentially sensitive research context will be sent off-platform.

Content

No source excerpt is available for this finding.

Intent-Code Divergence

Medium
Category
Not specified by scanner
Confidence
91% confidence
Finding

The docstring states the output is a JSON research report for downstream summarization, but the code also transmits the summary to Feishu. This undocumented external sharing is dangerous because it obscures data egress from reviewers and users, reducing informed consent and making sensitive-output handling harder to assess.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
94% confidence
Finding

The module docstring describes the skill entirely as an A-share financial research script in Chinese and specifies Chinese-language inputs/outputs, with no indication that users may choose another language. This is a natural-language locale policy issue because the file presents a fixed language experience without opt-in or a documented justification for the constraint.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The skill is presented as a financial research tool, but it also includes an undeclared outbound notification capability to Feishu. This mismatch matters because users and operators may authorize the skill expecting analysis only, while the code can disseminate report content externally.

Content

No source excerpt is available for this finding.

Tainted flow: 'LOG_FILE' from os.environ.get (line 23, credential/environment) → open (file write)

Medium
Category
Data Flow
Confidence
79% confidence
Finding

LOG_FILE is taken directly from an environment variable and used for append writes without path validation. If an attacker can influence the runtime environment, they may redirect logs to sensitive or unexpected filesystem locations, potentially overwriting files, polluting system paths, or exposing data through unsafe log placement.

Content

Scanner excerpt · scripts/research.py (reported line 37)May include surrounding context.

python
ts = datetime.now().strftime("%Y-%m-%d %H:%M:%S")
    line = f"[{ts}] {msg}"
    print(line)
    with open(LOG_FILE, "a", encoding="utf-8") as f:
        f.write(line + "\n")

# ============ 飞书Token ============

Context-Inappropriate Capability

Medium
Category
Not specified by scanner
Confidence
94% confidence
Finding

Outbound Feishu messaging is not necessary to perform stock research and introduces avoidable data egress. In the context of an analysis skill, this increases risk because report contents can be sent to an external service without being essential to the core function.

Content

No source excerpt is available for this finding.

External Transmission

Medium
Category
Data Exfiltration
Confidence
80% confidence
Finding

Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.

Content

Scanner excerpt · scripts/research.py (reported line 44)May include surrounding context.

python
def get_feishu_token():
    import requests
    url = "https://open.feishu.cn/open-apis/auth/v3/tenant_access_token/internal"
    r = requests.post(url, json={"app_id": FEISHU_APP_ID, "app_secret": FEISHU_APP_SECRET}, timeout=10)
    return r.json().get("tenant_access_token", "")

# ============ 数据获取 ============

Tainted flow: 'OUTPUT_FILE' from os.environ.get (line 22, credential/environment) → open (file write)

Medium
Category
Data Flow
Confidence
82% confidence
Finding

OUTPUT_FILE is environment-controlled and used directly for file creation/writing, allowing arbitrary file write within the privileges of the process. In an agent environment, that can be abused to clobber other workspace files, overwrite configuration, or place sensitive report data into attacker-chosen locations.

Content

Scanner excerpt · scripts/research.py (reported line 280)May include surrounding context.

python
def save_json(code, data):
    """保存JSON"""
    with open(OUTPUT_FILE, "w", encoding="utf-8") as f:
        json.dump({
            "code": code,
            "timestamp": datetime.now().isoformat(),

External Transmission

Medium
Category
Data Exfiltration
Confidence
89% confidence
Finding

This external transmission sends generated report content to Feishu, creating third-party data egress beyond the core analysis function. In a stock-research skill, such automatic transmission is more dangerous because users may supply proprietary watchlists or analysis targets without expecting external redistribution.

Content

Scanner excerpt · scripts/research.py (reported line 292)May include surrounding context.

python
"""推送飞书"""
    import requests
    url = "https://open.feishu.cn/open-apis/im/v1/messages?receive_id_type=open_id"
    r = requests.post(url,
        headers={"Authorization": f"Bearer {token}", "Content-Type": "application/json"},
        json={"receive_id": USER_OPEN_ID, "msg_type": "text", "content": json.dumps({"text": msg})},
        timeout=10)

Unpinned Dependencies

Low
Category
Supply Chain
Confidence
96% confidence
Finding

The dependency is specified with a lower bound only, which allows future unreviewed versions to be installed and makes builds non-reproducible. In a financial-research skill that may fetch external market data, this increases supply-chain risk because behavior and security posture can change across installations.

Content

Scanner excerpt · requirements.txt (reported line 1)May include surrounding context.

text
akshare>=1.10.0
requests>=2.28.0
pandas>=1.5.0
numpy>=1.23.0

Unpinned Dependencies

Low
Category
Supply Chain
Confidence
98% confidence
Finding

Using requests>=2.28.0 permits installation of many different versions, including potentially vulnerable or behavior-changing releases, and prevents reproducible environments. Because this skill likely performs network access for stock research, an unsafe or unexpected requests version can increase exposure to known HTTP/client-side issues.

Content

Scanner excerpt · requirements.txt (reported line 2)May include surrounding context.

text
akshare>=1.10.0
requests>=2.28.0
pandas>=1.5.0
numpy>=1.23.0

Unverifiable Dependency: requests has 16 known advisory(ies) (CVE-2014-1830 (Exposure of Sensitive Information to an Unauthorized Actor in Requests); CVE-2024-47081 (Requests vulnerable to .netrc credentials leak via malicious URLs); CVE-2024-35195 (Requests `Session` object does not verify requests after making first request wi) +13 more), but the manifest does not pin a version, so it is unknown whether the installed release is affected

Low
Category
Supply Chain
Confidence
95% confidence
Finding

The manifest references requests without an exact version, so it is impossible to verify from this file whether deployment will use a release affected by known advisories. In a skill that likely makes outbound HTTP requests, lack of version certainty increases the chance of silently inheriting a vulnerable client library.

Content

No source excerpt is available for this finding.

Unpinned Dependencies

Low
Category
Supply Chain
Confidence
96% confidence
Finding

The pandas dependency is unpinned, so deployments may resolve to different versions over time, including versions with security or deserialization-related issues. This is mainly a supply-chain and reproducibility weakness rather than an immediate exploit by itself.

Content

Scanner excerpt · requirements.txt (reported line 3)May include surrounding context.

text
akshare>=1.10.0
requests>=2.28.0
pandas>=1.5.0
numpy>=1.23.0

Unverifiable Dependency: pandas has 1 known advisory(ies) (CVE-2020-13091 (** DISPUTED ** pandas through 1.0.3 can unserialize and execute commands from an)), but the manifest does not pin a version, so it is unknown whether the installed release is affected

Low
Category
Supply Chain
Confidence
87% confidence
Finding

Because pandas is not pinned, the file does not demonstrate whether the installed version avoids known advisories. The risk in this skill context is limited but real: data-processing libraries can become attack surfaces when handling untrusted files or serialized content.

Content

No source excerpt is available for this finding.

Unpinned Dependencies

Low
Category
Supply Chain
Confidence
96% confidence
Finding

An unpinned numpy requirement allows arbitrary newer versions within dependency resolution, which can introduce known vulnerabilities, ABI issues, or unexpected runtime behavior. While not directly exploitable on its own, it weakens build integrity and complicates assurance of the deployed package set.

Content

Scanner excerpt · requirements.txt (reported line 4)May include surrounding context.

text
akshare>=1.10.0
requests>=2.28.0
pandas>=1.5.0
numpy>=1.23.0

Unverifiable Dependency: numpy has 16 known advisory(ies) (CVE-2014-1859 (Numpy arbitrary file write via symlink attack); CVE-2021-41495 (NumPy NULL Pointer Dereference); CVE-2021-33430 (NumPy Buffer Overflow (Disputed)) +13 more), but the manifest does not pin a version, so it is unknown whether the installed release is affected

Low
Category
Supply Chain
Confidence
90% confidence
Finding

The unpinned numpy dependency makes it unverifiable whether an affected version with known advisories could be installed. Although numpy is commonly used for computation rather than direct network exposure, vulnerable versions can still affect integrity or availability depending on how the library is used.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

Low
Category
Not specified by scanner
Confidence
86% confidence
Finding

The stated purpose is on-demand A-share financial research and scoring. The implementation persists output JSON and appends logs to workspace paths, which are side effects beyond the user-facing description of analysis behavior, even though they may be useful operationally.

Content

No source excerpt is available for this finding.