Back to skill

Security audit

实时新闻

Security checks for vulnerabilities and agentic risk

Overview

This news skill appears to call a real news API, but it asks users for an API key and stores it in a local plaintext .env file, which needs review before installation.

Install only if you are comfortable giving this publisher a Xiaobenyang API key and having it stored in plaintext in a local .env file. Use a limited-scope key if possible, avoid placing unrelated secrets in the same .env file, and remove or rotate the key after use. Also note that the shipped tools.py contains a syntax error, so the skill may not run correctly without fixes.

Vulnerability Patterns
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
  • Supply ChainUnpinned Dependencies, External Script Fetching, Obfuscated Code
  • Excessive AgencyUnrestricted Tool Access, Autonomous Decision Making, Scope Creep
Findings (19)

Lp3

Medium
Category
MCP Least Privilege
Confidence
86% confidence
Finding
The skill documentation describes capabilities that involve reading environment variables, writing files, and making network calls, but it does not declare corresponding permissions. This reduces transparency and weakens the trust boundary, because a user invoking a simple 'news' skill would not reasonably expect local credential persistence and broader code capabilities.

Tp4

High
Category
MCP Tool Poisoning
Confidence
94% confidence
Finding
The skill claims to provide real-time news, but its behavior also includes soliciting an API key from the user and persisting it locally via configuration management. That mismatch is dangerous because it hides sensitive-data handling behind an innocuous description, increasing the chance of users disclosing credentials without informed consent.

Description-Behavior Mismatch

Medium
Confidence
96% confidence
Finding
The file implements persistent API credential storage and retrieval logic even though the declared skill purpose is real-time news. This capability expands the skill's access to sensitive data without clear justification, and the mismatch between stated purpose and implemented behavior increases the risk of hidden credential handling or unintended secret exposure.

Context-Inappropriate Capability

High
Confidence
98% confidence
Finding
The function writes the API key directly into a local .env file, which is plaintext storage and may be exposed through filesystem access, backups, logs, or accidental source control inclusion. For a news-oriented skill, persisting secrets locally is not obviously necessary and creates a disproportionate credential theft risk.

Intent-Code Divergence

Medium
Confidence
88% confidence
Finding
The class docstring identifies the component as a Gaokao-related skill, which contradicts the manifest's real-time news description. This inconsistency is suspicious because it suggests code reuse from another project or an undeclared purpose, making it harder to trust the skill's actual behavior and increasing review risk around secret handling.

Missing User Warnings

Medium
Confidence
93% confidence
Finding
The skill instructs the agent to collect an API key from the user and persist it without any guidance about secure handling, redaction, retention, or storage protections. This creates a clear path for accidental credential exposure through chat logs, local files, or insecure environment management.

Missing User Warnings

Medium
Confidence
95% confidence
Finding
The code persists an API key to .env with no visible warning, consent flow, or indication of storage duration. This creates a security and privacy problem because users or operators may not realize a secret is being stored locally in plaintext, leading to accidental disclosure.

Ssd 3

High
Confidence
96% confidence
Finding
This creates a natural-language secret collection flow and then persists the credential locally, which is a strong anti-pattern for sensitive data. In skill context, this is more dangerous because the skill's benign 'news' framing lowers user suspicion while encouraging disclosure of reusable API credentials.

Ssd 3

Medium
Confidence
88% confidence
Finding
The instruction to directly display processed raw API response data can expose unintended fields returned by the upstream service, including internal metadata, identifiers, quota information, or other sensitive content not meant for end users. Because the model is told to use raw output as the presentation source, there is little opportunity for filtering or least-privilege disclosure.

Credential Access

High
Category
Privilege Escalation
Content
default_year: int = 2025

    def model_post_init(self, __context):
        # 强制从 .env 文件读取 XBY_APIKEY
        env_path = Path(".env")
        if env_path.exists():
            content = env_path.read_text(encoding="utf-8")
Confidence
92% confidence
Finding
The code forcefully reads .env directly and extracts XBY_APIKEY regardless of whether a safer configuration mechanism already exists. Manual credential parsing increases the risk of unauthorized secret access, bypasses normal secret-handling controls, and is especially concerning given the skill's declared news-only context.

Credential Access

High
Category
Privilege Escalation
Content
def model_post_init(self, __context):
        # 强制从 .env 文件读取 XBY_APIKEY
        env_path = Path(".env")
        if env_path.exists():
            content = env_path.read_text(encoding="utf-8")
            for line in content.splitlines():
Confidence
90% confidence
Finding
This line reads the entire .env file content, which may contain multiple unrelated secrets beyond the API key the skill claims to need. Bulk reading sensitive configuration broadens the blast radius if the code is repurposed, logged, mishandled, or later extended in unsafe ways.

Credential Access

High
Category
Privilege Escalation
Content
def save_api_key_to_env(api_key: str) -> bool:
    """将API key保存到.env文件"""
    try:
        env_path = Path(".env")
        lines = []
        if env_path.exists():
            lines = env_path.read_text(encoding="utf-8").splitlines()
Confidence
97% confidence
Finding
The function dedicated to saving an API key into .env indicates intentional credential persistence in plaintext local storage. This is dangerous because filesystem compromise, misconfigured permissions, backups, or accidental repository inclusion can expose the secret.

Credential Access

High
Category
Privilege Escalation
Content
def set_api_key(api_key: str) -> bool:
    """设置API key并持久化到.env"""
    if not api_key or not api_key.strip():
        return False
    api_key = api_key.strip()
Confidence
95% confidence
Finding
The setter function is explicitly designed to persist an API key to .env, normalizing insecure secret storage as part of application behavior. In the context of a real-time news skill, this capability is harder to justify and raises concern that the skill is collecting or retaining credentials beyond user expectations.

Unpinned Dependencies

Low
Category
Supply Chain
Content
requests>=2.31.0
pydantic>=2.7.0
pydantic-settings>=2.2.0
python-dotenv>=1.0.1
Confidence
90% confidence
Finding
The dependency is specified with a lower-bound range instead of an exact version, which makes builds non-reproducible and can unexpectedly introduce newly released vulnerable or breaking versions. While not an exploit by itself, this weakens supply-chain control and increases operational security risk over time.

Unpinned Dependencies

Low
Category
Supply Chain
Content
requests>=2.31.0
pydantic>=2.7.0
pydantic-settings>=2.2.0
python-dotenv>=1.0.1
Confidence
90% confidence
Finding
Using an unpinned version for pydantic allows future installs to resolve to different package versions, reducing reproducibility and making it easier for vulnerable releases to enter the environment unnoticed. This is a supply-chain hygiene issue rather than direct malicious behavior in the skill itself.

Unpinned Dependencies

Low
Category
Supply Chain
Content
requests>=2.31.0
pydantic>=2.7.0
pydantic-settings>=2.2.0
python-dotenv>=1.0.1
Confidence
90% confidence
Finding
An unpinned pydantic-settings dependency permits uncontrolled version drift across environments and over time. That increases the chance of inheriting security flaws or incompatible behavior without code changes.

Unpinned Dependencies

Low
Category
Supply Chain
Content
requests>=2.31.0
pydantic>=2.7.0
pydantic-settings>=2.2.0
python-dotenv>=1.0.1
Confidence
90% confidence
Finding
The python-dotenv dependency is not pinned, so installations may pull newer releases with different behavior or newly introduced issues. In a skill that likely processes configuration and environment data, uncontrolled dependency changes can have security and reliability consequences.

Known Vulnerable Dependency: requests==2.31.0 — 5 advisory(ies): 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); CVE-2026-25645 (Requests has Insecure Temp File Reuse in its extract_zipped_paths() utility func) +2 more

Medium
Category
Supply Chain
Confidence
97% confidence
Finding
The allowed version range includes requests 2.31.0, which has multiple published advisories including credential leakage and TLS/session verification issues. Because this skill appears to fetch real-time news over the network, a vulnerable HTTP client is directly relevant and could expose secrets or weaken transport security when handling attacker-influenced URLs or sessions.

Known Vulnerable Dependency: python-dotenv==1.0.1 — 1 advisory(ies): CVE-2026-28684 (python-dotenv: Symlink following in set_key allows arbitrary file overwrite via )

Low
Category
Supply Chain
Confidence
83% confidence
Finding
The allowed version range includes python-dotenv 1.0.1, which has an advisory related to symlink following in set_key that may enable arbitrary file overwrite in certain usage patterns. This is less directly dangerous unless the skill writes .env files or modifies configuration paths based on untrusted input, but it still represents avoidable risk.

Static analysis

No suspicious patterns detected.