Back to skill

Security audit

my-daily-news

Security checks for vulnerabilities and agentic risk

Overview

This is a straightforward daily headline-fetching skill, with some disclosure and dependency hygiene issues but no evidence of hidden, destructive, persistent, or credential-seeking behavior.

Install only in an environment where outbound access to Baidu and Google Trends is acceptable. Prefer pinning or locking the Python dependencies before use, and treat returned headlines as untrusted news text rather than instructions for the agent to follow.

Vulnerability Patterns
  • Skill Instruction HijackingAlters the agent's session goals or safety constraints when the skill loads
  • Insecure DependenciesIntroduces malicious components through unsafe dependency sources
  • 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
  • Embedded Malicious CodeShips malicious scripts inside the skill and executes them locally
Findings (2)

T08 · Insecure Dependencies

Warning
Location
requirements.txt:1
Finding

Unpinned Third-Party Dependencies Create a Supply-Chain Risk

Content
View full analysis

Vulnerability Details

File Location: requirements.txt:1-3; installation instruction at SKILL.md:27-32
Vulnerability Type: Unpinned and integrity-unverified dependencies
Risk Level: Medium

Vulnerable Code

requirements.txt:1-3:

text
beautifulsoup4
requests
feedparser

SKILL.md:27-32:

markdown
## Setup

Ensure you have the required Python packages installed:
```bash
pip install -r "{baseDir}/requirements.txt"
text

### Technical Analysis

All runtime dependencies are specified without exact versions or cryptographic hashes. Consequently, the documented installation command resolves whichever package versions are available from the configured package index at installation time.

Package installation can execute package-controlled build or installation logic. If a dependency account, release, distribution channel, or package index is compromised, installation behavior could change without any modification to this project. The lack of hashes also prevents pip from verifying that downloaded artifacts are the exact artifacts reviewed by the project maintainer.

No evidence shows that the currently named packages are malicious. The vulnerability is the absence of dependency locking and artifact integrity controls.

### Attack Path

1. An attacker compromises an upstream dependency, maintainer account, package release, or package index used by the environment.
2. The attacker publishes a malicious version under one of the dependency names listed in `requirements.txt`.
3. A user follows the setup instructions and runs `pip install -r requirements.txt`.
4. Because no versions or hashes are constrained, pip may retrieve the attacker-controlled release.
5. Malicious installation logic or imported runtime code executes with the privileges of the user or automation environment running the skill.

### Impact Assessment

Successful exploitation could permit arbitrary code execu
...[truncated 440 chars]
Remediation
View remediation

Remediation Suggestions

  • Pin every direct and transitive dependency to a reviewed version.
  • Generate a lock file containing cryptographic hashes, for example with pip-compile --generate-hashes.
  • Install dependencies using hash enforcement:
    bash
    pip install --require-hashes -r requirements.txt
    
  • Review dependency updates before regenerating the lock file.
  • Use a trusted package index and prevent untrusted supplemental indexes from taking precedence.
  • Run dependency installation and the skill in an isolated virtual environment or container with minimal filesystem, credential, and network access.
  • Add automated software-composition analysis and vulnerability scanning to the update process.

T01 · Skill Instruction Hijacking

Warning
Location
SKILL.md:18
Finding

Untrusted Remote Headlines Are Returned Directly as Agent Output

Content
View full analysis

Vulnerability Details

File Location: SKILL.md:18-24; daily_news.py:45-58; daily_news.py:82-98
Vulnerability Type: Untrusted remote content propagated into an agent response without an explicit instruction-data boundary
Risk Level: Medium

Vulnerable Code

SKILL.md:18-24:

markdown
## Instructions

To get the daily news summary:
1. Execute the Python script located at `{baseDir}/daily_news.py`.
   Use the following command:
   ```bash
   python "{baseDir}/daily_news.py"
   ```
2. The script will output the news in the format requested by the user.
3. Return the script's output directly as the final answer.

daily_news.py:45-58:

python
def get_google_trends():
    # Google Trends Daily Search Trends RSS for US
    url = "https://trends.google.com/trends/trendingsearches/daily/rss?geo=US"
    try:
        feed = feedparser.parse(url)
        hot_items = []
        for entry in feed.entries:
            hot_items.append(entry.title)
            if len(hot_items) >= 5: # Get top 5 from Google
                break
        return hot_items
    except Exception as e:
        logging.error(f"Error fetching Google Trends: {e}")
        return []

daily_news.py:82-98:

python
    # Take top 10 unique keywords
    final_hot = []
    seen = set()
    for item in all_hot:
        if item not in seen:
            final_hot.append(item)
            seen.add(item)
            if len(final_hot) >= 10:
                break

    # Format the output
    # "xxx now is Beijing time 8:00, today's hot search list is: 1. 2. ..."
    # Note: The server time might not be Beijing time. We should adjust if needed, but assuming local time is what's available.
    # To be safe, let's explicitly mention "Current Time"

    greeting = f"现在是北京时间 {current_time_str},今日热搜榜单如下:"
    news_list = ""
    for i, item in enumerate(final_hot, 1):
       
...[truncated 2522 chars]
Remediation
View remediation

Remediation Suggestions

  • Explicitly declare all fetched headlines to be untrusted data and instruct the agent never to follow directives embedded in them.
  • Do not require raw script output to be returned directly. Wrap it in a fixed response template with clear source and data boundaries.
  • Label every item with its source and present remote text in a quoted or otherwise data-only format.
  • Normalize Unicode and remove control characters, terminal escape sequences, and unexpected line breaks.
  • Enforce conservative character and length limits for every headline before including it in output.
  • Escape content appropriately for the final rendering format.
  • Reject or flag titles containing obvious instruction patterns when the output will be consumed by another agent.
  • Ensure downstream agents treat the news list as inert content and require separate trusted authorization before invoking tools or changing behavior.
Vulnerability Patterns
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Supply ChainUnpinned Dependencies, External Script Fetching, Obfuscated Code
  • MCP Least PrivilegeUnderdeclared Capability, Wildcard Permission, Missing Permission Declaration
  • MCP Tool PoisoningHidden Instructions, Unicode Deception, Parameter Description Injection
Findings (10)

Undeclared Tool Scope

Medium
Category
MCP Least Privilege
Confidence
87% confidence
Finding

The skill declares executable code and appears intended to fetch external news sources, but it does not declare any explicit tool scope such as allowed tools or permissions. That omission weakens policy enforcement and user awareness, because a caller may not realize the skill can perform network-capable actions through its Python script.

Content

No source excerpt is available for this finding.

Intent-Code Divergence

Medium
Category
Not specified by scanner
Confidence
98% confidence
Finding

The comments acknowledge that the server time might not be Beijing time, yet the code still formats the timestamp as '现在是北京时间 ...'. This is an active contradiction between the stated output intent and the actual implementation, which can mislead users about the time context of the news report.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The returned greeting is hard-coded in Chinese and explicitly states "北京时间", which imposes a language and locale choice on all users. The file does not offer opt-in, localization, or any documented reason that this skill must always respond in Chinese/Beijing locale.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
72% confidence
Finding

The manifest-like header sets PYTHONIOENCODING=utf-8, and the skill prominently includes Baidu as a source, suggesting a locale/output assumption without any user-facing language or locale choice. Under this rule, forcing a specific language or locale without opt-in can be a policy concern.

Content

No source excerpt is available for this finding.

Missing User Warnings

Low
Category
Not specified by scanner
Confidence
93% confidence
Finding

The instructions tell the agent to run a Python script and return its output directly, but they do not disclose that the script may contact external services to retrieve news. This can surprise users, bypass informed consent, and expose the environment to unreviewed outbound requests or data handling behavior hidden inside the script.

Content

No source excerpt is available for this finding.

Unpinned Dependencies

Low
Category
Supply Chain
Confidence
98% confidence
Finding

The dependency specification for beautifulsoup4 is unpinned, allowing installs to resolve to different versions over time. This creates supply-chain and reproducibility risk because a future vulnerable or malicious release could be pulled without review, even though the package itself is common and not inherently suspicious in this context.

Content

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

text
beautifulsoup4
requests
feedparser

Unpinned Dependencies

Low
Category
Supply Chain
Confidence
99% confidence
Finding

The requests dependency is unpinned, so the environment may install any available version, including versions affected by known advisories or future compromised releases. Because this skill fetches external news content over the network, requests is security-relevant and version drift could expose the skill to transport, credential-handling, or request-processing flaws.

Content

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

text
beautifulsoup4
requests
feedparser

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

Requests has multiple known advisories, and because no version is pinned, it is impossible to determine whether the installed release will be affected. In a network-facing skill that retrieves external content, this uncertainty is dangerous because vulnerable versions may mishandle redirects, TLS verification state, credential sourcing, or other security-sensitive behaviors.

Content

No source excerpt is available for this finding.

Unpinned Dependencies

Low
Category
Supply Chain
Confidence
99% confidence
Finding

The feedparser dependency is unpinned, meaning installs are not reproducible and may resolve to versions with known parser-related vulnerabilities. Since this skill ingests untrusted remote feeds, parser security matters more than in a purely local tool; a vulnerable version could increase exposure to malicious feed content.

Content

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

text
beautifulsoup4
requests
feedparser

Unverifiable Dependency: feedparser has 10 known advisory(ies) (CVE-2011-1157 (feedparser Cross-site Scripting vulnerability); CVE-2009-5065 (feedparser Cross-site Scripting vulnerability); CVE-2011-1158 (feedparser Cross-site Scripting vulnerability) +7 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

Feedparser has a history of advisories, and without version pinning there is no way to verify whether the deployed version includes fixes. This is especially relevant here because the skill consumes untrusted syndicated content; parser flaws can be triggered by attacker-controlled feed data and may lead to downstream compromise depending on how parsed output is used.

Content

No source excerpt is available for this finding.

Static analysis

No suspicious patterns detected.