Back to skill

Security audit

Skill Sign

Security checks for vulnerabilities and agentic risk

Overview

This skill is mostly coherent, but its verifier can read outside the target skill through symlinks and its signatures may exclude executable runtime content.

Install only if you understand these limits: use it on trusted or pre-inspected skill directories, avoid verifying packages that contain symlinks, and do not treat a passing signature as proof that excluded dependency or virtualenv content is unchanged.

Vulnerability Patterns
  • Unauthorized Access and Privilege EscalationObtains permissions beyond the task's legitimate needs
  • 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
Findings (2)

T05 · Unauthorized Access and Privilege Escalation

Warning
Location
scripts/_lib.py:111
Finding

Verification Follows File Symlinks Outside the Target Skill Directory

Content
View full analysis
list[str]: """Return sorted list of relative paths of files to be hashed.""" skill_dir = Path(skill_dir).resolve() result = [] for root, dirs, files in os.walk(skill_dir): # In-place prune dirs[:] = sorted(d for d in dirs if d not in EXCLUDE_DIRS and not d.startswith("._")) for fname in sorted(files): full = Path(root) / fname rel = str(full.relative_to(skill_dir)).replace("\\", "/") if not should_exclude(rel): result.append(rel) return sorted(result) ``` ```python def compute_content_hash(skill_dir: Path, file_list: list[str]) -> str: """SHA-256 over (sorted) [rel_path:content\n] for each file. Streamed.""" h = hashlib.sha256() skill_dir = Path(skill_dir) for rel in file_list: full = skill_dir / rel h.update(rel.encode("utf-8")) h.update(b":") with open(full, "rb") as f: while True: chunk = f.read(65536) if not chunk: break h.update(chunk) h.update(b"\n") return "sha256:" + h.hexdigest() ``` ### Technical Analysis `collect_files()` includes file symlinks in the list of content to hash. The later `open(full, "rb")` operation follows those symlinks without validating that the resolved target remains beneath `skill_dir`. Consequently, verification of an untrusted Skill can read any file accessible to the user running the verifier. This exceeds the minimum filesystem access required to authenticate files contained within a Skill directory. The verifier does not directly print the external file contents. However, when the computed hash differ ...[truncated 1512 chars]
Remediation
View remediation

T09 · Insecure Skill Coding Practices

Warning
Location
scripts/_lib.py:94
Finding

Executable Runtime Content Is Excluded from Signature Coverage

Content
View full analysis
bool: parts = rel_path.replace("\\", "/").split("/") for p in parts: if p in EXCLUDE_DIRS: return True if p in EXCLUDE_FILES: return True if p.startswith("._"): # macOS metadata return True _, ext = os.path.splitext(rel_path) if ext.lower() in EXCLUDE_EXTS: return True return False def collect_files(skill_dir: Path) -> list[str]: """Return sorted list of relative paths of files to be hashed.""" skill_dir = Path(skill_dir).resolve() result = [] for root, dirs, files in os.walk(skill_dir): # In-place prune dirs[:] = sorted(d for d in dirs if d not in EXCLUDE_DIRS and not d.startswith("._")) for fname in sorted(files): full = Path(root) / fname rel = str(full.relative_to(skill_dir)).replace("\\", "/") if not should_exclude(rel): result.append(rel) return sorted(result) ``` ### Technical Analysis The signature covers only the files returned by `collect_files()`. Entire directories such as `node_modules`, `.venv`, and `venv`, along with Python bytecode files, are excluded unconditionally. These locations can contain executable code loaded by a Skill at runtime. Because excluded content is not represented in the content hash or signed metadata, it can be added or modified after signing without invalidating the signature. This creates a discrepancy between the declared integrity property—detecting whether a Sk ...[truncated 1421 chars]
Remediation
View remediation
Vulnerability Patterns
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
  • Rogue AgentSelf-Modification, Session Persistence
  • MCP Least PrivilegeUnderdeclared Capability, Wildcard Permission, Missing Permission Declaration
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
Findings (11)

Undeclared Tool Scope

Medium
Category
MCP Least Privilege
Confidence
88% confidence
Finding

The skill describes scripts that read environment variables, traverse directories, write key material and signature files, and are invoked via shell commands, but the manifest does not declare any tool scope or allowed-tools constraints. That creates an avoidable transparency and least-privilege gap: an agent may execute broader filesystem or shell actions than a reviewer expects when using this skill.

Content

No source excerpt is available for this finding.

Sudo/Root Execution

Medium
Category
Privilege Escalation
Confidence
80% confidence
Finding

Commands invoke sudo or root privileges. Verify this elevated access is necessary and justified.

Content

Scanner excerpt · scripts/_lib.py (reported line 50)May include surrounding context.

python
# ============================================================

def write_secret_file(path: Path, data: bytes) -> None:
    """Write binary data and set chmod 600. Parent dir gets chmod 700."""
    path.parent.mkdir(parents=True, exist_ok=True)
    try:
        os.chmod(path.parent, 0o700)

Session Persistence

Medium
Category
Rogue Agent
Confidence
60% confidence
Finding

Skill establishes unauthorized persistence across sessions via cron jobs, startup scripts, or state files. Session persistence allows an attacker to maintain access beyond the current interaction.

Content

Scanner excerpt · scripts/init.py (reported line 6)May include surrounding context.

python
init.py — generate Ed25519 keypair for skill-sign.

Usage:
    python3 init.py                  # Interactive; refuses to overwrite existing
    python3 init.py --force          # Overwrite existing keypair (DANGEROUS)
    python3 init.py --seed-from-stdin  # Use 32 bytes from stdin (deterministic)

Sudo/Root Execution

Medium
Category
Privilege Escalation
Confidence
80% confidence
Finding

Commands invoke sudo or root privileges. Verify this elevated access is necessary and justified.

Content

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

md
python3 init.py --seed-from-stdin  # Use 32 bytes from stdin (deterministic)

Output:
    ~/.config/skill-sign/private.key       (32-byte Ed25519 seed, chmod 600)
    ~/.config/skill-sign/public.key        (32-byte Ed25519 pubkey, chmod 644)
    ~/.config/skill-sign/public.key.txt    (base64 short form for copy-paste)

Sudo/Root Execution

Medium
Category
Privilege Escalation
Confidence
80% confidence
Finding

Commands invoke sudo or root privileges. Verify this elevated access is necessary and justified.

Content

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

md
python3 init.py --seed-from-stdin  # Use 32 bytes from stdin (deterministic)

Output:
    ~/.config/skill-sign/private.key       (32-byte Ed25519 seed, chmod 600)
    ~/.config/skill-sign/public.key        (32-byte Ed25519 pubkey, chmod 644)
    ~/.config/skill-sign/public.key.txt    (base64 short form for copy-paste)

Sudo/Root Execution

Medium
Category
Privilege Escalation
Confidence
80% confidence
Finding

Commands invoke sudo or root privileges. Verify this elevated access is necessary and justified.

Content

Scanner excerpt · scripts/_lib.py (reported line 50)May include surrounding context.

python
python3 init.py --seed-from-stdin  # Use 32 bytes from stdin (deterministic)

Output:
    ~/.config/skill-sign/private.key       (32-byte Ed25519 seed, chmod 600)
    ~/.config/skill-sign/public.key        (32-byte Ed25519 pubkey, chmod 644)
    ~/.config/skill-sign/public.key.txt    (base64 short form for copy-paste)

Sudo/Root Execution

Medium
Category
Privilege Escalation
Confidence
80% confidence
Finding

Commands invoke sudo or root privileges. Verify this elevated access is necessary and justified.

Content

Scanner excerpt · scripts/_lib.py (reported line 90)May include surrounding context.

python
python3 init.py --seed-from-stdin  # Use 32 bytes from stdin (deterministic)

Output:
    ~/.config/skill-sign/private.key       (32-byte Ed25519 seed, chmod 600)
    ~/.config/skill-sign/public.key        (32-byte Ed25519 pubkey, chmod 644)
    ~/.config/skill-sign/public.key.txt    (base64 short form for copy-paste)

Sudo/Root Execution

Medium
Category
Privilege Escalation
Confidence
80% confidence
Finding

Commands invoke sudo or root privileges. Verify this elevated access is necessary and justified.

Content

Scanner excerpt · scripts/init.py (reported line 11)May include surrounding context.

python
python3 init.py --seed-from-stdin  # Use 32 bytes from stdin (deterministic)

Output:
    ~/.config/skill-sign/private.key       (32-byte Ed25519 seed, chmod 600)
    ~/.config/skill-sign/public.key        (32-byte Ed25519 pubkey, chmod 644)
    ~/.config/skill-sign/public.key.txt    (base64 short form for copy-paste)

Sudo/Root Execution

Medium
Category
Privilege Escalation
Confidence
80% confidence
Finding

Commands invoke sudo or root privileges. Verify this elevated access is necessary and justified.

Content

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

python
python3 init.py --seed-from-stdin  # Use 32 bytes from stdin (deterministic)

Output:
    ~/.config/skill-sign/private.key       (32-byte Ed25519 seed, chmod 600)
    ~/.config/skill-sign/public.key        (32-byte Ed25519 pubkey, chmod 644)
    ~/.config/skill-sign/public.key.txt    (base64 short form for copy-paste)

Sudo/Root Execution

Medium
Category
Privilege Escalation
Confidence
80% confidence
Finding

Commands invoke sudo or root privileges. Verify this elevated access is necessary and justified.

Content

Scanner excerpt · scripts/_lib.py (reported line 68)May include surrounding context.

python
Output:
    ~/.config/skill-sign/private.key       (32-byte Ed25519 seed, chmod 600)
    ~/.config/skill-sign/public.key        (32-byte Ed25519 pubkey, chmod 644)
    ~/.config/skill-sign/public.key.txt    (base64 short form for copy-paste)

WARNING: If you lose private.key, all signatures become un-revocable.

Sudo/Root Execution

Medium
Category
Privilege Escalation
Confidence
80% confidence
Finding

Commands invoke sudo or root privileges. Verify this elevated access is necessary and justified.

Content

Scanner excerpt · scripts/init.py (reported line 12)May include surrounding context.

python
Output:
    ~/.config/skill-sign/private.key       (32-byte Ed25519 seed, chmod 600)
    ~/.config/skill-sign/public.key        (32-byte Ed25519 pubkey, chmod 644)
    ~/.config/skill-sign/public.key.txt    (base64 short form for copy-paste)

WARNING: If you lose private.key, all signatures become un-revocable.