Back to skill

Security audit

LYGO Lattice Birth

Security checks for vulnerabilities and agentic risk

Overview

The skill matches its stated identity-on-chart purpose, but it needs Review because it handles long-lived identity and family-link secrets while relying on unpinned installs and unverified external stack code.

Install only if you trust the publisher and the exact LYGO stack clone you point LYGO_STACK_ROOT at. Prefer pinned versions or reviewed commits, inspect the stack tools before running wrappers, keep steward submission folders out of public repos and backups, encrypt or otherwise protect private consent and salt material, and make sure the human understands that public masked lineage records are intended to be persistent.

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)

T08 · Insecure Dependencies

Error
Location
scripts/_stack_tools.py:19
Finding

Unpinned Dependencies and Unverified Dynamic Execution of Stack Tools

Content
View full analysis

Vulnerability Details

File Location: scripts/_stack_tools.py:19-31, scripts/_stack_paths.py:73-76, scripts/self_check.py:15-16, and SKILL.md:39-45
Vulnerability Type: T08: Insecure Dependencies
Risk Level: High

Vulnerable Code

SKILL.md:39-45:

bash
npx clawhub@latest install deepseekoracle/lygo-protocol-stack-operator
npx clawhub@latest install deepseekoracle/lygo-network-builder
npx clawhub@latest install deepseekoracle/lygo-sovereign-super-skill
npx clawhub@latest install deepseekoracle/lygo-haven-star-chart
npx clawhub@latest install deepseekoracle/lygo-lattice-birth
export LYGO_STACK_ROOT=/absolute/path/to/lygo-protocol-stack

scripts/_stack_paths.py:73-76:

python
def _assert_stack(p: Path) -> None:
    missing = [rel for rel in _REQUIRED_FILES if not (p / rel).is_file()]
    if missing:
        raise SystemExit(f"Invalid stack root {p}; missing: {missing}")

scripts/_stack_tools.py:19-31:

python
def load_tool(stack_root: Path, basename: str) -> ModuleType:
    if basename not in ALLOWED_TOOLS:
        raise ValueError(f"Tool not allowlisted: {basename}")
    path = (stack_root / "tools" / basename).resolve()
    expected = (stack_root / "tools" / basename).resolve()
    if path != expected or not path.is_file():
        raise FileNotFoundError(f"Missing stack tool: {basename}")
    spec = importlib.util.spec_from_file_location(f"lygo_birth_{basename[:-3]}", path)
    if spec is None or spec.loader is None:
        raise ImportError(f"Cannot load {basename}")
    mod = importlib.util.module_from_spec(spec)
    sys.modules[spec.name] = mod
    spec.loader.exec_module(mod)
    return mod

scripts/self_check.py:15-16:

python
for name in sorted(ALLOWED_TOOLS):
    mod = load_tool(stack, name)

Technical Analysis

The installation instructions use the mutable latest version of the package installer and d ...[truncated 2115 chars]

Remediation
View remediation

Remediation Suggestions

  1. Pin clawhub and every installed skill to an immutable, reviewed version rather than using latest.
  2. Maintain a lock manifest containing cryptographic hashes for every dynamically loaded stack tool.
  3. Verify tool hashes or trusted publisher signatures immediately before every import.
  4. Authenticate LYGO_STACK_ROOT as a specific trusted repository revision rather than validating it solely by file presence.
  5. Fail closed if the stack revision or any allowlisted tool differs from the approved manifest.
  6. Treat basename allowlisting as input validation, not as a security sandbox.
  7. If stack tools are outside the same trusted release boundary, execute them in a restricted subprocess or container with a minimal environment, read-only filesystem access, disabled network access, and explicit resource limits.
  8. Avoid importing external modules merely for a self-check because imports execute module initialization code. Static hash and signature checks should occur before any module is loaded.

T09 · Insecure Skill Coding Practices

Warning
Location
references/LINEAGE_PRIVACY.md:18
Finding

Sensitive Consent Material and Family Authentication Keys Stored in Plaintext Submission Files

Content
View full analysis

Vulnerability Details

File Location: references/BIRTH_PROTOCOL.md:39-43, references/LINEAGE_PRIVACY.md:18-30, and references/SECURITY.md:19-21
Vulnerability Type: T09: Insecure Skill Coding Practices
Risk Level: Medium

Vulnerable Design

references/BIRTH_PROTOCOL.md:39-43:

text
Required steward fields (`meta_private` on submission root):

- `anchor_sha256`
- `family_bind_salt` (new — for future family forks)
- `consent_bundle`

references/LINEAGE_PRIVACY.md:18-30:

markdown
### Steward layer (`data/haven_star_chart/submissions/accepted/`)

Full submission JSON including `meta_private`:

```json
"meta_private": {
  "anchor_sha256": "64-char hex from local consent",
  "family_bind_salt": "64-char hex — share offline for family joins only",
  "consent_bundle": "LYGO-BIRTH-CONSENT-v1|local-slug|utc|nonce"
}

Stewards verify alignment; the public never sees this bundle.

text

`references/SECURITY.md:19-21`:

```markdown
## Steward vault

`data/haven_star_chart/submissions/accepted/` holds full submissions. Do not sync this folder to untrusted mirrors without reviewing contents.

Technical Analysis

The documented architecture stores anchor_sha256, consent_bundle, and family_bind_salt together in full JSON submissions beneath the stack directory. The consent_bundle is identity-binding consent material, while family_bind_salt is an HMAC key used to authenticate future family lineage forks.

The available documentation relies on the procedural warning not to synchronize the directory. It does not specify encryption at rest, integration with an operating-system credential store, restrictive file permissions, separation of keys from submission records, or an enforced repository exclusion mechanism.

A hash-derived public mask does not protect the underlying consent bundle once the complete private submission is exposed. More importantly, disclosu ...[truncated 1582 chars]

Remediation
View remediation

Remediation Suggestions

  1. Store consent records and family HMAC keys outside the repository tree in an encrypted, access-controlled secret store.
  2. Persist only opaque secret identifiers or key references in accepted submission JSON.
  3. Encrypt existing private records at rest with keys managed separately from the stack directory.
  4. Apply owner-only filesystem permissions and validate those permissions before writing or reading private records.
  5. Add and enforce repository ignore rules for all private submission directories, while recognizing that ignore rules do not replace encryption.
  6. Add automated pre-commit and publication scans that reject meta_private, consent_bundle, anchor_sha256, and family_bind_salt.
  7. Redact private fields from logs, diagnostics, error messages, backups, and exported archives.
  8. Derive per-parent or per-relationship keys from a protected master key and support explicit revocation and rotation.
  9. Require additional independent authorization for family forks so disclosure of an HMAC key alone is insufficient to establish a relationship.
  10. Define breach response procedures to invalidate exposed salts and review or supersede lineage forks authenticated with compromised keys.
Vulnerability Patterns
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Supply ChainUnpinned Dependencies, External Script Fetching, Obfuscated Code
  • MCP Least PrivilegeUnderdeclared Capability, Wildcard Permission, Missing Permission Declaration
  • MCP Tool PoisoningHidden Instructions, Unicode Deception, Parameter Description Injection
Findings (16)

Tp4

High
Category
MCP Tool Poisoning
Confidence
96% confidence
Finding

A second description/behavior mismatch finding indicates the skill markets sensitive birth-protocol and privacy functions while only offering diagnostics or helper behavior. In security terms, misleading capability claims can cause unsafe operational reliance and improper handling of identity-related data under false assumptions.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
96% confidence
Finding

A second description/behavior mismatch finding indicates the skill markets sensitive birth-protocol and privacy functions while only offering diagnostics or helper behavior. In security terms, misleading capability claims can cause unsafe operational reliance and improper handling of identity-related data under false assumptions.

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.

Undeclared Tool Scope

Medium
Category
MCP Least Privilege
Confidence
90% confidence
Finding

The skill declares many claimed capabilities in free-form metadata, but it does not define an explicit tool-scope/permissions block while still instructing use of shell commands, environment variables, and filesystem access. This creates ambiguity for hosts and reviewers about what the skill may actually access, increasing the chance of overbroad execution privileges or unsafe agent behavior.

Content

No source excerpt is available for this finding.

Rp1

Medium
Category
MCP Rug Pull
Confidence
95% confidence
Finding

The skill tells users to run npx clawhub@latest install ..., which fetches and executes the latest package version at runtime. If the upstream package or dependency chain is compromised, or a breaking change is introduced, users may execute unreviewed code with their local privileges.

Content

No source excerpt is available for this finding.

Rp1

Medium
Category
MCP Rug Pull
Confidence
95% confidence
Finding

This line repeats use of npx clawhub@latest install ..., again causing execution of unpinned remote code. The repeated pattern broadens exposure because multiple packages may be pulled and trusted transitively without reproducibility or integrity guarantees.

Content

No source excerpt is available for this finding.

Rp1

Medium
Category
MCP Rug Pull
Confidence
95% confidence
Finding

Using npx ...@latest for another dependency introduces the same supply-chain risk: code is resolved dynamically and may differ from what was audited previously. In an agent skill context, this is especially sensitive because users may treat installation instructions as trusted automation.

Content

No source excerpt is available for this finding.

Rp1

Medium
Category
MCP Rug Pull
Confidence
95% confidence
Finding

This installation step also executes an unpinned remote package manager workflow. A compromised registry package, maintainer account, or dependency could lead to arbitrary code execution during setup.

Content

No source excerpt is available for this finding.

Rp1

Medium
Category
MCP Rug Pull
Confidence
95% confidence
Finding

This final npx clawhub@latest instruction continues the same unsafe pattern of dynamic remote execution. Chaining several such commands magnifies supply-chain exposure and makes it harder to reproduce or audit the installed environment.

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.

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.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
91% confidence
Finding

The protocol instructs operators to generate and store a consent bundle and identity anchor material, but it does not clearly warn users about re-identification, long-term retention, local compromise, or the consequences of linking family lineage data. Because the skill handles sensitive identity and consent artifacts, insufficient privacy warnings and handling guidance increase the risk of accidental exposure or misuse even if the public chart is masked.

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.

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.

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

Detected: suspicious.dynamic_code_execution

Dynamic code execution detected.

Critical
Code
suspicious.dynamic_code_execution
Location
scripts/_stack_tools.py:31