Back to skill

Security audit

Verify Code Change

Security checks for vulnerabilities and agentic risk

Overview

This looks like a test-runner skill, but it can run any supplied command and gives unsafe sudo/admin retry advice, so it needs review before installation.

Install only if you are comfortable with the agent running exact commands you provide. Use simple project-local test commands, review the command before execution, do not pass untrusted text as the command, and do not rerun failures with sudo or administrator rights. Treat expected_behavior as a note only; the script checks exit code, not semantic behavior.

Vulnerability Patterns
  • 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
  • Unauthorized Access and Privilege EscalationObtains permissions beyond the task's legitimate needs
Vulnerability Patterns
  • 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 Least PrivilegeUnderdeclared Capability, Wildcard Permission, Missing Permission Declaration
  • MCP Tool PoisoningHidden Instructions, Unicode Deception, Parameter Description Injection
Findings (9)

Undeclared Tool Scope

Medium
Category
MCP Least Privilege
Confidence
93% confidence
Finding

The skill enables shell command execution via a user-supplied test_command, but it does not declare any explicit tool scope or command restrictions. In an agent environment, this creates a permission ambiguity that can lead to overbroad execution of arbitrary commands under the guise of test verification.

Content

No source excerpt is available for this finding.

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
88% confidence
Finding

The activation condition, 'When you need to verify functionality after code changes,' is broad enough to match many ordinary development requests. That increases the chance the skill is invoked in situations where executing shell commands was not explicitly intended, enabling unsafe or surprising command execution paths.

Content

No source excerpt is available for this finding.

Autonomous Decision Making

Medium
Category
Excessive Agency
Confidence
90% confidence
Finding

The skill advertises autonomous execution of commands based on user input, which delegates a sensitive decision—what code to run—to the skill without meaningful guardrails. In context, this is more dangerous because the skill's sole purpose is to launch subprocesses, making command execution the primary behavior rather than an incidental one.

Content

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

md
## Usage

Provide test command, script will automatically execute and check results.

## Parameters

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
92% confidence
Finding

The usage text says the script will 'automatically execute' a provided test command, but it does not define safety checks, approval requirements, or command limitations. Because the parameter is free-form, this ambiguity can be exploited to run arbitrary shell commands rather than merely safe test invocations.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
96% confidence
Finding

Natural-language strings throughout the docstrings, help text, and console output are exclusively in Chinese. For an all-purpose code verification utility, this imposes a language/locale constraint without user opt-in or a documented region-specific justification.

Content

No source excerpt is available for this finding.

Intent-Code Divergence

Medium
Category
Not specified by scanner
Confidence
96% confidence
Finding

The function documents and prints expected_behavior but never actually validates program output or runtime behavior against it, so success is determined only by exit code. This can produce false assurances that a code change is correct even when the observed behavior contradicts expectations, which is especially risky in automated verification pipelines.

Content

No source excerpt is available for this finding.

Context-Inappropriate Capability

Medium
Category
Not specified by scanner
Confidence
96% confidence
Finding

The script accepts an arbitrary --test-command string and executes it as a subprocess, which gives the skill a general command-execution capability rather than a narrowly scoped code-verification function. In an agent/skill context, this is dangerous because upstream prompts or untrusted inputs could cause execution of destructive commands, data exfiltration tools, package installers, or other system-impacting binaries under the user's privileges.

Content

No source excerpt is available for this finding.

Sudo/Root Execution

Medium
Category
Privilege Escalation
Confidence
88% confidence
Finding

The presence of a direct suggestion to use sudo is security-relevant in this context because the script executes arbitrary commands and may prompt operators toward privileged reruns. If followed, the same command-execution pathway could operate with root/admin permissions, turning otherwise limited mistakes into full host compromise or destructive changes.

Content

Scanner excerpt · scripts/verify_code.py (reported line 123)May include surrounding context.

python
print(f"  命令: {test_command}")
        print("\n建议:")
        print("  1. 检查文件/目录权限")
        print("  2. 尝试使用 sudo (Linux/macOS)")
        print("  3. 以管理员身份运行 (Windows)")
        return False
    except Exception as e:

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
89% confidence
Finding

When a permission error occurs, the tool recommends retrying with sudo or administrator privileges without warning about the security implications. In a skill that already executes user-supplied commands, encouraging privilege escalation increases the chance that unsafe or overly broad commands will be rerun with elevated rights, amplifying any accidental or malicious system impact.

Content

No source excerpt is available for this finding.