Back to skill

Security audit

arxiv-paper-searcher

Security checks for vulnerabilities and agentic risk

Overview

This arXiv search skill is mostly coherent, but its optional scheduled monitoring can persist user-provided search text as future agent instructions without a clear data boundary.

Review this before installing if you plan to use recurring monitoring. Only create cron jobs from search keywords you trust, inspect the generated cron payload when possible, and avoid putting instruction-like text in the keyword. For higher-assurance use, pin the `arxiv` dependency and treat `config.json` as a file that can influence future scheduled agent runs.

Vulnerability Patterns
  • Skill Instruction HijackingAlters the agent's session goals or safety constraints when the skill loads
  • Insecure DependenciesIntroduces malicious components through unsafe dependency sources
  • 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)

T01 · Skill Instruction Hijacking

Warning
Location
scripts/openclaw_cron_builder.py:49
Finding
Stored Prompt Injection in Scheduled Agent Messages## Vulnerability Details **File Location**: `scripts/config_manager.py:363,399`; `scripts/openclaw_cron_builder.py:49-64,100-106` **Vulnerability Type**: Stored prompt injection through an untrusted search keyword **Risk Level**: Medium ### Vulnerable Code `scripts/config_manager.py:363` accepts the keyword as unrestricted text: ```python parser.add_argument("--keyword", "-k", type=str, help="搜索关键词") ``` `scripts/config_manager.py:397-404` persists the value: ```python if args.save: config = save_config( keyword=args.keyword, max_results=args.max, sort=args.sort, timezone=args.timezone, ) ``` `scripts/openclaw_cron_builder.py:49-64` directly interpolates that value into an agent instruction: ```python def build_analysis_message(config: Dict[str, Any]) -> str: keyword = config.get("keyword") max_results = config.get("max_results") sort = config.get("sort") timezone = config.get("timezone") or DEFAULT_TIMEZONE if not keyword: raise ValueError("当前配置缺少 keyword,无法构造任务消息") return ( "请使用当前技能的已保存配置执行一次完整 arXiv 监控流程。" f"检索关键词是 {keyword}。" f"返回数量是 {max_results}。" f"排序方式是 {sort}。" f"时区按 {timezone} 处理。" "请先搜索最新论文,再基于标题和摘要逐篇分析,最后输出完整结构化报告。" "报告必须包含论文列表、每篇论文的关注热点、创新性评估、热点研究方向 Top 10,以及 3 到 5 条趋势判断。" ) ``` `scripts/openclaw_cron_builder.py:100-106` places the generated string in an `agentTurn` payload: ```python payload: Dict[str, Any] = { "name": job_name or derive_job_name(config["keyword"]), "schedule": schedule, "sessionTarget": session_target, "payload": { "kind": "agentTurn", "message": build_analysis_message(config), }, } ``` ### Technical Analysis The search keyword is treated both as data and as part of the natural-language instruction sent to a future agent invocation. No allowlist, escapi ...[truncated 1787 chars]
Remediation
## Remediation Suggestions 1. Pass the search query as a typed data field separate from the agent's instruction text whenever the OpenClaw payload format permits it. 2. If a text-only payload is required, serialize the keyword using a defined encoding such as JSON and place it inside an explicit untrusted-data boundary. 3. Add an instruction stating that content inside the query field is data only and must never be interpreted as an instruction. This should supplement, not replace, structural separation. 4. Validate keywords against the intended arXiv query grammar and reject control characters, excessive lengths, and unsupported syntax. 5. Require explicit review or confirmation of the final generated agent message before creating a recurring task. 6. Restrict permissions on `config.json` so untrusted local users or processes cannot replace the stored query. 7. Add tests using instruction-like keywords to verify that they remain inert search data.

T08 · Insecure Dependencies

Note
Location
SKILL.md:501
Finding
Unpinned Third-Party Dependency Installation## Vulnerability Details **File Location**: `SKILL.md:501-504` **Vulnerability Type**: Mutable and unverified dependency installation **Risk Level**: Low ### Vulnerable Code ```bash pip install arxiv ``` ### Technical Analysis The installation instruction does not specify a reviewed package version or integrity hash. Consequently, installation resolves the package and its transitive dependencies from the configured Python package index at installation time. This makes environments non-reproducible and allows future upstream releases to introduce incompatible, vulnerable, or compromised code after the skill has already been reviewed. The project also contains no reviewed lockfile or hash manifest in the audited directory. The package name appears consistent with the package imported by `scripts/arxiv_search.py`; no evidence of typosquatting or a currently malicious package was identified. The issue is the absence of version and integrity controls rather than evidence that the present dependency is malicious. ### Attack Path 1. A user follows the documented `pip install arxiv` instruction. 2. `pip` resolves the latest version available from the configured package index, together with mutable transitive dependencies. 3. A compromised or unexpectedly changed release is downloaded. 4. Dependency code executes during installation or later when `scripts/arxiv_search.py` imports and uses `arxiv`. ### Impact Assessment Dependency code runs with the privileges of the user executing `pip` or the search script. A compromised dependency could potentially access that user's files, environment variables, network connectivity, and application data. The practical severity is reduced because exploitation depends on an upstream package or package-index compromise, and no such compromise was confirmed during this static audit.
Remediation
## Remediation Suggestions 1. Pin `arxiv` to a reviewed exact version rather than resolving the latest release. 2. Maintain a lockfile that also pins all transitive dependencies. 3. Record and verify package hashes, for example by installing with `pip --require-hashes`. 4. Use a controlled package index or trusted internal mirror in production environments. 5. Add automated dependency vulnerability and provenance scanning. 6. Review and deliberately update the lockfile instead of allowing dependency versions to change implicitly during installation.
Vulnerability Patterns
  • Trigger AbuseOverly Broad Trigger, Shadow Command Trigger, Keyword Baiting Trigger
  • MCP Tool PoisoningHidden Instructions, Unicode Deception, Parameter Description Injection
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
Findings (8)

Natural-Language Policy Violations

Medium
Confidence
95% confidence
Finding
The README states that the skill will "输出中文分析报告" by default, which imposes a language choice without indicating any user option to select another language. This is a natural-language policy concern because the skill fixes output locale rather than offering a choice or documenting a justified regional constraint.

Natural-Language Policy Violations

Medium
Confidence
97% confidence
Finding
The README says the skill will default to `Asia/Shanghai`, and later states it "统一使用中国时区 `Asia/Shanghai`" for interpreting schedules. This enforces a locale/timezone policy on all users without presenting a choice or a clear region-specific justification.

Vague Triggers

Medium
Confidence
91% confidence
Finding
The skill’s trigger scope is broad enough to match ordinary requests about papers or research directions without clear exclusion rules. In an agent/router environment, this can cause unintended activation, leading the agent to perform external searches, analysis, and follow-up prompting when the user did not explicitly request this specific skill flow.

Vague Triggers

Medium
Confidence
88% confidence
Finding
The example utterances are highly generic and overlap with common conversational requests, which increases the chance that the skill is selected when a user intended a lighter-weight answer or a different data source. Because the default behavior immediately performs a full retrieval-and-analysis pipeline, misrouting can trigger unnecessary external actions and excessive responses.

Intent-Code Divergence

Medium
Confidence
78% confidence
Finding
The module documentation explicitly states that the script does not create, modify, or delete OpenClaw cron tasks and only stores query parameters and binding information. However, the exposed commands `--enable-job` and `--disable-job` with user-facing messages about updating job status can reasonably be read as managing actual job state, creating intent confusion that contradicts the stated boundary.

Natural-Language Policy Violations

Medium
Confidence
93% confidence
Finding
The module docstring and all user-facing descriptions are written only in Chinese, and the generated task message also mandates a Chinese prompt flow. This creates a language/locale constraint without any visible opt-in or alternative language path, which matches the policy's language-choice concern.

Natural-Language Policy Violations

Low
Confidence
91% confidence
Finding
The module docstring states that the script defaults to China timezone, and the implementation hardcodes Asia/Shanghai for timestamps. This is a natural-language locale policy concern because users are not offered a choice or opt-in, and the file does not justify why that locale must be enforced.

Natural-Language Policy Violations

Low
Confidence
96% confidence
Finding
This code file contains its primary docstring and CLI help/user messages entirely in Chinese, which imposes a specific language on users. Under the policy rule, a skill should not force a language or locale without explicit user opt-in or documented justification.

Static analysis

No suspicious patterns detected.