Back to skill

Security audit

元信 yotta-verify

Security checks for vulnerabilities and agentic risk

Overview

This appears to be a real local security scanner, but it also installs itself into agent skill directories and has fail-open scan exclusions that can weaken the trust claims users may rely on.

Install only if you are comfortable with it adding a persistent agent skill and pre-install hook to your skill directory. Treat its verdicts and audited badges as advisory, not proof of safety, especially for packages with runtime code in skipped directories, large source files, or copied scanner rule data.

Vulnerability Patterns
  • 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
  • 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)

T09 · Insecure Skill Coding Practices

Error
Location
scripts/yotta_verify.py:126
Finding

Public signature file permits attacker-controlled test files to bypass scanning

Content
View full analysis

Vulnerability Details

File Location: scripts/yotta_verify.py:126-133, 190-220
Vulnerability Type: Trust-classification bypass
Risk Level: High

Complete Code Snippet

python
def has_published_signature_data(root):
    """Whether the target package contains published signature data."""
    for name in SIGNATURE_DATA_DIGESTS:
        p = Path(root) / "scripts" / name
        if p.is_file() and is_signature_data("scripts/" + name, p):
            return True
    return False
python
def walk_files(root, base="", trusted_tests=None, scan_root=None):
    out = []
    if scan_root is None:
        scan_root = root
        trusted_tests = has_published_signature_data(scan_root)

    try:
        entries = sorted(root.iterdir())
    except OSError:
        return out

    for entry in entries:
        if entry.name in SKIP_DIRS:
            continue

        rel = entry.name if not base else base + "/" + entry.name
        if entry.is_dir():
            out.extend(walk_files(entry, rel, trusted_tests, scan_root))
        elif entry.is_file():
            try:
                size = entry.stat().st_size
            except OSError:
                continue

            if size > MAX_FILE_SIZE:
                continue

            if is_signature_data(rel, entry):
                continue

            if trusted_tests and entry.name.startswith("test_") and entry.name.endswith(".py"):
                continue

            if is_text_file(entry.name):
                out.append((entry, rel))

Technical Analysis

The scanner treats the presence of a known rule-table file as evidence that the entire target package is trusted to contain test fixtures. This trust decision is based only on:

  1. A predictable path under scripts/.
  2. A SHA-256 digest of publicly distributed file content.

A digest verifies content identity but does not authenticate the package or its author. An untrusted package author can copy an unchanged published rule ...[truncated 1803 chars]

Remediation
View remediation

Remediation Suggestions

  1. Remove the blanket test_*.py exclusion when scanning externally supplied packages.
  2. Treat test files as executable source because package code can import them at runtime.
  3. Do not use a public content hash as proof of package provenance.
  4. If first-party fixture exclusions are necessary, require an authenticated package signature that covers the complete package manifest and every shipped file.
  5. Resolve package entry points and import references, and never exclude a file reachable from production code.
  6. Include all exclusions in the generated report and make security-relevant exclusions produce at least a review-required verdict.
  7. Add regression tests using a package that contains a valid copied signature file and a malicious test_*.py module referenced by its runtime entry point.

T09 · Insecure Skill Coding Practices

Error
Location
scripts/yotta_verify.py:59
Finding

Attacker-controlled directory names and oversized source files evade security analysis

Content
View full analysis

Vulnerability Details

File Location: scripts/yotta_verify.py:59-63, 199-214, 246-259
Vulnerability Type: Fail-open scan exclusion
Risk Level: High

Complete Code Snippet

python
SKIP_DIRS = {
    "venv", "node_modules", ".git", "__pycache__", ".mypy_cache", ".tox",
    "dist", "build", ".egg-info", ".venv", ".idea", ".vscode", ".tmp",
}
python
for entry in entries:
    if entry.name in SKIP_DIRS:
        continue

    rel = entry.name if not base else base + "/" + entry.name
    if entry.is_dir():
        out.extend(walk_files(entry, rel, trusted_tests, scan_root))
    elif entry.is_file():
        try:
            size = entry.stat().st_size
        except OSError:
            continue

        if size > MAX_FILE_SIZE:
            continue

        if is_signature_data(rel, entry):
            continue

        if trusted_tests and entry.name.startswith("test_") and entry.name.endswith(".py"):
            continue

        if is_text_file(entry.name):
            out.append((entry, rel))
python
while stack:
    cur = stack.pop()
    try:
        entries = sorted(cur.iterdir())
    except OSError:
        continue

    for entry in entries:
        if entry.name in SKIP_DIRS:
            continue
        if entry.is_dir():
            stack.append(entry)
        elif entry.is_file():
            rel = str(entry.relative_to(root)).replace("\\", "/")
            candidates.append((entry, rel))

Technical Analysis

The scanner recursively ignores directories based only on their basename. The ignored set includes locations such as dist, build, and node_modules, which may contain the actual runtime entry point or executable code of a distributed package.

The same path exclusions are applied both to textual scanning and to opaque executable discovery. Therefore, placing code or a binary payload inside an excluded directory prevents both analysis mechanisms from observing it.

Text files larger than `MAX_FILE_SIZ ...[truncated 2003 chars]

Remediation
View remediation

Remediation Suggestions

  1. Do not unconditionally skip executable package directories based on basename.
  2. Parse relevant package manifests and always scan declared runtime entry points, executable scripts, and transitively referenced local modules.
  3. Distinguish environmental dependency trees from files shipped as part of the target package. Scan packaged dist, build, and vendored runtime content.
  4. Apply opaque-file detection before directory exclusions, or emit a review-required finding for every excluded executable or binary file.
  5. Replace silent size-based omission with bounded or streaming inspection. If full inspection is impossible, record the file and fail closed with a review-required verdict.
  6. Include the path, size, exclusion reason, and whether the file is reachable from a package entry point in reports.
  7. Add regression tests covering executable files in every skipped directory and oversized source files with recognized text extensions.
Vulnerability Patterns
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
  • Tool MisuseTool Parameter Abuse, Chaining Abuse, Unsafe Defaults
  • 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
Findings (60)

Tp4

High
Category
MCP Tool Poisoning
Confidence
99% confidence
Finding

The second TP4 report describes the same core issue: the skill presents itself as a non-mutating pre-install auditor but allegedly performs installation and filesystem modification actions unrelated to that role. When a security product misrepresents its behavior, it creates elevated social-engineering risk because operators are more likely to grant trust and run it with sensitive privileges.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
99% confidence
Finding

The second TP4 report describes the same core issue: the skill presents itself as a non-mutating pre-install auditor but allegedly performs installation and filesystem modification actions unrelated to that role. When a security product misrepresents its behavior, it creates elevated social-engineering risk because operators are more likely to grant trust and run it with sensitive privileges.

Content

No source excerpt is available for this finding.

Ae1

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

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

md
(yotta-security-audit)共用(scripts/verify_rules.py 为同步副本,勿手改)。

Ae1

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

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

md
python3 scripts/yotta_verify.py scan ./some-skill

Ae1

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

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

md
python3 scripts/yotta_verify.py scan ./some-skill

Ae1

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

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

md
python3 scripts/yotta_verify.py scan ./some-skill

Ae1

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

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

md
python3 scripts/yotta_verify.py scan ./some-skill

Description-Behavior Mismatch

High
Category
Not specified by scanner
Confidence
98% confidence
Finding

The script performs broad filesystem installation behavior—creating directories, copying package contents, and deleting selected residual files—despite the skill metadata claiming the skill only performs deterministic static scanning and reporting without installation or modification. This mismatch is dangerous because users may grant trust and permissions based on the stated scanner-only purpose, while the code actually persists itself into agent skill directories and alters the local environment.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

High
Category
Not specified by scanner
Confidence
98% confidence
Finding

The script deletes and writes files under user-supplied or auto-resolved skill directories via rm -rf, mkdir -p, and cp -RP, which exceeds the skill's declared verifier-only/static-scan purpose. Even though there are some safety checks (for symlinks and self-install), this still creates a trust-boundary mismatch: a user expecting a passive verifier could unintentionally run an installer that mutates multiple filesystem locations and removes existing content.

Content

No source excerpt is available for this finding.

Credential Access

High
Category
Privilege Escalation
Confidence
60% confidence
Finding

Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.

Content

Scanner excerpt · references/injection-patterns.md (reported line 43)May include surrounding context.

md
要求把上下文 / 记忆 / 环境变量 / 密钥传往远端地址。典型形态:

- send-memory-and-env-to-url 类(把记忆与 .env 发往某地址)
- 中文外传类(把上下文 / 环境变量 / 密钥「传往」某处)
- 读取 .env 后外传类(先读再传)

Credential Access

High
Category
Privilege Escalation
Confidence
60% confidence
Finding

Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.

Content

Scanner excerpt · references/injection-patterns.md (reported line 45)May include surrounding context.

md
要求把上下文 / 记忆 / 环境变量 / 密钥传往远端地址。典型形态:

- send-memory-and-env-to-url 类(把记忆与 .env 发往某地址)
- 中文外传类(把上下文 / 环境变量 / 密钥「传往」某处)
- 读取 .env 后外传类(先读再传)

Credential Access

High
Category
Privilege Escalation
Confidence
60% confidence
Finding

Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.

Content

Scanner excerpt · scripts/verify_rules.py (reported line 126)May include surrounding context.

python
要求把上下文 / 记忆 / 环境变量 / 密钥传往远端地址。典型形态:

- send-memory-and-env-to-url 类(把记忆与 .env 发往某地址)
- 中文外传类(把上下文 / 环境变量 / 密钥「传往」某处)
- 读取 .env 后外传类(先读再传)

Credential Access

High
Category
Privilege Escalation
Confidence
60% confidence
Finding

Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.

Content

Scanner excerpt · scripts/verify_rules.py (reported line 283)May include surrounding context.

python
要求把上下文 / 记忆 / 环境变量 / 密钥传往远端地址。典型形态:

- send-memory-and-env-to-url 类(把记忆与 .env 发往某地址)
- 中文外传类(把上下文 / 环境变量 / 密钥「传往」某处)
- 读取 .env 后外传类(先读再传)

Credential Access

High
Category
Privilege Escalation
Confidence
70% confidence
Finding

Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.

Content

Scanner excerpt · scripts/verify_rules.py (reported line 139)May include surrounding context.

python
r"(?i)osascript[^\n;]{0,120}(?:password|passphrase)",
         "macOS 弹窗套取密码", 90),
    Rule("CRE-002", "CredentialTheft", "critical",
         r"(?i)security\s+find-generic-password|keychain",
         "访问 macOS keychain 凭据", 85),
    Rule("CRE-003", "CredentialTheft", "high",
         r"(?i)(?:id_rsa|id_ed25519|id_dsa)\.?(?:pub)?\b",

Credential Access

High
Category
Privilege Escalation
Confidence
70% confidence
Finding

Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.

Content

Scanner excerpt · scripts/verify_rules.py (reported line 140)May include surrounding context.

python
r"(?i)osascript[^\n;]{0,120}(?:password|passphrase)",
         "macOS 弹窗套取密码", 90),
    Rule("CRE-002", "CredentialTheft", "critical",
         r"(?i)security\s+find-generic-password|keychain",
         "访问 macOS keychain 凭据", 85),
    Rule("CRE-003", "CredentialTheft", "high",
         r"(?i)(?:id_rsa|id_ed25519|id_dsa)\.?(?:pub)?\b",

Tool Parameter Abuse

High
Category
Tool Misuse
Confidence
90% confidence
Finding

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).

Content

Scanner excerpt · scripts/verify_rules.py (reported line 189)May include surrounding context.

python
# ── PrivilegeEscalation 权限提升 ──────────────────────────────────────
    Rule("PRI-001", "PrivilegeEscalation", "high",
         r"(?i)\bchmod\s+[0-7]*[267][0-7]{2}\b",
         "chmod 设置 setuid/setgid/sticky 权限位", 85),
    Rule("PRI-002", "PrivilegeEscalation", "high",
         r"(?i)\bchmod\s+777\b",
         "chmod 777 全权限", 70),

Credential Access

High
Category
Privilege Escalation
Confidence
60% confidence
Finding

Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.

Content

Scanner excerpt · scripts/verify_rules.py (reported line 347)May include surrounding context.

python
".md", ".txt", ".yaml", ".yml", ".json", ".toml", ".ini", ".cfg",
    ".rb", ".go", ".rs", ".java", ".c", ".cpp", ".h", ".hpp",
    ".html", ".css", ".xml", ".svg", ".plist", ".ps1", ".bat", ".cmd",
    ".env", ".conf", ".properties", ".gradle",
}
DOTFILE_NAMES = {
    ".env", ".env.example", ".netrc", ".pgpass", ".bashrc", ".zshrc",

Credential Access

High
Category
Privilege Escalation
Confidence
60% confidence
Finding

Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.

Content

Scanner excerpt · scripts/yotta_verify.py (reported line 69)May include surrounding context.

python
".md", ".txt", ".yaml", ".yml", ".json", ".toml", ".ini", ".cfg",
    ".rb", ".go", ".rs", ".java", ".c", ".cpp", ".h", ".hpp",
    ".html", ".css", ".xml", ".svg", ".plist", ".ps1", ".bat", ".cmd",
    ".env", ".conf", ".properties", ".gradle",
}
DOTFILE_NAMES = {
    ".env", ".env.example", ".netrc", ".pgpass", ".bashrc", ".zshrc",

Credential Access

High
Category
Privilege Escalation
Confidence
60% confidence
Finding

Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.

Content

Scanner excerpt · scripts/yotta_verify.py (reported line 72)May include surrounding context.

python
".md", ".txt", ".yaml", ".yml", ".json", ".toml", ".ini", ".cfg",
    ".rb", ".go", ".rs", ".java", ".c", ".cpp", ".h", ".hpp",
    ".html", ".css", ".xml", ".svg", ".plist", ".ps1", ".bat", ".cmd",
    ".env", ".conf", ".properties", ".gradle",
}
DOTFILE_NAMES = {
    ".env", ".env.example", ".netrc", ".pgpass", ".bashrc", ".zshrc",

Credential Access

High
Category
Privilege Escalation
Confidence
80% confidence
Finding

Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.

Content

Scanner excerpt · scripts/verify_rules.py (reported line 344)May include surrounding context.

python
".env", ".conf", ".properties", ".gradle",
}
DOTFILE_NAMES = {
    ".env", ".env.example", ".netrc", ".pgpass", ".bashrc", ".zshrc",
    ".profile", ".bash_profile", ".npmrc", ".gitconfig",
}
MAX_FILE_SIZE = 1_000_000

Credential Access

High
Category
Privilege Escalation
Confidence
80% confidence
Finding

Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.

Content

Scanner excerpt · scripts/verify_rules.py (reported line 441)May include surrounding context.

python
".env", ".conf", ".properties", ".gradle",
}
DOTFILE_NAMES = {
    ".env", ".env.example", ".netrc", ".pgpass", ".bashrc", ".zshrc",
    ".profile", ".bash_profile", ".npmrc", ".gitconfig",
}
MAX_FILE_SIZE = 1_000_000

Credential Access

High
Category
Privilege Escalation
Confidence
80% confidence
Finding

Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.

Content

Scanner excerpt · scripts/yotta_verify.py (reported line 72)May include surrounding context.

python
".env", ".conf", ".properties", ".gradle",
}
DOTFILE_NAMES = {
    ".env", ".env.example", ".netrc", ".pgpass", ".bashrc", ".zshrc",
    ".profile", ".bash_profile", ".npmrc", ".gitconfig",
}
MAX_FILE_SIZE = 1_000_000

Credential Access

High
Category
Privilege Escalation
Confidence
70% confidence
Finding

Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.

Content

Scanner excerpt · scripts/yotta_verify.py (reported line 73)May include surrounding context.

python
}
DOTFILE_NAMES = {
    ".env", ".env.example", ".netrc", ".pgpass", ".bashrc", ".zshrc",
    ".profile", ".bash_profile", ".npmrc", ".gitconfig",
}
MAX_FILE_SIZE = 1_000_000
MAX_LINE_LEN = verify_rules.MAX_LINE_LEN

Description-Behavior Mismatch

Medium
Category
Not specified by scanner
Confidence
81% confidence
Finding

The manifest context and README repeatedly frame yotta-verify as a deterministic static scanner that does not install packages or perform side effects beyond reporting. However, the same file documents npx and install.sh workflows that install the skill into agent skill directories, which is behavior beyond the narrowly described verifier role. This is a semantic scope mismatch in the documented behavior presented to users.

Content

No source excerpt is available for this finding.

Skill Enumeration

Medium
Category
Agent Snooping
Confidence
85% confidence
Finding

Skill enumerates or reads other installed skills. Access to other skills' SKILL.md files or the skills directory reveals prompt instructions, capabilities, and secrets that should be invisible to peer skills.

Content

Scanner excerpt · README.md (reported line 102)May include surrounding context.

text
# Optional China mirror: npm config set registry https://registry.npmmirror.com
npx -y @yottameta/yotta-verify@0.3.4 --agent <agent-name>      # install to the agent's default user-level skills dir
npx -y @yottameta/yotta-verify@0.3.4 --dir <your-skills-dir>   # point to the skills dir itself (e.g. ~/.codex/skills)

Static analysis

No suspicious patterns detected.