Back to skill

Security audit

Dist Global Biblio Base 3.10.3

Security checks for vulnerabilities and agentic risk

Overview

This skill is mostly a coherent literature-search and payment integration, but it ships a live gateway bearer secret and has some broad automatic account, quota, and download behavior users should review before installing.

Review this before installing. The main user risk is not hidden malware, but that the package exposes a shared gateway secret and will send your email, search/download requests, quota actions, and payment-status checks to SmartLib-related services. Install only if you trust the publisher and are comfortable with paid quota flows and third-party PDF retrieval.

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

Error
Location
config.json:2
Finding

Hardcoded Gateway Bearer Credential in Distributed Configuration

Content
View full analysis

Vulnerability Details

File Location: config.json, lines 2–3
Vulnerability Type: Hardcoded plaintext service credential
Risk Level: High

Vulnerable Code

json
{
  "SMARTLIB_GATEWAY_URL": "https://1318491188-jvmi3wist0.ap-shanghai.tencentscf.com",
  "SMARTLIB_GATEWAY_SECRET": "sk-O9vHwWzMg0Jf7khvhKQ0xxpdGIOROcw5RyQnROrNuZj9x6hOeHmi2",
  "SMARTLIB_EMAIL": null
}

Technical Analysis

The project distributes a plaintext Gateway bearer secret in config.json. Any user or process with access to the Skill package can recover the credential without authentication.

This is an operational credential rather than unused example data. The documented execution flow reads the secret from this file and places it in the Authorization: Bearer header for Gateway operations. Relevant uses include quota lookup at SKILL.md:101–102, token consumption at SKILL.md:176–178, and proxied search requests at SKILL.md:183–186 and SKILL.md:513–514.

The credential therefore crosses from a publisher-controlled backend trust domain into every environment where the Skill is distributed. Instructions not to reveal the secret in conversation do not protect it from users, local processes, package mirrors, source-control history, or anyone else able to inspect the package.

Attack Path

  1. An attacker downloads, installs, or otherwise obtains the Skill package.
  2. The attacker reads config.json and extracts the Gateway URL and bearer secret.
  3. Following the documented API flow, the attacker supplies the secret in the Gateway's Authorization: Bearer header.
  4. The attacker invokes credential-protected Gateway operations such as quota lookup, /consume, and /search, subject to whatever server-side restrictions are associated with the exposed credential.
  5. The attacker can continue impersonating authorized Skill traffic until the credential is revoked or rotated.

This path requires no compromise of the ...[truncated 724 chars]

Remediation
View remediation

Remediation Suggestions

  1. Revoke and rotate the exposed Gateway credential immediately.
  2. Remove the secret from the distributed package and purge it from source-control history, release archives, caches, and build artifacts.
  3. Keep only a placeholder in config.example.json; do not place a functional shared credential in config.json.
  4. Provision separate credentials through an authenticated enrollment process at installation or first use.
  5. Store credentials in a platform secret manager, protected keychain, or restricted runtime environment rather than a distributable content file.
  6. Apply least privilege, per-installation identity, short expiration, rate limits, and revocation support to Gateway credentials.
  7. Ensure the Gateway validates that the authenticated installation is authorized to act for the supplied account or email instead of relying on a shared bearer secret.
  8. Add automated secret scanning to source-control and release pipelines to prevent recurrence.
Vulnerability Patterns
  • 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
  • Trigger AbuseOverly Broad Trigger, Shadow Command Trigger, Keyword Baiting Trigger
  • MCP Tool PoisoningHidden Instructions, Unicode Deception, Parameter Description Injection
Findings (15)

Intent-Code Divergence

High
Category
Not specified by scanner
Confidence
96% confidence
Finding

The document claims all calls must go through a Gateway-managed /consume -> /search flow, but later instructions discuss direct SmartLib API usage and in-code token handling. This inconsistency can cause agents or developers to bypass the intended security boundary, leading to improper credential handling, weakened auditability, and accidental direct access patterns outside the managed proxy.

Content

No source excerpt is available for this finding.

Credential Access

High
Category
Privilege Escalation
Confidence
70% confidence
Finding

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

Content

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

md
| **单次查询条数**| PageSize 20-1000,建议 ≤100 以保证速度|
| **翻页上限**| 无硬限制,但建议不超过 50 页(共 1000 条)/ No hard limit, but ≤50 pages recommended |
| **请求频率**| 有频率限制(未公开数值),触发 429 时自动等待重试|
| **Token 有效期**| Access Token 30 秒,Refresh Token 2 小时(以下游 API 返回为准)。系统自动管理刷新|
| **下载链接有效期**| 约 10 分钟(以下游返回为准),过期需重新调用下载接口|
| **依赖**| 完全依赖 SmartLib API 和网络连接,离线不可用|

Credential Access

High
Category
Privilege Escalation
Confidence
70% confidence
Finding

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

Content

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

md
| **单次查询条数**| PageSize 20-1000,建议 ≤100 以保证速度|
| **翻页上限**| 无硬限制,但建议不超过 50 页(共 1000 条)/ No hard limit, but ≤50 pages recommended |
| **请求频率**| 有频率限制(未公开数值),触发 429 时自动等待重试|
| **Token 有效期**| Access Token 30 秒,Refresh Token 2 小时(以下游 API 返回为准)。系统自动管理刷新|
| **下载链接有效期**| 约 10 分钟(以下游返回为准),过期需重新调用下载接口|
| **依赖**| 完全依赖 SmartLib API 和网络连接,离线不可用|

Credential Access

High
Category
Privilege Escalation
Confidence
70% confidence
Finding

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

Content

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

md
| **单次查询条数**| PageSize 20-1000,建议 ≤100 以保证速度|
| **翻页上限**| 无硬限制,但建议不超过 50 页(共 1000 条)/ No hard limit, but ≤50 pages recommended |
| **请求频率**| 有频率限制(未公开数值),触发 429 时自动等待重试|
| **Token 有效期**| Access Token 30 秒,Refresh Token 2 小时(以下游 API 返回为准)。系统自动管理刷新|
| **下载链接有效期**| 约 10 分钟(以下游返回为准),过期需重新调用下载接口|
| **依赖**| 完全依赖 SmartLib API 和网络连接,离线不可用|

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
84% confidence
Finding

SQP-3 applies to all file types and includes language/locale policy violations. Although there is a short English summary, the operational guidance, commands context, and most instructions are presented only in Chinese, which effectively forces a language choice without an explicit opt-in or justification.

Content

No source excerpt is available for this finding.

Context-Inappropriate Capability

Medium
Category
Not specified by scanner
Confidence
90% confidence
Finding

The pipeline explicitly expands from API-based retrieval into arbitrary URL fetching via a subprocess-invoked curl fallback. That broadens the skill from controlled SmartLib/Gateway interactions to general network download behavior, increasing exposure to SSRF-like misuse, untrusted content retrieval, and unexpected execution-surface growth in an agent context.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
93% confidence
Finding

The README advertises fully automatic account registration, quota consumption, and payment recovery but does not clearly disclose what user data is transmitted to external services or when that transmission occurs. This creates a meaningful consent and privacy risk because users may trigger registration, billing-related flows, or external API usage without informed approval.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The skill states that it will automatically detect credentials and, if absent, register through an external gateway with zero configuration, but it does not warn the user that this accesses third-party infrastructure. In an agent context, silent external account creation and credential handling can expose user data or create accounts on their behalf without clear consent.

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 activate on generic writing-help requests like '写文献综述' or 'find supporting citations', which can cause the skill to engage unexpectedly and start collecting email addresses or initiating paid/quota-consuming flows. In this context, overbroad activation increases the chance of unwanted data collection, unintended third-party API use, and surprise monetization prompts.

Content

No source excerpt is available for this finding.

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
91% confidence
Finding

该 markdown 文件适用 SQP-1。L05 将“我要升级”作为对话引导短语之一,这一表述属于日常常见表达,缺少限定必须在文献检索/计费场景下使用的约束,也没有提供负例或更明确的触发上下文,可能导致非预期激活。

Content

No source excerpt is available for this finding.

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
93% confidence
Finding

L45 明确把“我要升级”定义为升级入口,但未说明必须在哪些技能、页面或上下文中才生效,也未列出不应触发的情况。对于 markdown 说明文档,这属于触发条件过宽且缺乏边界描述的情形。

Content

No source excerpt is available for this finding.

Missing User Warnings

Low
Category
Not specified by scanner
Confidence
88% confidence
Finding

This is a markdown file, so SQP-2 applies to missing warnings in the skill description. The quick-start commands explicitly download papers and write them under --out ./my_downloads, but the document does not warn users that running the skill will create local files and potentially download many PDFs automatically.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
77% confidence
Finding

The file is entirely written as a Chinese-only user experience and all invocation examples assume Chinese interaction, but it does not state that the skill is intentionally limited to Chinese users or offer any language/locale choice. Under the policy, forcing a specific language without opt-in can be a natural-language policy violation unless clearly justified.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
79% confidence
Finding

The file defines parallel English trigger phrases and many bilingual headings and instructions, but it does not state that the user may choose their preferred interaction language. Under the policy, forcing or defaulting locale behavior without explicit user choice can be a natural-language policy issue unless justified or opt-in based.

Content

No source excerpt is available for this finding.

Intent-Code Divergence

Low
Category
Not specified by scanner
Confidence
97% confidence
Finding

The version-history entry at L1084 states '无需验证码', which directly conflicts with the operative registration flow documented earlier that requires /register/send-code and /register/verify with a 6-digit code. This is an active documentation contradiction inside the same skill file, not merely an omission.

Content

No source excerpt is available for this finding.