Back to skill

Security audit

newspaper-download-skill

Security checks for vulnerabilities and agentic risk

Overview

This skill has a clear newspaper-download purpose, but it exposes a configured import token in returned download links and uses insecure TLS behavior.

Install only if you are comfortable with your pick-read.vip import token appearing inside links shown in agent output, logs, and possibly local result files. Treat generated download URLs as secrets, avoid sharing them, use --no-save, and prefer a version that redacts tokens and uses normal verified HTTPS.

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

T09 · Insecure Skill Coding Practices

Error
Location
scripts/get_data.py:73
Finding

TLS Certificate and Hostname Verification Are Disabled

Content
View full analysis
List[ssl.SSLContext]: """构建多个 SSL 上下文,按宽松度递增排列,用于自动 fallback.""" ctxs: List[ssl.SSLContext] = [] # 策略 1: 默认上下文 + 关闭证书校验 try: c1 = ssl.create_default_context() c1.check_hostname = False c1.verify_mode = ssl.CERT_NONE ctxs.append(c1) except Exception: pass # 策略 2: 完全不验证的上下文(兼容旧 OpenSSL) try: c2 = ssl._create_unverified_context() # noqa: SLF001 ctxs.append(c2) except Exception: pass ``` These insecure contexts are subsequently used for API requests in `scripts/get_data.py`, lines 128–139: ```python for ctx in _SSL_CONTEXTS: opener = urllib_request.build_opener( urllib_request.ProxyHandler({}), urllib_request.HTTPSHandler(context=ctx), ) for attempt in range(_MAX_RETRIES): try: with opener.open(req, timeout=TIMEOUT_SECONDS) as resp: raw = resp.read().decode("utf-8", errors="replace") ``` ### Technical Analysis Both SSL contexts accepted by the HTTP layer explicitly disable certificate validation. The first context turns off hostname matching and assigns `ssl.CERT_NONE`; the second uses Python's private unverified-context function. Consequently, the client does not establish that it is communicating with the legitimate API server. Despite being described as fallback strategies, no verified TLS context is attempted. An invalid, self-signed, expired, or attacker-controlled certificate is accepted immediately. Disabling the system proxy does not provide server authentication and can also bypass security controls expected in managed environments. The affected requests retrieve manifests, issue resolution results, and issue information. These responses are trusted as JSON and incorpora ...[truncated 1361 chars]
Remediation
View remediation

T09 · Insecure Skill Coding Practices

Warning
Location
scripts/get_data.py:324
Finding

Import Tokens Are Exposed Through Query Strings, Process Arguments, Output, and Plaintext Files

Content
View full analysis
Remediation
View remediation
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
  • Excessive AgencyUnrestricted Tool Access, Autonomous Decision Making, Scope Creep
  • MCP Least PrivilegeUnderdeclared Capability, Wildcard Permission, Missing Permission Declaration
Findings (15)

Credential Access

High
Category
Privilege Escalation
Confidence
60% confidence
Finding

Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.

Content

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

text
__pycache__/
*.pyc
*.pyo
.env

Ssd 3

High
Category
Not specified by scanner
Confidence
99% confidence
Finding

The skill explicitly instructs the agent to read a local secret from config.json and then use it in a way that leads to disclosure through output links. This crosses a strong security boundary: local credentials intended for authenticated API use are being turned into user-visible artifacts, enabling secret exfiltration through normal task execution.

Content

No source excerpt is available for this finding.

Ssd 3

High
Category
Not specified by scanner
Confidence
99% confidence
Finding

The workflow repeatedly normalizes disclosure of direct download links containing the import token, making token leakage systematic rather than incidental. In this skill context, the token is specifically required for authenticated downloads, so exposing it to the user, chat logs, downstream tools, or telemetry can allow unauthorized reuse and broader access to protected resources.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
90% confidence
Finding

The skill documentation is written entirely in Chinese, including setup steps and recommended prompts, with no indication that users may choose another language or that the skill is intentionally limited to Chinese-speaking users. This can violate language/locale policy when a skill effectively requires a specific language without user opt-in.

Content

No source excerpt is available for this finding.

Undeclared Tool Scope

Medium
Category
MCP Least Privilege
Confidence
85% confidence
Finding

The skill invokes a Python CLI that can read local configuration, perform network access, and potentially write files, but the manifest does not declare any explicit tool scope or permissions boundary. That creates an under-specified trust model: reviewers and agents cannot clearly constrain what the skill is allowed to access, increasing the risk of unintended file, environment, or network exposure.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
98% confidence
Finding

The instructions tell the agent to return download URLs that embed the import token directly in the query string, without any warning about secrecy or replay risk. Anyone who receives, logs, previews, or intercepts that URL may be able to reuse the token to access additional protected downloads, turning a convenience feature into credential disclosure.

Content

No source excerpt is available for this finding.

Context-Inappropriate Capability

Medium
Category
Not specified by scanner
Confidence
90% confidence
Finding

The module reads IMPORT_TOKEN from environment variables and config.json, expanding credential access beyond an explicit per-command user parameter. In a shared agent/runtime environment, this can silently consume broader-scoped secrets and then expose them in output or files, increasing the blast radius of accidental disclosure.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
97% confidence
Finding

The code constructs download URLs embedding the import token as a query parameter, and those URLs are later returned and can be saved to disk. Query-string secrets are prone to leakage via logs, saved files, shell history, screenshots, and downstream tooling, so this directly risks credential disclosure and unauthorized PDF access.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
98% confidence
Finding

The batch mode amplifies the same issue by generating and potentially persisting multiple tokenized download links in a single artifact. This increases exposure surface and makes secret compromise more severe because one saved file can grant broad access to many issue downloads.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The skill claims query/link-retrieval behavior, but by default it writes returned data to local files. Those results can include publication metadata and, for authenticated flows, token-bearing download URLs, creating unintended local persistence of sensitive artifacts without explicit opt-in.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
81% confidence
Finding

The operational instructions are predominantly written in Chinese and include user interaction examples in Chinese, while the skill does not state that language selection is optional or user-driven. Under the language/locale policy criterion, this can be a natural-language policy issue because it implicitly fixes the operating language without explicit opt-in or documented justification.

Content

No source excerpt is available for this finding.

Intent-Code Divergence

Low
Category
Not specified by scanner
Confidence
97% confidence
Finding

The inline comment says this is a configuration file for 'newspaper-ocr skill', while the manifest describes a 'newspaper_download' tool for querying issues and obtaining PDF download links. This is a direct documentation-to-intent mismatch that can mislead users or operators about which skill the configuration belongs to.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
95% confidence
Finding

The natural-language comment is written only in Chinese and instructs the user about how to use the configuration file, which implicitly imposes a language requirement. The file does not offer any language choice or document a justified locale-specific constraint, so this is a natural-language policy concern.

Content

No source excerpt is available for this finding.

Intent-Code Divergence

Low
Category
Not specified by scanner
Confidence
88% confidence
Finding

The top-level documentation frames the module as a minimal contract with exactly three core capabilities centered on query and download-link retrieval. In practice, the code also exposes a separate resolve CLI command and performs default result persistence to disk, so the documentation understates the module's actual behavior.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
79% confidence
Finding

Natural-language text in the module docstring and user-facing help/messages is predominantly Chinese, which effectively forces a locale for users of the skill. The file does not offer language selection or explain a justified region-specific constraint, so this appears to violate the language/locale policy for natural-language content.

Content

No source excerpt is available for this finding.