Back to skill

Security audit

LYGO Pure-Data Witness

Security checks for vulnerabilities and agentic risk

Overview

The skill is mostly coherent and consent-gated, but its URL-fetch safety claims are stronger than the code enforces and its install command runs a mutable remote package.

Review this before installing. Prefer a pinned installer version, run it in a low-privilege environment, and use URL fetching only for trusted public HTTPS URLs. Do not use it to archive private dashboards, credential-bearing pages, cookies, API keys, or internal network resources, and review local export packs before sharing them anywhere.

Vulnerability Patterns
  • 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
  • Remote Payload Retrieval and ExecutionFetches external code whose behavior can change after review
Findings (2)

T09 · Insecure Skill Coding Practices

Error
Location
scripts/pure_data_witness.py:108
Finding

SSRF Protection Can Be Bypassed Through DNS Resolution and Redirects

Content
View full analysis
str | None: h = (host or "").lower().strip(".") if not h: return "empty_host" if h in BLOCK_HOSTS: return f"blocked_host:{h}" for suf in BLOCK_HOST_SUFFIXES: if h.endswith(suf) or h == suf.lstrip("."): return f"blocked_suffix:{suf}" # literal IP? try: ip = ipaddress.ip_address(h) if ( ip.is_private or ip.is_loopback or ip.is_link_local or ip.is_reserved or ip.is_multicast ): return f"blocked_ip_class:{ip}" except ValueError: pass return None ``` ```python def fetch_url(url: str, out_dir: Path, *, skip_content_gate: bool = False) -> dict: # Safety: scheme/host/SSRF before any request try: from pure_data_safety import check_url, check_content # type: ignore except ImportError: from pure_data_safety import check_url, check_content # type: ignore ugate = check_url(url) if not ugate.get("ok"): raise SystemExit(json.dumps({"error": "url_safety_reject", "gate": ugate}, indent=2)) req = urllib.request.Request(url, headers={"User-Agent": UA}) captured = utc_now() try: with urllib.request.urlopen(req, timeout=30) as resp: status = resp.status ctype = resp.headers.get("Content-Type", "application/octet-stream") data = resp.read(MAX_FETCH + 1) ``` ### Technical Analysis The URL gate rejects explicit private, loopback, link-local, reserved, and metadata IP addresses. However, it only applies `ipaddress.ip_address()` to the textual hostname supplied in the URL. For ordinary DNS hostnames, the code ...[truncated 2501 chars]
Remediation
View remediation

T08 · Insecure Dependencies

Warning
Location
SKILL.md:114
Finding

Installation Instructions Execute an Unpinned Mutable Package Release

Content
View full analysis
Remediation
View remediation
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Supply ChainUnpinned Dependencies, External Script Fetching, Obfuscated Code
  • Excessive AgencyUnrestricted Tool Access, Autonomous Decision Making, Scope Creep
  • Trigger AbuseOverly Broad Trigger, Shadow Command Trigger, Keyword Baiting Trigger
  • Behavioral ASTexec() Call, eval() Call, Dynamic Import
Findings (12)

Tp4

High
Category
MCP Tool Poisoning
Confidence
98% confidence
Finding

The declared description says this skill performs Pure-Data registration, archiving, optional network fetching, ledger rebuilding, and chart submission workflows. The actual code chunk does none of those operational tasks. Instead, it is a smoke-test/security regression checker for the repository itself. Its primary purpose is code auditing and validation, not registering pages or interacting with any portal, ledger, archive, or network resource. While the self-check references files related to the declared system and verifies consent-gating markers, that is only indirect validation of other components, not execution of the described functionality. Therefore the description does not accurately represent what this code chunk actually does.

Content

No source excerpt is available for this finding.

Anti-Refusal Statement

High
Category
Anti-Refusal
Confidence
80% confidence
Finding

Skill instructs the agent to omit warnings, disclaimers, or ethical commentary. Stripping safety caveats hides risk from the user and is a common jailbreak preamble.

Content

Scanner excerpt · references/SKILLSPECTOR_AUDIT.md (reported line 44)May include surrounding context.

md
| Network | **false** by default; HTTPS GET only with `--i-authorize-fetch` |
| Subprocess / shell | **false** in skill CLI |

## Finding: HF export without warning (prior)

| Item | Detail |
|------|--------|

Cloud Metadata Access

High
Category
Server-Side Request Forgery
Confidence
90% confidence
Finding

Code accesses a cloud instance metadata endpoint (e.g. 169.254.169.254). A single request can return temporary IAM credentials, making this a high-value SSRF target for credential theft.

Content

Scanner excerpt · scripts/pure_data_safety.py (reported line 22)May include surrounding context.

python
)
BLOCK_HOSTS = {
    "localhost",
    "metadata.google.internal",
    "169.254.169.254",
}

Cloud Metadata Access

High
Category
Server-Side Request Forgery
Confidence
90% confidence
Finding

Code accesses a cloud instance metadata endpoint (e.g. 169.254.169.254). A single request can return temporary IAM credentials, making this a high-value SSRF target for credential theft.

Content

Scanner excerpt · scripts/pure_data_safety.py (reported line 23)May include surrounding context.

python
BLOCK_HOSTS = {
    "localhost",
    "metadata.google.internal",
    "169.254.169.254",
}

# High-risk TLDs / patterns often used for throwaway malware (heuristic)

Undeclared Tool Scope

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.

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
88% confidence
Finding

The trigger terms include broad phrases like 'witness,' 'archive,' and 'use the Data Vault register portal,' which could cause the skill to activate on common user requests unrelated to this specific workflow. Over-broad activation increases the chance that an agent invokes file/network-affecting guidance in the wrong context, which is risky for a skill that can fetch URLs and write outputs when consent flags are present.

Content

No source excerpt is available for this finding.

Rp1

Medium
Category
MCP Rug Pull
Confidence
91% confidence
Finding

Using npx clawhub@latest install ... pulls and executes the latest published package version at runtime, which creates a supply-chain risk if the package is compromised or a breaking/malicious release is published. In an agent skill context, install instructions are especially sensitive because they normalize execution of unpinned remote code.

Content

No source excerpt is available for this finding.

Autonomous Decision Making

Medium
Category
Excessive Agency
Confidence
75% confidence
Finding

Skill enables autonomous high-impact decisions without human-in-the-loop verification. Critical operations (destructive commands, financial transactions, data deletion) should require explicit user confirmation.

Content

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

--i-consent --i-authorize-hf-export

text

**Avoid until flags present:** bare `pure_data_witness.py fetch` or `all --url` without consent (blocked in v1.3.0).

Stack (when `LYGO_STACK_ROOT` set):

Ae4

Medium
Category
analysis-evasion
Confidence
80% confidence
Finding

Suspicious Unicode normalization or mixed-script content

Content

No source excerpt is available for this finding.

Ae4

Medium
Category
analysis-evasion
Confidence
80% confidence
Finding

Suspicious Unicode normalization or mixed-script content

Content

No source excerpt is available for this finding.

Autonomous Decision Making

Medium
Category
Excessive Agency
Confidence
75% confidence
Finding

Skill enables autonomous high-impact decisions without human-in-the-loop verification. Critical operations (destructive commands, financial transactions, data deletion) should require explicit user confirmation.

Content

Scanner excerpt · references/SKILLSPECTOR_AUDIT.md (reported line 23)May include surrounding context.

md
| Item | Detail |
|------|--------|
| Reported | `all` chained fetch/digest + egg + claims + ledger without confirmation |
| Fix | Help text WARNINGs + mandatory `--i-confirm-chain` |
| Guidance | Prefer stepwise: digest/fetch → egg → continuum-claims → ledger |

Ae4

Medium
Category
analysis-evasion
Confidence
80% confidence
Finding

Suspicious Unicode normalization or mixed-script content

Content

No source excerpt is available for this finding.

Static analysis

No suspicious patterns detected.