Back to skill

Security audit

Scholar Paper Finder

Security checks for vulnerabilities and agentic risk

Overview

This skill is a disclosed Google Scholar literature-search and paper-ranking helper, with one report-formatting safety caveat but no evidence of hidden, destructive, or deceptive behavior.

Install only if you want a skill that can query Google Scholar through an MCP server and process candidate-paper files locally. Review generated Markdown reports with raw HTML disabled or in a sanitized viewer, especially when candidate metadata comes from external or untrusted sources.

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

T09 · Insecure Skill Coding Practices

Warning
Location
scripts/score_papers.py:284
Finding

Untrusted Paper Metadata Is Emitted Without Safe Markdown or HTML Escaping

Content
View full analysis

Vulnerability Details

File Location: scripts/score_papers.py:284-318
Vulnerability Type: Improper neutralization of externally controlled content in generated Markdown
Risk Level: Medium

Vulnerable Code

python
def markdown_link(value):
    value = str(value or "").strip()
    if not value:
        return ""
    label = "PDF" if ".pdf" in value.lower() else "Link"
    if value.startswith("http"):
        return f"[{label}]({value})"
    return value


def write_markdown(rows, path):
    headers = ["Tier", "Source", "Title", "Authors", "Year", "Venue", "IF", "Rank/Tags", "Citations", "Access", "Why keep"]
    lines = [
        "| " + " | ".join(headers) + " |",
        "|---|---|---|---:|---:|---|---:|---|---:|---|---|",
    ]
    rows = sorted(rows, key=ranking_key)
    for row in rows:
        values = [
            row.get("tier", ""),
            row.get("source", ""),
            row.get("title", ""),
            row.get("authors", ""),
            row.get("year", ""),
            row.get("venue", ""),
            row.get("impact_factor", ""),
            row.get("rank_tags", ""),
            row.get("citations", ""),
            markdown_link(row.get("access_link", "")),
            row.get("why_keep", ""),
        ]
        clean = [str(v).replace("\n", " ").replace("|", "\\|") for v in values]
        lines.append("| " + " | ".join(clean) + " |")

Technical Analysis

Candidate records are loaded from user-supplied JSON or CSV files and may also originate from externally retrieved Google Scholar or MCP metadata. Fields such as titles, authors, venues, reasons, and access links are therefore not inherently trusted.

The Markdown generator only removes newline characters and escapes table separators. It does not neutralize raw HTML or Markdown control characters. Consequently, values containing raw HTML are written unchanged into the generated re ...[truncated 2161 chars]

Remediation
View remediation

Remediation Suggestions

  1. Treat every field from candidate JSON, CSV, Scholar, and MCP results as untrusted.
  2. Escape Markdown metacharacters contextually in all table cells, including backslashes, brackets, parentheses, angle brackets, backticks, and other formatting controls.
  3. Strip or encode raw HTML before writing metadata to Markdown. Do not rely solely on downstream renderers to sanitize generated reports.
  4. Parse access links with a standard URL parser and allow only exact http and https schemes.
  5. Reject URLs containing control characters, malformed authority components, or unsafe syntax.
  6. Safely encode characters that can terminate Markdown link destinations, particularly parentheses.
  7. Prefer a maintained Markdown-generation library that provides contextual escaping rather than constructing Markdown through direct string interpolation.
  8. Document that generated reports must be viewed with raw HTML disabled or through a renderer using a strict HTML sanitizer and content security policy.
  9. Add regression tests using hostile titles, authors, reasons, and URLs to verify that injected HTML and Markdown are rendered only as inert text.
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Rogue AgentSelf-Modification, Session Persistence
  • Trigger AbuseOverly Broad Trigger, Shadow Command Trigger, Keyword Baiting Trigger
  • MCP Least PrivilegeUnderdeclared Capability, Wildcard Permission, Missing Permission Declaration
  • MCP Tool PoisoningHidden Instructions, Unicode Deception, Parameter Description Injection
Findings (18)

Tp4

High
Category
MCP Tool Poisoning
Confidence
95% confidence
Finding

The code is a local post-processing/ranking script, not a retrieval tool. Its core function is to load candidate papers from a supplied file, match venue names against local quality datasets (journal quartiles, CAS zone, CCF, EI, Chinese core tags), assign scores/tier labels, and optionally write a ranked Markdown table. Parts of the declared description are supported: venue-quality screening, ranking, citations/links passthrough, and recommendation reasons. However, the major advertised capability—real-time Google Scholar search for finding papers—is absent, as are term expansion and reference snowballing. Because those are central to the declared purpose, this is a material description-behavior mismatch.

Content

No source excerpt is available for this finding.

Ae1

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

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

md
- `journal_scores.json`

Ae1

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

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

md
- `eiiRankingName.json`

Skill Enumeration

Medium
Category
Agent Snooping
Confidence
85% confidence
Finding

Skill enumerates or reads other installed skills. Access to other skills' SKILL.md files or the skills directory reveals prompt instructions, capabilities, and secrets that should be invisible to peer skills.

Content

Scanner excerpt · README.md (reported line 42)May include surrounding context.

Install this Skill in Codex or another Agent Skill-compatible environment:

bash
mkdir -p ~/.codex/skills
git clone https://github.com/Figpad/google-scholar-paper-finder.git ~/.codex/skills/google-scholar-paper-finder

Session Persistence

Medium
Category
Rogue Agent
Confidence
60% confidence
Finding

Skill establishes unauthorized persistence across sessions via cron jobs, startup scripts, or state files. Session persistence allows an attacker to maintain access beyond the current interaction.

Content

Scanner excerpt · README.md (reported line 42)May include surrounding context.

Install this Skill in Codex or another Agent Skill-compatible environment:

bash
mkdir -p ~/.codex/skills
git clone https://github.com/Figpad/google-scholar-paper-finder.git ~/.codex/skills/google-scholar-paper-finder

Undeclared Tool Scope

Medium
Category
MCP Least Privilege
Confidence
87% confidence
Finding

The skill describes behavior that relies on reading environment variables, reading local quality-data files, and writing output files, but it does not declare any explicit tool scope or allowed-tools policy. This creates an authorization ambiguity where a host agent may grant broader file or environment access than intended, increasing the risk of unintended data exposure or filesystem modification.

Content

No source excerpt is available for this finding.

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
94% confidence
Finding

The trigger list is broad and includes common academic phrases such as '找更多相关论文' and '文献检索', which may cause the skill to activate for routine research requests without clear user intent to use this specific workflow. Unintended invocation can lead to unnecessary external queries, over-collection of data, or use of local files and tooling when a simpler response was expected.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
96% confidence
Finding

Defaulting Chinese topics to English search terms without explicit opt-in can override user expectations and bias retrieval toward English-language sources. In security terms this is lower severity, but it can still cause unintended external requests and produce incomplete or mismatched results for users seeking Chinese literature.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
92% confidence
Finding

This JSON contains embedded Chinese-language labels such as "刊物全称", "网址", and "中国计算机学会推荐国际学术会议" mixed into otherwise English conference metadata. Because the file provides no indication that this dataset is intentionally region-specific or that users can opt into a Chinese locale, it imposes a language/locale constraint that may violate organizational language-choice policy.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
90% confidence
Finding

These lines introduce Chinese-only metadata headings for publication categories in the middle of the dataset. The file does not explain that it is meant for a Chinese-speaking audience or offer an alternative locale, so the language restriction is undocumented and may conflict with language/locale policy.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
91% confidence
Finding

The dataset continues to embed Chinese-only category headers, indicating a persistent forced locale rather than isolated noise. Without a documented regional purpose or multilingual support, this can create an implicit language policy violation for downstream users or agents.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
90% confidence
Finding

These lines contain Chinese-only descriptors for the database/data-mining section, again without any note that the file is region-scoped. This forces a specific locale in natural-language content and may violate policy when consumed in a general-purpose skill.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
89% confidence
Finding

This natural-language heading is written only in Chinese and appears in a file otherwise used as general structured metadata. Since there is no explicit locale scoping or opt-in, it creates an undocumented language constraint that may breach policy.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
89% confidence
Finding

The file includes another Chinese-only section label for graphics and multimedia. Repeated untranslated headings suggest the dataset assumes a Chinese locale without notifying users or allowing choice.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
89% confidence
Finding

This section heading for artificial intelligence is Chinese-only, continuing the pattern of undocumented locale enforcement. In a shared skill asset, such untranslated natural-language metadata can violate language-choice expectations.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
89% confidence
Finding

This line introduces a Chinese-only human-computer interaction category label with no surrounding justification for a Chinese locale. The absence of opt-in or explicit regional scope makes this a likely language/locale policy issue.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
88% confidence
Finding

The file closes with another Chinese-only category heading, reinforcing that the dataset embeds a fixed locale across multiple sections. Because no documentation explains this as a justified regional dataset, it may violate natural-language locale policy.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
88% confidence
Finding

The skill metadata mixes Chinese in short_description and English in default_prompt, which can impose or assume a language preference without documenting user choice. Under the policy, locale or language constraints should be explicit, optional, or clearly justified.

Content

No source excerpt is available for this finding.

Static analysis

No suspicious patterns detected.