Back to skill

Security audit

心理学文献搜索与整理

Security checks for vulnerabilities and agentic risk

Overview

This literature-search skill mostly does what it claims, but its documentation asks users to handle API keys insecurely and gives inconsistent information about which outside services may be used.

Review before installing. Use it only with non-confidential research topics, do not paste API keys into chat, and do not store keys in SKILL.md. Prefer environment variables or a managed secret store, and treat Web of Science/Springer claims and journal metrics as partially documented rather than fully implemented.

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
README.md:63
Finding

Documentation Encourages Plaintext API Key Disclosure and Storage

Content
View full analysis

Vulnerability Details

File Location: README.md:63-79
Vulnerability Type: Plaintext credential handling
Risk Level: Medium

Vulnerable Snippet

markdown
## 🔧 配置 API Key(可选,推荐)

配置 API Key 后可获取更丰富的元数据(期刊分区、被引次数等)。无 Key 时自动使用 Semantic Scholar 免费通道,功能不受影响。

### Web of Science API Key

1. 访问 [Clarivate Developer Portal](https://developer.clarivate.com)
2. 注册账号并申请 **Web of Science Core Collection API** Key(免费)
3. 在 WorkBuddy 对话中告知 Key,或直接修改 `SKILL.md` 中的配置

### Springer Nature API Key

1. 访问 [Springer Nature API](https://dev.springernature.com)
2. 注册后即时生成免费 API Key
3. 同上方式配置

> ⚠️ **注意**:API Key 为个人资产,请勿提交到公开仓库。本仓库的 `scripts/` 目录不含任何 Key。

The security-relevant instruction on line 71 translates to: “Provide the key in a WorkBuddy conversation, or directly modify the configuration in SKILL.md.”

Technical Analysis

The documentation recommends two insecure secret-handling methods:

  1. Entering an API key into a conversation, where it may remain in chat history, telemetry, exports, or shared workspace records.
  2. Writing an API key into SKILL.md, where it becomes ordinary plaintext project content that may be copied into archives, shared with collaborators, or committed to source control.

The warning not to commit keys does not adequately mitigate the preceding instruction to place them in a project file. These methods are also unnecessary for the Skill’s core functionality because the bundled PubMed and Semantic Scholar scripts operate without API keys. The separate API reference already describes environment-variable-based configuration.

No hardcoded real credential was found, and the reviewed scripts do not exfiltrate credentials to unrelated hosts.

Attack Path

  1. A user follows the documented configuration instructions.
  2. The user submits a Web of Science or Springer API key in a WorkBuddy conversation, or writes it into SKILL.md.
  3. The conversation, workspace, Skill archive, backup, or repository is later exported, ...[truncated 949 chars]
Remediation
View remediation

Remediation Suggestions

  1. Remove the recommendation to provide API keys through chat or store them in SKILL.md.
  2. Require a platform-managed secret store where available.
  3. Otherwise, accept credentials only through environment variables such as WOS_API_KEY and SPRINGER_API_KEY.
  4. Ensure secrets are never printed in command output, generated reports, exceptions, telemetry, or debug logs.
  5. Add secret-bearing local configuration files to .gitignore if such files are supported, and provide only sanitized example files.
  6. Clearly state that API keys are optional and that anonymous PubMed and Semantic Scholar access is the default least-privilege mode.
  7. Recommend immediate key revocation and rotation if a key has previously been entered into chat, committed, or included in an exported Skill package.
  8. Add automated secret scanning to repository and release workflows.
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • System Prompt LeakageDirect Leakage, Indirect Extraction, Tool-Based Exfiltration
  • 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 (31)

Tp4

High
Category
MCP Tool Poisoning
Confidence
99% confidence
Finding

There is a strong description-behavior mismatch. The declared purpose promises a literature search and synthesis workflow over external academic databases, including rich metadata extraction and bilingual output. The supplied code instead implements a standalone journal classification/impact-factor lookup against a static in-code dictionary of psychology journals. Its only behaviors are listing known journals and returning quartile/IF/level data for a journal name using exact or fuzzy matching. This is a materially different primary purpose and lacks nearly all declared capabilities.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
98% confidence
Finding

The code is aligned with a narrow subset of the declared purpose: searching PubMed and returning literature metadata, including publication types and DOI/URL. However, the declared description promises a substantially broader capability set and multi-source workflow. In the provided code chunk, there is no Semantic Scholar integration, no citation count retrieval, no translation, and no NLP/information extraction for conceptual or operational definitions or scales. The primary purpose is therefore materially narrower than declared, making this a description-behavior mismatch.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
95% confidence
Finding

There is a clear description-behavior mismatch. The code’s primary purpose is a straightforward Semantic Scholar paper search utility returning limited metadata. While some declared elements are partially supported (title, DOI/URL, abstract, citation counts, basic keyword proxy), major advertised capabilities are absent: no PubMed access, no bilingual enrichment, no Chinese translations, no definition extraction, no measurement instrument extraction, and no publication-type handling. This is not merely an implementation detail; it materially narrows the skill’s actual functionality compared with the declared description.

Content

No source excerpt is available for this finding.

Direct Prompt Extraction

High
Category
System Prompt Leakage
Confidence
85% confidence
Finding

Skill contains instructions that could directly expose system prompts, internal rules, or hidden instructions to users or external parties.

Content

Scanner excerpt · references/output_templates.md (reported line 127)May include surrounding context.

md
---

## 输出规范(Output Guidelines)

1. **链接必填**:每篇文献必须提供可点击链接,优先 DOI,其次原始 URL。
2. **关键词必填**:未显式列出时从摘要推断并标注 `(推断)`。双语格式:英文(中文)。

Description-Behavior Mismatch

Medium
Category
Not specified by scanner
Confidence
97% confidence
Finding

The README materially misrepresents the skill’s supported data sources by claiming Web of Science and Springer Nature support while the manifest describes only PubMed and Semantic Scholar. This can cause users to make trust and data-handling decisions based on false documentation, including providing API keys or expecting searches against sources the skill may not actually use.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
96% confidence
Finding

The README describes multi-source search and AI-assisted translation but does not clearly warn users that their queries and retrieved content may be sent to third-party services. This is dangerous because users may submit sensitive research topics, unpublished ideas, or personal data without informed consent about external processing.

Content

No source excerpt is available for this finding.

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
94% confidence
Finding

The trigger phrases are broad enough to match common requests such as searching for papers or doing a literature review, which increases the chance of accidental invocation. That can expose user prompts and retrieved content to external services without clear intent, especially in a skill that queries third-party academic APIs and performs AI-assisted translation.

Content

No source excerpt is available for this finding.

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
92% confidence
Finding

The English trigger phrases are ambiguous and likely to overlap with ordinary assistant usage, making unintended activation plausible. In this skill’s context, that raises privacy and expectation risks because normal research questions may be silently routed through external APIs and translation components.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

Medium
Category
Not specified by scanner
Confidence
98% confidence
Finding

The technical documentation lists different upstream data sources than the manifest, which is a meaningful security and privacy issue because users cannot accurately determine where their queries may be sent. In a literature-search skill, source transparency directly affects consent, compliance, and key-management expectations.

Content

No source excerpt is available for this finding.

Undeclared Tool Scope

Medium
Category
MCP Least Privilege
Confidence
95% confidence
Finding

The skill instructs use of network-capable scripts and WebFetch/WebSearch against external services, but it does not declare any explicit tool scope such as allowed-tools or permissions. This weakens policy enforcement and reviewability because the runtime may permit broader network use than users or platform controls expect.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
87% confidence
Finding

The skill instructions and workflow are predominantly written in Chinese, which can impose a specific language experience without explicit user opt-in or an offered alternative. The policy allows locale constraints when they are documented and justified, but no such language-choice note is present here.

Content

No source excerpt is available for this finding.

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
81% confidence
Finding

The trigger phrase "organize papers into a table" is generic and could match many ordinary requests that are not intended to invoke this specific academic literature search skill. The description does not provide exclusion conditions or contextual limits to academic-database use for this phrase.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

Medium
Category
Not specified by scanner
Confidence
92% confidence
Finding

The skill documentation expands scope beyond the declared databases by requesting optional Web of Science/Springer API keys and journal-metrics lookups. Scope expansion increases the chance of unnecessary credential handling and broader external data transmission than the user expected from the manifest.

Content

No source excerpt is available for this finding.

External Transmission

Medium
Category
Data Exfiltration
Confidence
89% confidence
Finding

The skill transmits user-supplied research topics to an external third-party API endpoint at Semantic Scholar. This is expected for the feature, but it is still a real data-exposure boundary: sensitive or proprietary research questions may be disclosed externally, and the context makes this more significant because literature-search queries can contain confidential study plans or patient-related topics.

Content

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

Semantic Scholar(WebFetch):

text
https://api.semanticscholar.org/graph/v1/paper/search?query=[URL-ENCODED TOPIC]&fields=title,authors,year,venue,doi,abstract,citationCount,fieldsOfStudy&limit=20

方案 C:WebSearch 兜底

Description-Behavior Mismatch

Medium
Category
Not specified by scanner
Confidence
96% confidence
Finding

The template instructs the agent to use Web of Science and Springer resources even though the declared skill description only mentions PubMed and Semantic Scholar. This creates a scope mismatch that can cause undeclared external data access, unexpected credential use, and user trust issues because the agent may reach services the user did not expect.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
90% confidence
Finding

The file requires that English abstracts 'must provide Chinese translation,' which imposes a specific output language. Under the policy, forcing a language or locale without user opt-in is a natural-language policy violation.

Content

No source excerpt is available for this finding.

Intent-Code Divergence

Medium
Category
Not specified by scanner
Confidence
92% confidence
Finding

The documentation describes WoS and Springer key availability and fallback behavior as if those integrations are expected, which contradicts the manifest. Such contradictions are dangerous because operators may unknowingly enable or tolerate undeclared network access and secret usage outside the approved skill boundary.

Content

No source excerpt is available for this finding.

External Transmission

Medium
Category
Data Exfiltration
Confidence
78% confidence
Finding

The template explicitly instructs WebFetch to send user-supplied queries to the Semantic Scholar API, which is an external transmission. In a literature-search skill this can be expected, but it is still security-relevant because sensitive research topics or user-provided text could be disclosed to a third party without explicit consent or minimization.

Content

Scanner excerpt · references/output_templates.md (reported line 148)May include surrounding context.

当 WoS 和 Springer API 密钥均不可用时,使用 WebFetch 调用:

text
https://api.semanticscholar.org/graph/v1/paper/search?query=[ENCODED_QUERY]&fields=title,abstract,year,venue,authors,citationCount,externalIds&limit=20

无需 API 密钥;匿名限速 100 次/5分钟。

Description-Behavior Mismatch

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The manifest describes a skill that searches PubMed and Semantic Scholar and produces structured paper-level outputs such as abstracts, keywords, citation counts, and variable definitions. This file instead implements a standalone local lookup tool for journal impact factor, quartile, and level from a hardcoded reference database, which is a different capability not described in the manifest.

Content

No source excerpt is available for this finding.

External Transmission

Medium
Category
Data Exfiltration
Confidence
60% confidence
Finding

Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.

Content

Scanner excerpt · references/api_reference.md (reported line 79)May include surrounding context.

md
import urllib.error


S2_BASE = "https://api.semanticscholar.org/graph/v1"


def search_semantic(

External Transmission

Medium
Category
Data Exfiltration
Confidence
60% confidence
Finding

Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.

Content

Scanner excerpt · scripts/search_semantic.py (reported line 23)May include surrounding context.

python
import urllib.error


S2_BASE = "https://api.semanticscholar.org/graph/v1"


def search_semantic(

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
87% confidence
Finding

Automatic Chinese translation is presented as default behavior without a language choice or opt-in, which can unnecessarily transmit content to additional processing components and may not match user expectations. This is especially relevant when abstracts or user-supplied queries contain sensitive or proprietary research material.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

Low
Category
Not specified by scanner
Confidence
89% confidence
Finding

Advertising journal quality metrics such as JCR quartiles, impact factor, and SSCI indexing when they are not described in the manifest creates a documentation integrity problem. Users may rely on unsupported evaluative metadata in academic or institutional workflows, leading to misplaced trust and potentially improper decisions.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

Low
Category
Not specified by scanner
Confidence
84% confidence
Finding

Claiming automatic APA 7 reference generation without corresponding manifest support is a capability mismatch that can mislead users about output reliability and scope. While not directly enabling code execution or data theft, it undermines informed use of the skill and can cause downstream citation errors in academic contexts.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

Low
Category
Not specified by scanner
Confidence
88% confidence
Finding

The fallback to generic WebSearch broadens the skill from curated API use to open-web retrieval, which can send sensitive research topics to more destinations and produce less trustworthy results. This is a real scope-creep issue because it changes the privacy and provenance profile of the skill without clear upfront limitation.

Content

No source excerpt is available for this finding.

Static analysis

No suspicious patterns detected.