Back to skill

Security audit

follow-nowcoder

Security checks for vulnerabilities and agentic risk

Overview

The skill fits its Nowcoder interview-report purpose, but it uses insecure HTTPS settings and unsafe prompt/file handling that users should review before installing.

Install only if you accept that the skill will contact Nowcoder, store configuration/prompts locally, and write scraped report data into .claude/temp. The publisher should remove verify=False and TLS weakening, validate prompt names, and add prompt-injection boundaries before this is treated as low risk.

Vulnerability Patterns
  • Skill Instruction HijackingAlters the agent's session goals or safety constraints when the skill loads
  • Unauthorized Access and Privilege EscalationObtains permissions beyond the task's legitimate needs
  • Insecure Skill Coding PracticesFinds exploitable flaws such as hardcoded secrets or command injection
  • 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)

T01 · Skill Instruction Hijacking

Error
Location
src/analyzer.py:90
Finding

Indirect prompt injection through untrusted Nowcoder post content

Content
View full analysis
5000: content = content[:5000] + "\n...[内容已截断]" lines.append(f"\n**正文内容**:\n{content}") ``` ### Technical Analysis Nowcoder users control the post bodies returned by the remote service. The application retrieves those bodies and interpolates them directly into the same prompt that instructs the Agent to generate a report. No trust-boundary control distinguishes post data from Agent instructions. In particular, the implementation does not: - Enclose remote content in a format that the model must treat only as quoted data. - Tell the model to ignore instructions contained inside posts. - Detect or neutralize instruction-like content. - Use a separate, tool-restricted summarization context. - Require structured output that prevents remote content from redefining the task. The HTML-to-text conversion in `src/search.py` only removes markup. It does not neutralize natural-language instructions such as “ignore the report requirements,” “reveal prior messages,” or “include this attacker-controlled link.” The Skill workflow compounds this issue by directing the Agent to read the generated `prompt` field and use it to produce the report. Consequently, text c ...[truncated 1494 chars]
Remediation
View remediation

T09 · Insecure Skill Coding Practices

Error
Location
src/search.py:16
Finding

TLS certificate and hostname verification disabled for Nowcoder requests

Content
View full analysis
Remediation
View remediation

T05 · Unauthorized Access and Privilege Escalation

Error
Location
src/utils.py:68
Finding

Path traversal in prompt management permits arbitrary Markdown file access

Content
View full analysis
str: """加载提示词模板 优先从用户目录加载,如果不存在则使用默认模板。 Args: prompt_name: 提示词名称(不含扩展名),如 'report_summary' Returns: 提示词内容 """ # 检查用户自定义提示词 user_prompt_path = USER_PROMPTS_DIR / f"{prompt_name}.md" if user_prompt_path.exists(): with open(user_prompt_path, "r", encoding="utf-8") as f: return f.read() # 使用默认提示词 default_prompt_path = DEFAULT_PROMPTS_DIR / f"{prompt_name}.md" if default_prompt_path.exists(): with open(default_prompt_path, "r", encoding="utf-8") as f: return f.read() ``` The write operation has the same flaw: ```python def save_prompt(prompt_name: str, content: str) -> None: """保存自定义提示词到用户目录 Args: prompt_name: 提示词名称(不含扩展名) content: 提示词内容 """ # 确保目录存在 USER_PROMPTS_DIR.mkdir(parents=True, exist_ok=True) # 保存提示词 prompt_path = USER_PROMPTS_DIR / f"{prompt_name}.md" with open(prompt_path, "w", encoding="utf-8") as f: f.write(content) ``` The delete operation is also affected: ```python def reset_prompt(prompt_name: str) -> bool: """重置提示词为默认版本 Args: prompt_name: 提示词名称 Returns: 是否成功重置 """ user_prompt_path = USER_PROMPTS_DIR / f"{prompt_name}.md" if user_prompt_path.exists(): user_prompt_path.unlink() return True return False ``` The CLI passes user-supplied names directly to these functions: ```python name = args.args[0] content = load_prompt(name) ``` ```python name = args.args[0] save_prompt(name, content) ``` ```py ...[truncated 2521 chars]
Remediation
View remediation
Path: if name not in ALLOWED_PROMPTS: raise ValueError("Unsupported prompt name") resolved_base = base.resolve() candidate = (resolved_base / f"{name}.md").resolve() if candidate.parent != resolved_base: raise ValueError("Prompt path escapes the prompt directory") return candidate ``` ]]>
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
  • Excessive AgencyUnrestricted Tool Access, Autonomous Decision Making, Scope Creep
  • Tool MisuseTool Parameter Abuse, Chaining Abuse, Unsafe Defaults
Findings (30)

Tp4

High
Category
MCP Tool Poisoning
Confidence
95% confidence
Finding

The documented purpose is a narrow interview-experience report generator, but the behavior described by the finding includes broader scraping capabilities and undisclosed security downgrades such as disabling HTTPS certificate verification and lowering SSL security level. Security-sensitive implementation details that weaken transport integrity are especially dangerous because they enable man-in-the-middle tampering of fetched content and expand the skill beyond the user's expected trust boundary.

Content

No source excerpt is available for this finding.

Agent Config Directory Access

High
Category
Agent Snooping
Confidence
98% confidence
Finding

Writing into the agent-associated .claude/temp directory creates cross-tool and cross-session risk because data is placed in a location likely accessible to the agent ecosystem rather than isolated application storage. In the skill context, this is more dangerous because scraped report content and generated prompts may influence or be read by other agent components, enabling unintended data exposure or indirect prompt/context poisoning.

Content

Scanner excerpt · src/cli.py (reported line 304)May include surrounding context.

python
# 保存到临时文件(.claude/temp 目录)
        from pathlib import Path
        temp_dir = Path(".claude/temp")
        temp_dir.mkdir(parents=True, exist_ok=True)
        output_file = temp_dir / "report_data.json"

Context-Inappropriate Capability

High
Category
Not specified by scanner
Confidence
99% confidence
Finding

The code globally weakens TLS by clearing OpenSSL configuration, lowering cipher security level, disabling hostname checks, and disabling certificate validation for HTTPS sessions. This enables man-in-the-middle interception or tampering of responses from nowcoder endpoints, which can poison search results or inject attacker-controlled content into downstream report generation.

Content

No source excerpt is available for this finding.

Missing User Warnings

High
Category
Not specified by scanner
Confidence
99% confidence
Finding

The search API request explicitly passes verify=False, disabling HTTPS certificate validation with no user notice or approval. In this skill's context, that makes externally sourced interview content untrustworthy and susceptible to interception, manipulation, or replay by a network attacker.

Content

No source excerpt is available for this finding.

Missing User Warnings

High
Category
Not specified by scanner
Confidence
99% confidence
Finding

The page fetch for feed details also uses verify=False, so fetched HTML can be modified by an attacker in transit. Because this function extracts titles and content from returned HTML, a MITM attacker could inject fabricated or malicious text into generated interview reports or any downstream consumer of the content.

Content

No source excerpt is available for this finding.

Undeclared Tool Scope

Medium
Category
MCP Least Privilege
Confidence
88% confidence
Finding

The skill instructs the agent to run local Python commands, read and write files under .claude/temp, inspect environment/dependencies, and perform network-backed content retrieval, but it declares no explicit tool scope or permissions boundaries. This creates an over-privileged skill surface where an orchestrator may allow broader filesystem, environment, and network access than users expect, increasing the blast radius if the skill is modified or misused.

Content

No source excerpt is available for this finding.

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
96% confidence
Finding

L003 写明“在用户请求查看面经、准备面试、搜索面试经验时使用”,其中“准备面试”范围非常宽,可能覆盖大量并非要调用该技能的普通对话场景。该描述也没有给出明确边界、限定条件或反例,难以判断何时应激活、何时不应激活。

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
92% confidence
Finding

The onboarding flow instructs the agent to immediately perform external retrieval and fetch post details without first obtaining explicit informed consent about accessing a third-party site and processing remote content. This is dangerous because it can surprise users, trigger unintended external requests, and ingest untrusted remote data automatically during initial setup.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
94% confidence
Finding

The config hard-codes the language setting to "zh", which creates a language/locale constraint visible in the skill configuration. Under the policy, forcing a specific language without offering user choice or documenting a justified regional limitation is a natural-language policy violation.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
93% confidence
Finding

The file title and core instructions are written entirely in Chinese and direct the model to act as a Chinese-language interview-report assistant. This is a natural-language locale constraint, and the prompt does not offer an opt-in choice or explain that the skill is intentionally region-specific.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
91% confidence
Finding

This code automatically retrieves post details when fetch_details is enabled, which can pull full正文内容 from external posts, but there is no confirmation prompt, logging, or warning comment/docstring disclosing that additional remote content will be fetched. Because this is a code file and the operation involves network access and data retrieval beyond the initial search results, the lack of disclosure matches the missing-warning criterion.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
96% confidence
Finding

The natural-language instruction for unsupported language values defaults to Chinese (请使用中文生成报告), which imposes a specific language choice rather than preserving user choice or asking for clarification. The policy allows locale constraints only when users are given a choice or the restriction is clearly justified, which is not evident here.

Content

No source excerpt is available for this finding.

Intent-Code Divergence

Medium
Category
Not specified by scanner
Confidence
81% confidence
Finding

The top-level docstring says the CLI encapsulates command-line operations and provides a safe interface for agent use. However, the module includes commands that modify persistent config and prompt files and write report data to disk, which is broader than a plainly 'safe' read-oriented interface and contradicts the safety framing in the documentation.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

Medium
Category
Not specified by scanner
Confidence
92% confidence
Finding

The CLI exposes broad mutable configuration and prompt-management commands that go beyond the skill's stated purpose of searching NowCoder interview posts and generating reports. In an agent setting, these commands expand the attack surface by allowing persistent behavior changes and prompt tampering, which can alter future executions in ways the user did not request.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

Medium
Category
Not specified by scanner
Confidence
94% confidence
Finding

The report flow persists collected report data to a local file even though the declared skill behavior is search/report generation, not local storage. In an agent environment, undisclosed disk writes create a data persistence channel that can retain scraped content, expose it to other tools or sessions, and violate least surprise and least privilege.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
91% confidence
Finding

The code writes collected report data to disk without explicit user-facing disclosure at the time of the operation. This is dangerous because users and calling agents may assume transient processing, while the implementation creates a persistent artifact containing scraped content that may be retained, discovered, or reused unexpectedly.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
84% confidence
Finding

The module docstring and all user-facing text are written only in Chinese, and there is no indication that language choice is configurable or that the skill is intentionally restricted to a Chinese-speaking context. Under the stated policy, fixed locale behavior without user opt-in can be a natural-language policy issue.

Content

No source excerpt is available for this finding.

Intent-Code Divergence

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The comment says certificate-warning suppression is 'only for debugging', but the code disables urllib3 insecure-request warnings unconditionally. This hides operational evidence that TLS verification has been turned off, making insecure transport easier to miss in production and reducing the chance that users or developers detect active risk.

Content

No source excerpt is available for this finding.

Unsafe Defaults

Medium
Category
Tool Misuse
Confidence
98% confidence
Finding

Using verify=False makes insecure transport the default for search requests. This is especially risky because the skill's core function is to retrieve untrusted remote content for summarization, so disabling transport authenticity directly undermines the integrity of all returned results.

Content

Scanner excerpt · src/search.py (reported line 203)May include surrounding context.

python
}

    response = session.post(
        NOWCODER_API_URL, json=payload, headers=headers, timeout=REQUEST_TIMEOUT, verify=False
    )
    response.raise_for_status()
    return response.json()

Unsafe Defaults

Medium
Category
Tool Misuse
Confidence
98% confidence
Finding

The detail-page fetch also defaults to insecure TLS verification behavior. An attacker able to intercept traffic could alter fetched page content and influence the skill's output, making this unsafe default materially dangerous in the context of content retrieval and report generation.

Content

Scanner excerpt · src/search.py (reported line 318)May include surrounding context.

python
url = f"{NOWCODER_DETAIL_URL}/{uuid}"

    response = session.get(url, headers=headers, timeout=REQUEST_TIMEOUT, verify=False)
    response.raise_for_status()
    html = response.text

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
85% confidence
Finding

The module docstrings and user-facing strings are written only in Chinese, which indicates a fixed language choice without any visible option for users to select another language. Under the policy, forcing a specific language without opt-in can be a locale/language policy violation unless the constraint is clearly documented and justified.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

Medium
Category
Not specified by scanner
Confidence
91% confidence
Finding

The manifest describes a search-and-report skill for 牛客面经, which implies fetching and structuring interview experience content. In this file, the skill persists user configuration under the home directory, which is a broader stateful behavior not reflected in the manifest description.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

Medium
Category
Not specified by scanner
Confidence
93% confidence
Finding

The manifest frames the skill as searching interview-experience posts and generating structured reports. These functions add editable prompt-template storage and deletion in the user's home directory, a customization capability that goes beyond the plainly stated purpose.

Content

No source excerpt is available for this finding.

Unpinned Dependencies

Low
Category
Supply Chain
Confidence
97% confidence
Finding

The dependency is specified with a lower bound only (requests>=2.31.0), which allows future unreviewed versions to be installed and prevents reproducible builds. This increases supply-chain risk and makes it harder to determine whether deployed environments are affected by known vulnerabilities.

Content

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

text
requests>=2.31.0
pydantic>=2.0.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
91% confidence
Finding

requests has multiple published advisories, and because the manifest does not pin an exact version, it is not possible to verify whether the installed release is patched. In a skill that likely performs web requests to search interview-experience content, a vulnerable HTTP client could increase exposure to URL-handling or credential-leak issues depending on usage.

Content

No source excerpt is available for this finding.