Back to skill

Security audit

CHECK

Security checks for vulnerabilities and agentic risk

Overview

This skill bundle is disclosed as a development helper, but it gives agents broad host command execution, package installation, code execution, file mutation, and automatic privilege attempts without clear safety gates.

Install only in a disposable or tightly sandboxed development environment, not on a machine with sensitive files, credentials, Docker access, passwordless sudo, or shared Python environments. Treat any command, package install, generated code run, test run, or file delete as equivalent to giving the skill local execution authority.

Vulnerability Patterns
  • Unauthorized Access and Privilege EscalationObtains permissions beyond the task's legitimate needs
  • Insecure DependenciesIntroduces malicious components through unsafe dependency sources
  • 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
Findings (6)

T05 · Unauthorized Access and Privilege Escalation

Error
Location
universal_permission_manager_skill.py:116
Finding

Arbitrary Command Execution with Automatic Privilege Escalation

Content
View full analysis
Dict[str, Any]: try: parsed_command = shlex.split(command_str) result = self._try_run_command(parsed_command) if result["status"] == "success": return result strategies = [ lambda cmd: self._try_run_with_user_flag(cmd), lambda cmd: self._try_run_with_sudo(cmd), lambda cmd: self._try_run_with_verb_runas(cmd) ] for strategy in strategies: result = strategy(parsed_command) if result["status"] == "success": return result return result ``` ```python def _try_run_command(self, command: List[str]) -> Dict[str, Any]: try: result = subprocess.run( command, capture_output=True, text=True, timeout=60 ) ``` ```python def _try_run_with_sudo(self, command: List[str]) -> Dict[str, Any]: if self.system == "Windows": return { "status": "error", "error": "sudo不适用于Windows系统", "command": " ".join(command), "strategy_used": "sudo_not_applicable" } try: new_command = ["sudo"] + command result = subprocess.run( new_command, capture_output=True, text=True, timeout=60 ) ``` ```python elif "运行命令" in query_lower or "执行命令" in query_lower: import re cmd_match = re.search( r'(?:运行命令|执行命令|run|execute)\s+(.+)', query, re.IGNORECASE ) if cmd_match: command = cmd_match.group(1) return manager.run_any_command_safely(command) else: if query.strip( ...[truncated 2089 chars]
Remediation
View remediation

T05 · Unauthorized Access and Privilege Escalation

Error
Location
permission_manager_skill.py:187
Finding

Shell Injection and Elevated Arbitrary Command Execution

Content
View full analysis
Dict[str, Any]: try: if self.system == "Windows": return self._run_command_windows(command) else: return self._run_command_linux(command) except Exception as e: return { "status": "error", "error": str(e), "timestamp": datetime.now().isoformat() } ``` ```python def _run_command_windows(self, command: str) -> Dict[str, Any]: try: if self._check_admin_privileges(): result = subprocess.run( command, shell=True, capture_output=True, text=True, timeout=60 ) return { "status": "success", "command": command, "return_code": result.returncode, "stdout": result.stdout, "stderr": result.stderr } ``` ```python def _run_command_linux(self, command: str) -> Dict[str, Any]: try: if self._check_wsl_environment(): result = subprocess.run( command, shell=True, capture_output=True, text=True, timeout=60 ) return { "status": "success", "command": command, "return_code": result.returncode, "stdout": result.stdout, "stderr": result.stderr } else: result = subprocess.run( ['sudo'] + command.split(), capture_output=True, text=True, timeout=60 ) ``` ```python cmd_m ...[truncated 2190 chars]
Remediation
View remediation

T09 · Insecure Skill Coding Practices

Error
Location
code_generator_tester_skill.py:29
Finding

Unsandboxed Execution of Generated and Caller-Provided Code

Content
View full analysis
Dict[str, Any]: try: generated_code = self.generate_code(language, requirements) with tempfile.NamedTemporaryFile( mode='w+', suffix=f'.{self.get_file_extension(language)}', delete=False ) as temp_file: temp_file.write(generated_code) temp_file_path = temp_file.name run_result = self.run_code(temp_file_path, language) test_result = None if test_code: test_result = self.run_tests( temp_file_path, test_code, language ) ``` ```python def run_code(self, file_path: str, language: str) -> Dict[str, Any]: try: if language.lower() == "python": result = subprocess.run( [sys.executable, file_path], capture_output=True, text=True, timeout=30 ) elif language.lower() == "javascript": result = subprocess.run( ["node", file_path], capture_output=True, text=True, timeout=30 ) elif language.lower() == "bash" or language.lower() == "shell": result = subprocess.run( ["bash", file_path], capture_output=True, text=True, timeout=30 ) ``` ```python def run_tests( self, main_file: str, test_code: str, language: str ) -> Dict[str, Any]: try: test_file_ext = self.get_file_extension(language) with tempfile.NamedTemporaryFile( ...[truncated 2804 chars]
Remediation
View remediation

T08 · Insecure Dependencies

Warning
Location
environment_checker_skill.py:250
Finding

Unrestricted Third-Party Python Package Installation

Content
View full analysis
List[str]: results = [] for pkg in packages: try: print(f"正在安装 {pkg}...") result = subprocess.run( [sys.executable, "-m", "pip", "install", pkg], capture_output=True, text=True, timeout=300 ) ``` ```python def auto_install_missing_packages(self) -> List[str]: self.run_checks() packages_to_install = [] for recommendation in self.all_recs: if recommendation.startswith( "安裝 Python 套件: pip install " ): pkg = recommendation.replace( "安裝 Python 套件: pip install ", "" ).strip() packages_to_install.append(pkg) return self.install_python_packages(packages_to_install) ``` ### Technical Analysis The Skill installs package names from user requests and automatically generated recommendations through pip. It does not restrict packages to an approved inventory, pin versions, verify hashes, validate package provenanc ...[truncated 1616 chars]
Remediation
View remediation

T09 · Insecure Skill Coding Practices

Warning
Location
code_generator_tester_skill.py:190
Finding

Unrestricted Filesystem Write and Overwrite Capability

Content
View full analysis
Dict[str, Any]: try: path_obj = Path(file_path) path_obj.parent.mkdir(parents=True, exist_ok=True) with open(file_path, 'w', encoding='utf-8') as f: f.write(code) if path_obj.exists(): return { "status": "success", "message": f"代码已保存到 {file_path}", "file_size": path_obj.stat().st_size, "timestamp": datetime.now().isoformat() } ``` ### Technical Analysis The method accepts an unrestricted file path, recursively creates parent directories, and opens the target in write mode. It does not verify that the resolved path remains under an approved project root. Absolute paths and relative traversal paths can therefore target any location writable by the Agent. The code also does not protect against symbolic-link traversal or prevent overwriting existing files. The unused `language` parameter provides no extension or content restriction. Even if the current natural-language route does not directly provide code content to this method, the method is a public capability in the Skill implementation and is unsafe for callers that supply untrusted paths. ### Attack Path 1. An attacker or untrusted caller supplies source content and a path outside the intended project directory. 2. `Path(file_path)` accepts the absolute or traversing path. 3. `mkdir(parents=True)` creates missing parent directories where permitted. 4. `open(..., 'w')` creates or truncates the target. 5. Attacker-controlled content replaces the original file. 6. If the file is later loaded or executed, the write can lead to additional code execution. ...[truncated 456 chars]
Remediation
View remediation

T09 · Insecure Skill Coding Practices

Note
Location
environment_report.json:12
Finding

Committed Environment Report Discloses Host Identity and Filesystem Layout

Content
View full analysis
Remediation
View remediation
Vulnerability Patterns
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
  • Excessive AgencyUnrestricted Tool Access, Autonomous Decision Making, Scope Creep
  • Tool MisuseTool Parameter Abuse, Chaining Abuse, Unsafe Defaults
  • Trigger AbuseOverly Broad Trigger, Shadow Command Trigger, Keyword Baiting Trigger
  • MCP Tool PoisoningHidden Instructions, Unicode Deception, Parameter Description Injection
Findings (107)

Vague Triggers

High
Category
Not specified by scanner
Confidence
98% confidence
Finding

The generic 运行命令 / run command examples effectively position the skill as a broad arbitrary-command execution interface. In combination with the stated ability to attempt elevated execution, this creates a substantial risk of unintended or unsafe command execution, including destructive or privileged operations triggered by natural-language requests.

Content

No source excerpt is available for this finding.

Missing User Warnings

High
Category
Not specified by scanner
Confidence
96% confidence
Finding

Running generated code and user-provided tests is equivalent to executing arbitrary code on the host, yet the README does not provide a strong warning or containment guidance. In an agent workflow, generated or supplied code may be attacker-influenced, making this a high-risk capability if not sandboxed and explicitly consented to.

Content

No source excerpt is available for this finding.

Missing User Warnings

High
Category
Not specified by scanner
Confidence
98% confidence
Finding

Advertising attempts to use elevated permissions and to run any system command without a clear warning normalizes high-impact behavior that can alter the host significantly. In context, this is especially dangerous because the same skill bundle couples broad triggers with command execution and retry strategies, increasing the chance of unsafe privilege-affecting actions.

Content

No source excerpt is available for this finding.

Vague Triggers

High
Category
Not specified by scanner
Confidence
97% confidence
Finding

These examples effectively advertise natural-language activation for arbitrary system-command execution. Since the same README states the skill can run commands and try multiple execution strategies, ambiguous activation substantially raises the likelihood of unintended or attacker-influenced command execution.

Content

No source excerpt is available for this finding.

Vague Triggers

High
Category
Not specified by scanner
Confidence
98% confidence
Finding

The README explicitly maps everyday phrases such as package installs, git, docker, npm, and python commands to direct execution, which is effectively arbitrary command execution via broad natural-language triggers. In an agent setting, this creates a serious prompt-to-action gap where conversational text can cause system operations without a robust intent-verification step.

Content

No source excerpt is available for this finding.

Missing User Warnings

High
Category
Not specified by scanner
Confidence
99% confidence
Finding

The skill explicitly claims it can 'intelligently run any system command' and automatically try multiple permission strategies, including privilege-related ones, without describing strong safety gates, allowlisting, confirmation, or risk warnings. In practice this creates a high-risk arbitrary command execution capability that could be used to run destructive commands, alter system state, access sensitive data, or normalize privilege escalation behavior.

Content

No source excerpt is available for this finding.

Vague Triggers

High
Category
Not specified by scanner
Confidence
97% confidence
Finding

The skill advertises generic trigger phrases like raw commands (pip install requests, docker ps, python script.py) and 运行命令 ..., which are broad enough to match ordinary user requests and silently route them into a privileged command-execution workflow. In the context of a skill that can run arbitrary system commands and try escalation strategies, overly broad activation materially increases the chance of unintended command execution and misuse.

Content

No source excerpt is available for this finding.

Missing User Warnings

High
Category
Not specified by scanner
Confidence
99% confidence
Finding

The skill silently writes generated code to disk and executes it immediately, without warning the user or requiring approval. This is dangerous because it turns prompt-controlled content into local code execution with no safety checkpoint, making accidental or malicious harmful actions far more likely.

Content

No source excerpt is available for this finding.

Context-Inappropriate Capability

High
Category
Not specified by scanner
Confidence
100% confidence
Finding

The skill's core behavior is to execute generated or user-supplied code locally through Python, Node, and Bash. In the context of an agent skill with no declared trust boundary or sandbox, this is a dangerous capability that enables arbitrary code execution and greatly expands the blast radius of prompt injection or malicious user input.

Content

No source excerpt is available for this finding.

Missing User Warnings

High
Category
Not specified by scanner
Confidence
99% confidence
Finding

The skill writes user-provided test code to a file and runs it without any user-facing warning or confirmation. That behavior removes an important trust boundary and makes exploitation trivial if a user or upstream prompt injects malicious test content.

Content

No source excerpt is available for this finding.

Intent-Code Divergence

High
Category
Not specified by scanner
Confidence
95% confidence
Finding

The skill presents itself as an environment checker, but it also performs package installation and can write results to a file. This mismatch increases the chance that users or orchestrators will invoke it expecting read-only diagnostics, when it can actually mutate the system and pull/install third-party code.

Content

No source excerpt is available for this finding.

Context-Inappropriate Capability

High
Category
Not specified by scanner
Confidence
98% confidence
Finding

Including package installation in a skill whose stated purpose is environment checking expands the trust boundary from inspection to code acquisition and execution. Installing Python packages can execute arbitrary setup/build steps and alter the runtime, making this significantly more dangerous than a diagnostic-only tool.

Content

No source excerpt is available for this finding.

Missing User Warnings

High
Category
Not specified by scanner
Confidence
96% confidence
Finding

The RAG manager is granted read, write, and delete file permissions and is described as dynamically creating and organizing categories, yet the manifest gives no warning that user data may be modified or deleted. In this context, silent deletion or restructuring of knowledge assets could cause data loss, integrity issues, or unintended destruction if invoked through ambiguous prompts or by a higher-level agent.

Content

No source excerpt is available for this finding.

Context-Inappropriate Capability

High
Category
Not specified by scanner
Confidence
97% confidence
Finding

The skill claims to manage permissions but includes a generic elevated command runner that is far broader than its stated purpose. In an agent ecosystem, this is especially dangerous because a seemingly narrow utility skill becomes an arbitrary privileged execution surface.

Content

No source excerpt is available for this finding.

Missing User Warnings

High
Category
Not specified by scanner
Confidence
97% confidence
Finding

The elevated command runner lacks strong user-facing warnings, approvals, and scoping despite enabling arbitrary command execution with possible admin/root privileges. In practice, this creates a high risk of accidental or induced misuse because the dangerous operation is normalized as a routine skill feature.

Content

No source excerpt is available for this finding.

Tool Parameter Abuse

High
Category
Tool Misuse
Confidence
99% confidence
Finding

Passing untrusted input to subprocess.run(..., shell=True) is classic command injection, and here it occurs in a branch that may already have administrator privileges. The skill context makes this more dangerous because the feature is exposed as a normal user-facing capability inside a permission tool, making abuse and accidental invocation more likely.

Content

Scanner excerpt · permission_manager_skill.py (reported line 212)May include surrounding context.

python
# 检查是否已经有管理员权限
            if self._check_admin_privileges():
                # 直接运行命令
                result = subprocess.run(command, shell=True, capture_output=True, text=True, timeout=60)
                return {
                    "status": "success",
                    "command": command,

Tool Parameter Abuse

High
Category
Tool Misuse
Confidence
99% confidence
Finding

This is also command injection via shell=True, allowing metacharacters, pipelines, redirection, and command chaining from untrusted input. Even when not root, the executed commands run with the skill's process privileges and can access local files, credentials, and services.

Content

Scanner excerpt · permission_manager_skill.py (reported line 242)May include surrounding context.

python
# 检查是否在WSL中
            if self._check_wsl_environment():
                # 在WSL中尝试运行命令
                result = subprocess.run(command, shell=True, capture_output=True, text=True, timeout=60)
                
                return {
                    "status": "success",

Missing User Warnings

High
Category
Not specified by scanner
Confidence
95% confidence
Finding

The Docker execution path permits destructive and high-impact operations such as run, exec, rm, rmi, build, pull, and push without warning or confirmation, and may run them with sudo. Given Docker's ability to affect the host system and workloads, this is a significant safety and security issue.

Content

No source excerpt is available for this finding.

Context-Inappropriate Capability

High
Category
Not specified by scanner
Confidence
96% confidence
Finding

The advertised capabilities explicitly include running system commands, which broadens the attack surface and invites use of the skill as a general command executor. That mismatch between theme and capability makes abuse more likely, especially when users or higher-level agents select skills by description.

Content

No source excerpt is available for this finding.

Context-Inappropriate Capability

High
Category
Not specified by scanner
Confidence
98% confidence
Finding

The fallback strategy explicitly includes privilege-escalation attempts via sudo and administrator execution paths even though the skill's role is ostensibly diagnostic permission management. Embedding escalation logic into an agent skill greatly increases abuse potential and can turn simple input handling into privileged code execution.

Content

No source excerpt is available for this finding.

Context-Inappropriate Capability

High
Category
Not specified by scanner
Confidence
99% confidence
Finding

The skill presents itself as a permission manager but exposes a general-purpose command runner that accepts arbitrary commands and executes them on the host. That capability is far broader than the stated role, making misuse or prompt-injection-driven abuse much more likely and more dangerous in this context.

Content

No source excerpt is available for this finding.

Missing User Warnings

High
Category
Not specified by scanner
Confidence
98% confidence
Finding

The skill can execute arbitrary system commands and automatically try alternate execution strategies, including sudo, without any explicit user-facing warning or confirmation gate at execution time. In an agent workflow, that creates a high risk of silent destructive actions triggered by unsafe prompts or indirect input.

Content

No source excerpt is available for this finding.

Missing User Warnings

High
Category
Not specified by scanner
Confidence
100% confidence
Finding

When the query does not match predefined help phrases, the skill defaults to executing the raw user input as a system command. This makes accidental or adversarial triggering trivial and removes any meaningful separation between normal conversation input and host command execution.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
92% confidence
Finding

The overview advertises capabilities for automatic package installation, arbitrary code/test execution, file writing, and permission-elevated command execution without documenting safety gates, user confirmation, scope restrictions, or sandboxing. In an agent skill bundle, these behaviors can directly modify the host system or execute harmful commands if invoked from untrusted prompts, making the missing safeguards a real security issue rather than a documentation-only concern.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
96% confidence
Finding

Comments, CLI descriptions, status messages, and errors throughout the file are presented in Chinese only. This constitutes a language policy concern because the skill forces a specific language experience without opt-in, fallback, or documented locale limitation.

Content

No source excerpt is available for this finding.

Static analysis

No suspicious patterns detected.