Back to skill

Security audit

evidence-anchor

Security checks for vulnerabilities and agentic risk

Overview

The skill is marked suspicious because scanners found that report-provided file references can escape the selected folder and be treated as valid evidence.

Consider the reported folder-boundary weakness and unclear tool scope before installing. The Skillspector scan was partial: although it scanned all 12 listed components, several local references could not be resolved, so the evidence is incomplete.

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 (1)

T09 · Insecure Skill Coding Practices

Warning
Location
scripts/anchor.py
Finding

Report-controlled anchors can read files outside the selected root

Content
View full analysis

Impact

A crafted report causes unauthorized reads of extension-matching files accessible to the process outside the selected tree. Output reveals target existence and line counts. File contents are not printed or transmitted by the inspected code; arbitrary content exfiltration and code execution are not established.

Vulnerability Patterns
  • Behavioral ASTexec() Call, eval() Call, Dynamic Import
  • MCP Least PrivilegeUnderdeclared Capability, Wildcard Permission, Missing Permission Declaration
  • 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 (5)

Skill declares no tool scope ('permissions' or 'allowed-tools') but code capabilities were detected: file_write, shell.

Medium
Category
MCP Least Privilege
Confidence
70% confidence
Finding

Without declared permissions the skill's intent is opaque and cannot be validated.

Content

No source excerpt is available for this finding.

subprocess module call

Medium
Category
Dangerous Code Execution
Confidence
70% confidence
Finding

subprocess module calls execute external commands. Without careful input validation, this enables command injection.

Content

Scanner excerpt · demo/run_demo.py (reported line 40)May include surrounding context.

python
print("临时树:", root)
        print("报告:", report)
        print("\n执行 check:")
        p = subprocess.run([sys.executable, os.path.join(PKG, "scripts", "anchor.py"),
                            "check", report, "--root", root],
                           capture_output=True, text=True, encoding="utf-8")
        for l in (p.stdout + p.stderr).strip().split("\n"):

Anchors outside the selected tree can be read and accepted as valid evidence.

Medium
Category
Excessive Agency
Confidence
99% confidence
Finding

Report-controlled paths are joined and normalized without verifying containment: ../ paths, absolute paths, and in-tree symlinks can resolve outside the selected root. The checker then reads those files and can label their anchors OK, violating its explicit tree boundary and allowing false evidence acceptance plus disclosure of file existence and line counts, though it does not directly print file contents.

Content

No source excerpt is available for this finding.

subprocess module call

Medium
Category
Dangerous Code Execution
Confidence
70% confidence
Finding

subprocess module calls execute external commands. Without careful input validation, this enables command injection.

Content

Scanner excerpt · tests/run_golden.py (reported line 61)May include surrounding context.

python
mk(root, "e.py", 20)
        rep = os.path.join(root, "rep.md")
        wr(rep, "好锚点 e.py:5\n坏锚点 gone.md:3\n")
        p = subprocess.run([sys.executable, os.path.join(PKG, "scripts", "anchor.py"),
                            "check", rep, "--root", root],
                           capture_output=True, text=True, encoding="utf-8")
        return p.returncode == 1, "退出码 %d" % p.returncode

subprocess module call

Medium
Category
Dangerous Code Execution
Confidence
70% confidence
Finding

subprocess module calls execute external commands. Without careful input validation, this enables command injection.

Content

Scanner excerpt · tests/run_golden.py (reported line 68)May include surrounding context.

python
if fn == "bad_root":
        rep = os.path.join(root, "rep.md")
        wr(rep, "x.py:1\n")
        p = subprocess.run([sys.executable, os.path.join(PKG, "scripts", "anchor.py"),
                            "check", rep, "--root", os.path.join(root, "nope")],
                           capture_output=True, text=True, encoding="utf-8")
        return p.returncode == 2, "退出码 %d" % p.returncode