T03 · Remote Payload Retrieval and Execution
- Location
docs/OLLAMA_SETUP.md:16- Finding
Unverified Remote Installer Is Piped Directly to a Shell
- Content
View full analysis
- Remediation
View remediation
Security audit
Security checks for vulnerabilities and agentic risk
This skill is partly a workflow template, but it also ships bot integrations and startup behavior with unsafe defaults that users should review before installing.
Install only after reviewing and disabling the default auto-update, removing TLS-verification bypasses and SDK rewriting, requiring authenticated webhook/bot access, sanitizing IDs before filesystem use, and clearing bundled runtime history. Treat this as a Review item rather than a routine workflow-template skill.
docs/OLLAMA_SETUP.md:16Unverified Remote Installer Is Piped Directly to a Shell
integrations/feishu/start_longconn.sh:21Feishu Launcher Rewrites an Installed SDK and Disables TLS Verification
scripts/auto_update.sh:42Default Startup Workflow Pulls Unreviewed Code from a Mutable Branch
integrations/feishu/bot.py:47Feishu Public Webhook Accepts Unauthenticated Message Events
integrations/memory_manager.py:75Externally Supplied User IDs Are Used Directly in Filesystem Paths
integrations/memory_manager.py:173User-Controlled Instructions Can Be Persisted and Reintroduced as Agent Memory
integrations/feishu/data/memory/ou_13bb618d4267d6f3b15db89f6cc12d1b_history.json:1Runtime Feishu Identifier and Conversation Transcript Are Included in the Package
integrations/telegram/bot.py:36Telegram Bot Token Prefix Is Written to Process Logs
integrations/telegram/bot.py:38Configured Telegram Administrator Boundary Is Not Enforced
The declared description presents a broad workflow template with features like triple-judgment logic, automatic updates, WBS/task decomposition, exemption thresholds, and memory-management best practices. The supplied code chunk does something narrower and materially different: it analyzes stored conversation history to compute a health score, derives a strategy from that score, and adjusts context/system prompt behavior. While 'Context 优化' loosely overlaps with applying a strategy to context, the main implemented functionality is conversation-quality monitoring and adaptive prompt/context tuning, not the described workflow-template features. No dangerous extra permissions are evident, but the primary purpose is mismatched.
The declared description presents a workflow/template artifact about agent operating norms and optimization practices. In contrast, the supplied code is specifically an operational Feishu bot integration: it opens a network listener, verifies Feishu webhook signatures/tokens, handles chat message events, creates an AI adapter, and sends outbound messages through Feishu APIs. This is a materially different primary purpose and includes undeclared external network/chat integration capabilities. While the description mentions memory management and smart-agent context, this code chunk itself is not implementing the described workflow best-practice template; it is implementing messaging infrastructure for Feishu.
The declared description presents this as a workflow/template for Smart Agent best practices (decision logic, WBS/task规范, context optimization, memory management). However, the supplied code is not a generic workflow template; it is concrete integration code for a Feishu bot runtime. Its primary purpose is to run a messaging bot over Feishu long connections, process incoming IM events, invoke an AI backend, persist chat memory, and send replies. While memory and task parsing are related to the declared agent concepts, the dominant behavior—external bot integration, event handling, token retrieval, and message delivery—is undeclared and materially different from the stated template-oriented purpose. The SSL-verification disabling is also an undeclared security-relevant behavior.
The declared description presents a high-level smart-agent workflow template with decision mechanisms, execution规范, WBS/task decomposition, memory management, and context optimization. However, the supplied code chunk does not implement any workflow logic, decision framework, auto-update behavior, context optimization, or memory features. Instead, it is a configuration module for Feishu bot credentials and AI engine settings. This is a materially different primary purpose, so the description does not accurately represent the code.
The declared description presents a generic smart-agent workflow template focused on process design and best practices such as triple-decision logic, automatic updates, context optimization, WBS/task execution rules, thresholds, and memory management. The supplied code instead is specifically an operational Feishu integration handler: it receives Feishu events, extracts sender/message data, handles commands, invokes an AI adapter for responses, persists chat memory, tracks tasks, and reports status. While memory management and task-related behavior partially align with the template theme, the primary purpose is materially different and significantly more specific: a live chat bot integration for Feishu. This is an undeclared capability and trigger surface compared with the description, so it should be flagged as a mismatch.
The declared description presents a generic workflow/template skill for agent execution logic and best practices, but the actual code chunk is specifically an operational launcher for a Feishu integration. Its primary purpose is to initialize configuration and start a Feishu bot, which is materially different from the described workflow-template functionality. This is not just a supporting implementation detail of the declared purpose; it introduces a concrete external integration and process-launching behavior not reflected in the description.
The declared description presents a workflow/process template for smart-agent task management and execution best practices. The supplied code does not implement workflow logic, WBS decomposition, memory management, context optimization, or auto-update mechanisms. Instead, it is an integration startup script whose main purpose is to patch the websockets library so SSL certificate verification is disabled, then start a Feishu bot. Disabling SSL verification is a significant operational/security-affecting capability that is not reflected in the description. Therefore, the code’s actual behavior is materially different from the declared purpose.
The declared description presents a workflow/process template for a smart agent, with planning and context-management best practices. The supplied code instead performs operational integration tasks for a Feishu bot: validating environment variables, reading credentials, patching the lark-oapi SDK, weakening SSL verification, and launching bot_longconn.py. These are materially different from the declared purpose and introduce undeclared capabilities involving external integration, local configuration access, code modification, and network-security behavior.
The description presents a comprehensive workflow template covering decision mechanisms, automatic updates, context optimization, task execution standards, WBS splitting, exemption thresholds, and memory management. However, this code chunk only implements the memory-management portion: local history/memory file storage, periodic AI-based summarization, optional OpenClaw-backed semantic search, prompt assembly, and conversation processing. While '自动更新' and 'Context 优化' are partially consistent with the summarization and prompt-building behavior, the broader declared functionality is not represented in this code. Additionally, the module can call an external executable via subprocess for memory search, which is a meaningful capability absent from the declaration. Therefore the description does not accurately represent what this specific code chunk actually does.
The declared description presents a comprehensive smart-agent workflow template with multiple advanced governance/workflow features. However, the supplied code is narrowly focused on message parsing and response-quality checking. It does not implement automatic updating, memory management, WBS decomposition, exemption thresholds, or a distinct three-stage decision mechanism. While there is some limited context handling and prompt optimization, the primary behavior is materially different and substantially narrower than the declared purpose.
The declared description presents this skill as a workflow/template and best-practice framework for agent execution, decision mechanisms, context optimization, WBS, and memory management. The supplied code instead implements a concrete task-tracking integration with filesystem persistence and task CRUD behavior. Its primary purpose is materially different: it manages numbered tasks and stores them in local JSON files, which is not described in the declared purpose. This is more than a supporting detail; it is the core behavior of the code. No evidence in the code supports the advertised triple-judgment mechanism, automatic update workflow logic, context optimization, WBS decomposition, exemption thresholds, or memory management.
The declared description presents a workflow/process template with decision mechanisms, auto-update behavior, WBS/task-planning guidance, exemption thresholds, and memory-management best practices. The supplied code does not implement that workflow logic. Instead, it is an integration layer for AI engines: it constructs message payloads from recent chat history and memory, builds system prompts, and calls OpenAI/Anthropic/DeepSeek/Ollama APIs or compatible endpoints. While there is a loose connection to 'context optimization' and memory usage, the primary purpose is materially different and includes undeclared network/model-integration capabilities. Therefore the description does not accurately represent the code chunk.
The declared description presents this as a workflow/template specification emphasizing internal agent-process best practices such as triage logic, auto-update behavior, context optimization, WBS/task management, and memory strategy. The supplied code chunk instead implements a concrete Telegram integration: it starts a bot, validates Telegram-related environment configuration, creates an AI backend adapter, registers command and content handlers, and listens for incoming Telegram updates. This is a materially different primary purpose and introduces undeclared external communication capabilities and triggers through Telegram. While memory/task commands may loosely relate to the template theme, the main behavior of this code is bot operation rather than workflow-template logic.
The description presents a generic Smart Agent workflow/template focused on internal decision mechanisms, auto-update behavior, context optimization, WBS/task-execution norms, and memory best practices. The supplied code is specifically a Telegram integration layer that receives platform messages, exposes bot commands, sends replies, tracks per-user tasks, reports system/memory status, and handles media/file events. While some described themes partially overlap with the code (context optimization, memory management, task parsing), the primary purpose and major capabilities are materially different: this chunk is a Telegram bot handler implementation, not just a workflow template. The declared triggers are empty, but the code clearly reacts to Telegram commands and incoming messages. Therefore the description does not accurately represent what this code chunk actually does.
The declared description presents a workflow/agent template for task management and context optimization, but the supplied code is a simple log archival shell script. Its primary purpose is filesystem maintenance: locating old .md files under a logs directory and moving them into an archive folder. This is materially different from the declared smart-agent workflow functionality and introduces undeclared file-management behavior.
The declared description presents this skill as a general workflow/template for agent execution practices and memory management best practices. However, the supplied code is a concrete filesystem maintenance script focused narrowly on compressing a specific markdown memory file when it exceeds 100 lines. It performs backup, filtering, and in-place edits to hot.md, which is much more specific operational behavior than the description suggests. While 'memory management' is mentioned in the description, the code's primary purpose is file cleanup/compression rather than implementing the broader workflow, decision mechanism, WBS, or context optimization claims. Therefore the code chunk does not accurately represent the declared purpose.
The declared description presents a workflow/template for agent behavior and process best practices, but the code is a concrete reporting utility that processes local metrics data and writes a weekly performance report. Its primary purpose is materially different from the declared workflow/template description. Although the code does not request dangerous permissions, it does access local log and report files and performs reporting/analytics capabilities that are not reflected in the description.
The description promises a broad smart-agent workflow template with decision logic, automatic updating, context optimization, and best-practice execution features. However, this code chunk only implements a repository/template health check: it inspects specific files/directories and enforces a size threshold for memory/hot.md. That is materially different from the declared primary purpose. While health checks could be a supporting utility within such a template, the supplied chunk itself does not exhibit the described workflow, update, or task-management capabilities, so the description does not accurately represent what this code actually does.
声明描述的是一个面向智能体流程设计的工作流模板与方法论集合,而提供的代码片段只实现了本地性能指标记录功能。两者主目的明显不同:声明强调流程机制、自动更新、上下文优化和记忆管理最佳实践;代码则只是把传入的运行数据写入日志文件。该日志记录能力并未在声明中体现,且代码没有展现声明中提到的三重判断、WBS 拆分、流程阈值或自动更新等核心行为。因此这是明显的描述与实际行为不匹配。
The declared description presents a high-level agent workflow/process template, not a file-manipulation utility. The actual code’s primary purpose is safe file writing with locking semantics. That is a materially different behavior from workflow orchestration, context optimization, WBS/task-planning, or memory-management guidance. No triggers or permissions are declared, yet the code performs direct file system modification, which is an undeclared capability. This is therefore a clear description-behavior mismatch.
The declared description presents a workflow/template for smart-agent task orchestration and best practices, but the provided code is a simple log-search utility. Its primary purpose is materially different: it performs recursive grep operations over a specific logs directory rather than implementing workflow logic, auto-update behavior, context optimization, WBS decomposition, or memory management. No triggers or permissions are declared, yet the code accesses filesystem log data. This is a clear description-behavior mismatch.
The documentation instructs users to download and immediately execute a remote shell script via curl ... | sh, which bypasses inspection, integrity verification, and provenance checks. If the remote host, CDN path, or connection is compromised, users could execute arbitrary code on their systems with the privileges of the shell session.
Linux:
curl -fsSL https://ollama.com/install.sh | sh
Windows:
The | sh construct chains remote content retrieval directly into shell execution, eliminating the user's chance to review or validate what will run. In a setup guide, this is particularly dangerous because readers tend to copy-paste installation commands, amplifying the chance of arbitrary code execution if the upstream script is modified or intercepted.
Linux:
curl -fsSL https://ollama.com/install.sh | sh
Windows:
Tool parameters are crafted to achieve unintended or unsafe behavior. Parameter abuse can bypass intended safety checks (e.g. shell=True, --force, dangerous glob patterns).
# 清理缓存重试
rm -rf ~/.ollama/models
ollama pull llama2
Tool parameters are crafted to achieve unintended or unsafe behavior. Parameter abuse can bypass intended safety checks (e.g. shell=True, --force, dangerous glob patterns).
# 清理缓存重试
rm -rf ~/.ollama/models
ollama pull llama2