T09 · Insecure Skill Coding Practices
- Location
SKILL.md:47- Finding
LLM-Accessible Shell and Python Tools Permit Unrestricted Host Code Execution
- Content
View full analysis
- Remediation
View remediation
Security audit
Security checks for vulnerabilities and agentic risk
This AgentScope guide is mostly coherent documentation, but it deserves review because it promotes mutable updates and unsandboxed shell/Python execution in basic examples.
Review before installing or using broadly. Treat the skill as documentation plus runnable examples, not just passive help. Do not follow the shell/Python execution examples on a machine with secrets unless you add a sandbox, confirmation prompts, and a minimal environment. Prefer pinned AgentScope versions or reviewed commit hashes instead of git-pulling main, and update example dependencies before running the A2UI client examples.
SKILL.md:47LLM-Accessible Shell and Python Tools Permit Unrestricted Host Code Execution
SKILL.md:137Mutable and Unpinned Installation Workflow Creates Supply-Chain Exposure
The declared purpose is informational and assistive around the AgentScope framework, not remote system administration or command execution. Advertising a skill that executes shell commands on the server introduces a powerful capability that is not an obvious or necessary requirement for answering usage questions or finding library examples.
Dependency has known vulnerabilities (CVEs). Using packages with unpatched security flaws exposes the environment to known exploits.
A skill meant to help users build applications with AgentScope or answer library questions does not inherently require arbitrary shell command execution on the server. This capability is highly sensitive and unrelated to the manifest's described purpose.
The declared description presents this as a knowledge/help skill about using the AgentScope Python library. The supplied code, however, is an operational shell script for building documentation artifacts. Its primary purpose is not answering questions about AgentScope or searching framework examples/APIs, but cleaning directories and generating HTML docs with Sphinx. The filesystem deletion and build automation are undeclared capabilities and materially differ from the stated purpose.
The declared purpose describes an informational/help skill for the AgentScope library, focused on answering questions and guiding usage. The supplied code does not implement help, search, examples, or library-usage assistance. Instead, it is an operational shell script for building Chinese documentation and cleaning build artifacts on the filesystem. This is a materially different primary purpose and includes filesystem-modifying behavior that is not reflected in the description.
Referenced artifact was not completely inspected
- `view_pypi_latest_version.sh`: View the latest version of AgentScope on PyPI.
Referenced artifact was not completely inspected
- `view_module_signature.py`: Explore the structure of AgentScope modules, classes, and methods.
Referenced artifact was not completely inspected
- **`multi_agent_orchestration.md`**: Multi-agent orchestration concepts and implementation
Referenced artifact was not completely inspected
- **`deployment_guide.md`**: Deployment patterns and best practices
Hidden instructions were detected in comments or invisible text. These could contain malicious directives. Manual review is recommended.
## News
<!-- BEGIN NEWS -->
- **[2026-02] `FEAT`:** Realtime Voice Agent support. [Example](https://github.com/agentscope-ai/agentscope/tree/main/examples/agent/realtime_voice_agent) | [Multi-Agent Realtime Example](https://github.com/agentscope-ai/agentscope/tree/main/examples/workflows/multiagent_realtime) | [Tutorial](https://doc.agentscope.io/tutorial/task_realtime.html)
- **[2026-01] `COMM`:** Biweekly Meetings launched to share ecosystem updates and development plans - join us! [Details & Schedule](https://github.com/agentscope-ai/agentscope/discussions/1126)
- **[2026-01] `FEAT`:** Database support & memory compression in memory module. [Example](https://github.com/agentscope-ai/agentscope/tree/main/examples/functionality/short_term_memory/memory_compression) | [Tutorial](https://doc.agentscope.io/tutorial/task_memory.html)
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).
set -e
# Clean old build files
rm -rf build/ doctrees/
# Build the html
sphinx-build -M html ./ build
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).
set -e
# Clean old build files
rm -rf build/ doctrees/
# Build the html
sphinx-build -M html ./ build
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).
sphinx-build -M html ./ build
# Remove temporary files (double insurance)
rm -rf build/html/.doctrees
rm -f build/html/.buildinfo
find build/html -name "*.pickle" -delete
find build/html -name "__pycache__" -delete
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).
sphinx-build -M html ./ build
# Remove temporary files (double insurance)
rm -rf build/html/.doctrees
rm -f build/html/.buildinfo
find build/html -name "*.pickle" -delete
find build/html -name "__pycache__" -delete
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).
# Remove temporary files (double insurance)
rm -rf build/html/.doctrees
rm -f build/html/.buildinfo
find build/html -name "*.pickle" -delete
find build/html -name "__pycache__" -delete
find build/html -name "*.pyc" -delete
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).
# Remove temporary files (double insurance)
rm -rf build/html/.doctrees
rm -f build/html/.buildinfo
find build/html -name "*.pickle" -delete
find build/html -name "__pycache__" -delete
find build/html -name "*.pyc" -delete
这是一个代码文件,因此应检查安全关键操作的用户披露。my_search 接收 api_key 这样的敏感凭据,并在返回文本中直接插入该密钥,属于对敏感凭据的处理且会暴露给调用方;代码中没有任何警告、掩码处理或避免展示凭据的说明。
These lines do more than mention the existence of execution tools: they actively register execute_python_code into the toolkit so it becomes available to the agent. For a skill whose stated purpose is helping users with AgentScope usage and examples, enabling arbitrary Python execution is a materially stronger capability than necessary.
The manifest describes this skill as a guide for using the AgentScope Python library: answering questions, providing guidance, and searching examples or API information. In contrast, the agent card exposes operational capabilities to execute Python code, run shell commands on the server, and read text files from the server, which are materially broader than documentation/help functionality.
A documentation/help skill may reasonably search examples or explain APIs, but exposing direct Python code execution is a separate operational capability. Nothing in the stated manifest purpose requires arbitrary execution of Python snippets on behalf of the user.
The skill manifest describes this skill as guidance for using the AgentScope Python library, including answering questions and finding examples. This example server registers execute_python_code and execute_shell_command as tools for an agent handling user queries, which gives the skill an operational code-execution capability not justified by a documentation/help skill's stated purpose.
The handler registers execute_python_code and execute_shell_command as available tools, enabling arbitrary code and shell execution by the agent. This file contains no confirmation prompt, warning comment, or user-facing disclosure that such high-impact operations may occur.
Dependency has known vulnerabilities (CVEs). Using packages with unpatched security flaws exposes the environment to known exploits.
Dependency has known vulnerabilities (CVEs). Using packages with unpatched security flaws exposes the environment to known exploits.
Dependency has known vulnerabilities (CVEs). Using packages with unpatched security flaws exposes the environment to known exploits.