Back to skill

Security audit

Digest Builder

Security checks for vulnerabilities and agentic risk

Overview

The skill does what it claims, but its network handling can expose FreshRSS credentials over insecure HTTP and can fetch feed-controlled URLs from the user's network context.

Review before installing. Use only an HTTPS FreshRSS base URL, avoid running it against untrusted feeds unless outbound network access is sandboxed, and remember that raw FreshRSS content and summaries are written to local digest files. Do not use the mark-read script unless you intentionally want to change FreshRSS read state for the selected items.

Vulnerability Patterns
  • 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
  • Embedded Malicious CodeShips malicious scripts inside the skill and executes them locally
Findings (3)

T09 · Insecure Skill Coding Practices

Error
Location
scripts/build_digest.py:491
Finding

Feed-Controlled Server-Side Request Forgery in Automatic Article Retrieval

Content
View full analysis
tuple[str, str, str]: request = urllib.request.Request( url, headers={ "User-Agent": ( "Mozilla/5.0 (Windows NT 10.0; Win64; x64) " "AppleWebKit/537.36 (KHTML, like Gecko) Chrome/123.0 Safari/537.36" ) }, ) with urllib.request.urlopen(request, timeout=timeout) as response: content_type = response.headers.get("Content-Type", "") if "text/html" not in content_type and "application/xhtml+xml" not in content_type: raise ValueError(f"Unsupported content type: {content_type}") payload = response.read(1_500_000).decode("utf-8", errors="replace") return payload, response.geturl(), content_type ``` The untrusted URL is passed into this function without destination validation: ```python html_text, final_url, _ = fetch_url(candidate.raw_url, timeout=timeout) ``` Article retrieval is performed automatically during normal digest construction: ```python url_deduped, url_removed = dedupe_exact_urls(raw_items) fetch_bodies(url_deduped, timeout=args.timeout, concurrency=args.concurrency) ``` ### Technical Analysis The article URL originates from the FreshRSS item's `canonical` or `alternate` field. A subscribed feed, compromised feed publisher, or malicious FreshRSS entry can therefore influence the destination requested by the digest host. The implementation does not validate: - The URL scheme. - The destination hostname. - The resolved IP address. - The destination port. - Whether the address is loopback, private, link-local, reserved, or otherwise non-public. - Redirect destinations followed automatically by `urllib.request.urlopen`. Checking the response con ...[truncated 1548 chars]
Remediation
View remediation

T09 · Insecure Skill Coding Practices

Error
Location
scripts/fetch_freshrss_unread.py:67
Finding

FreshRSS API Password and Authentication Token Can Be Sent over Plaintext HTTP

Content
View full analysis
str: login_url = f"{normalize_base_url(base_url)}/api/greader.php/accounts/ClientLogin" payload = urllib.parse.urlencode({"Email": username, "Passwd": api_password}).encode("utf-8") request = urllib.request.Request(login_url, data=payload, method="POST") try: with urllib.request.urlopen(request, timeout=30) as response: content = response.read().decode("utf-8", errors="replace") ``` The resulting authentication token is then sent to the same unvalidated base URL: ```python stream_url = ( f"{normalize_base_url(base_url)}/api/greader.php/reader/api/0/stream/contents/" f"reading-list?{query}" ) request = urllib.request.Request( stream_url, headers={"Authorization": f"GoogleLogin auth={auth_token}"}, method="GET", ) try: with urllib.request.urlopen(request, timeout=30) as response: return json.loads(response.read().decode("utf-8")) ``` ### Technical Analysis `base_url` is loaded from a configuration file or the `FRESHRSS_BASE_URL` environment variable. The implementation does not enforce HTTPS before placing the username and API password in a POST body. If `base_url` uses `http://`, the API password is sent without transport encryption. The returned Google Reader authentication token is subsequently placed in the `Authorization` header of another plaintext request. Using an API-specific password rather than the interactive login password reduces credential reuse risk, but it does not make plaintext transmission safe. ### Attack Path 1. FreshRSS is configured with an `http://` base URL, whether through user error, legacy deployment, or malicious configuration modification. 2. The fetch script cons ...[truncated 917 chars]
Remediation
View remediation

T09 · Insecure Skill Coding Practices

Error
Location
scripts/mark_freshrss_read.py:36
Finding

FreshRSS Read-State Writer Allows Plaintext Credential and Token Transmission

Content
View full analysis
str: login_url = f"{normalize_base_url(base_url)}/api/greader.php/accounts/ClientLogin" payload = urllib.parse.urlencode({"Email": username, "Passwd": api_password}).encode("utf-8") request = urllib.request.Request(login_url, data=payload, method="POST") try: with urllib.request.urlopen(request, timeout=30) as response: content = response.read().decode("utf-8", errors="replace") ``` The authentication token is then used in a write request to the unvalidated base URL: ```python def mark_read_batch(base_url: str, auth_token: str, item_ids: list[str], timeout: int, retries: int) -> None: pairs: list[tuple[str, str]] = [("a", "user/-/state/com.google/read"), ("async", "true")] for item_id in item_ids: pairs.append(("i", item_id)) payload = urllib.parse.urlencode(pairs).encode("utf-8") url = f"{normalize_base_url(base_url)}/api/greader.php/reader/api/0/edit-tag" last_error: Exception | None = None for attempt in range(1, retries + 1): request = urllib.request.Request( url, data=payload, headers={ "Authorization": f"GoogleLogin auth={auth_token}", "Content-Type": "application/x-www-form-urlencoded", }, method="POST", ) try: with urllib.request.urlopen(request, timeout=timeout) as response: body = response.read().decode("utf-8", errors="replace").strip() ``` ### Technical Analysis The script reads `FRESHRSS_BASE_URL` from the environment but does not require HTTPS. Consequently, both the login password and the authentication token used for the state-changing `edit-tag` ...[truncated 1342 chars]
Remediation
View remediation
Vulnerability Patterns
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Taint TrackingDirect Taint Flow, Variable-Mediated Taint Flow, Credential Exfiltration Chain
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
  • Supply ChainUnpinned Dependencies, External Script Fetching, Obfuscated Code
Findings (10)

Tainted flow: 'request' from os.getenv (line 97, credential/environment) → urllib.request.urlopen (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/mark_freshrss_read.py (reported line 41)May include surrounding context.

python
payload = urllib.parse.urlencode({"Email": username, "Passwd": api_password}).encode("utf-8")
    request = urllib.request.Request(login_url, data=payload, method="POST")
    try:
        with urllib.request.urlopen(request, timeout=30) as response:
            content = response.read().decode("utf-8", errors="replace")
    except urllib.error.HTTPError as exc:
        body = exc.read().decode("utf-8", errors="replace")

Tainted flow: 'request' from os.getenv (line 97, credential/environment) → urllib.request.urlopen (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/mark_freshrss_read.py (reported line 107)May include surrounding context.

python
method="POST",
        )
        try:
            with urllib.request.urlopen(request, timeout=timeout) as response:
                body = response.read().decode("utf-8", errors="replace").strip()
            if body != "OK":
                raise SystemExit(f"FreshRSS mark read failed: unexpected response {body!r}")

Hidden Instructions

High
Category
Prompt Injection
Confidence
60% confidence
Finding

Hidden instructions were detected in comments or invisible text. These could contain malicious directives. Manual review is recommended.

Content

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

md
# Digest Spec

## 建议字段

Hidden Instructions

High
Category
Prompt Injection
Confidence
60% confidence
Finding

Hidden instructions were detected in comments or invisible text. These could contain malicious directives. Manual review is recommended.

Content

Scanner excerpt · references/digest-spec.md (reported line 1)May include surrounding context.

md
# Digest Spec

## 建议字段

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The skill explicitly instructs the agent to read FreshRSS credentials, perform network requests to a FreshRSS API, and write raw and processed outputs to local files, but it does not warn the user that unread feed content, authentication material, and derived summaries may be transmitted, stored, or exposed in artifacts. This creates a privacy and data-handling risk because users may not realize the skill will access account-scoped data and persist potentially sensitive content.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
98% confidence
Finding

The instruction to always work in Simplified Chinese removes user choice and can cause misunderstanding of summaries, labels, or sorting rationale if the user expects another language. In a summarization and review workflow, forced language output can degrade user comprehension and review accuracy, especially for security- or decision-relevant content.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

Lines L56-L57 require summaries to be written in concise Chinese and state that even English articles must produce Chinese summaries. This is a natural-language locale policy constraint with no indication of user opt-in or documented region-specific justification.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
94% confidence
Finding

This code generates user-facing markdown text entirely in Chinese, including the title and status message, without offering any language choice. That can violate language/locale policy expectations when the skill is not explicitly documented as Chinese-only or region-specific.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
83% confidence
Finding

This skill documentation presents all operational guidance in Chinese, including headings, requirements, and output guidance, without stating that the language is optional or user-selectable. Under the policy for natural-language issues, forcing a specific language without user opt-in can be a locale-policy violation.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
92% confidence
Finding

The CLI sets --timezone to Asia/Shanghai by default, which imposes a specific locale/timezone behavior unless the user explicitly overrides it. This is a natural-language policy concern because the script forces a locale-specific default rather than prompting for or documenting user choice as the norm.

Content

No source excerpt is available for this finding.