Back to skill

Security audit

digital-legacy

Security checks for vulnerabilities and agentic risk

Overview

This is a legitimate digital-estate planner, but it under-protects very sensitive account and crypto-recovery information and may not provide the AES-GCM encryption users are told to expect.

Review this skill carefully before installing. Use it only in a private, secured workspace; do not put passwords, seed phrases, PINs, recovery codes, private keys, or security-question answers in `accounts.json` or the emergency guide. Treat `accounts.json`, `digital_will.enc`, and `emergency_guide.html` as highly sensitive, restrict file permissions, and do not rely on the advertised AES-GCM protection unless `cryptography` is installed and the fallback behavior is removed or clearly disabled.

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

T09 · Insecure Skill Coding Practices

Error
Location
scripts/digital_legacy.py:152
Finding

Nonstandard Encryption Fallback Contradicts the Advertised AES-256-GCM Security Model

Content
View full analysis
bytes: """Encrypt a string with AES-256-GCM or stdlib fallback. Uses the `cryptography` library if available (proper AES-GCM). Falls back to a stdlib XOR-stream cipher with HMAC authentication if not. The fallback is less secure but functional for personal use. """ plaintext = data.encode('utf-8') salt = secrets.token_bytes(SALT_LENGTH) nonce = secrets.token_bytes(NONCE_LENGTH) key = derive_key(passphrase, salt) try: from cryptography.hazmat.primitives.ciphers.aead import AESGCM aesgcm = AESGCM(key) ciphertext = aesgcm.encrypt(nonce, plaintext, None) return salt + nonce + ciphertext except ImportError: # Fallback: XOR-stream with HMAC-SHA256 authentication return _encrypt_fallback(plaintext, key, salt, nonce) def _encrypt_fallback(plaintext: bytes, key: bytes, salt: bytes, nonce: bytes) -> bytes: """Stdlib-only encryption: XOR keystream + HMAC tag.""" import hmac # Generate keystream from key + nonce (PBKDF2 as PRNG) keystream = b'' counter = 0 while len(keystream) < len(plaintext): block = hashlib.sha256(key + nonce + counter.to_bytes(4, 'big')).digest() keystream += block counter += 1 # XOR encrypt ciphertext = bytes(a ^ b for a, b in zip(plaintext, keystream)) # HMAC authentication tag tag = hmac.new(key, salt + nonce + ciphertext, hashlib.sha256).digest()[:TAG_LENGTH] return salt + nonce + ciphertext + tag ``` ### Technical Analysis The application uses AES-256-GCM only when the optional `cryptography` package is installed. Otherwise, it silently falls back to a custom construction consisting of: 1. A SHA-256-based k ...[truncated 2188 chars]
Remediation
View remediation

T09 · Insecure Skill Coding Practices

Warning
Location
scripts/digital_legacy.py:253
Finding

Sensitive Digital-Estate Inventory Is Written to Plaintext Files Without Restrictive Permissions

Content
View full analysis
None: """Save inventory to JSON file.""" plan.updated = datetime.now().strftime("%Y-%m-%d") path.write_text( json.dumps(plan.to_dict(), indent=2, ensure_ascii=False), encoding='utf-8', ) ``` Related unrestricted sensitive-data prompts include: ```python account.username = ask("Username or email (NOT password)") account.access_method = ask("Access method (password manager, 2FA, etc.)") account.action = ask("Action (archive/memorialize/delete/transfer/maintain)", "archive") account.notes = ask("Notes (optional)") ``` ```python wallet.access_method = ask( "Access method (seed phrase LOCATION — do NOT enter the phrase itself)" ) wallet.approximate_value = ask("Approximate value (e.g. ~$5000)") wallet.notes = ask("Notes (optional)") ``` ### Technical Analysis The inventory is serialized directly to `accounts.json` as plaintext. The file can contain: - Account usernames and email addresses - Financial and service-provider names - Password-manager and 2FA access methods - Cryptocurrency wallet types, locations, and approximate values - Important local-file locations - Legacy contacts - Unrestricted notes The application does not explicitly create the file with owner-only permissions such as `0600`. Its effective permissions therefore depend on the process umask and surrounding filesystem configuration. On permissively configured or shared systems, other local users may be able to read it. Although prompts warn against entering passwords and seed phrases, free-text fields are not validated. Project documentation also encourages users to document password locations, recovery information, device credentials, ...[truncated 1426 chars]
Remediation
View remediation

T09 · Insecure Skill Coding Practices

Warning
Location
scripts/digital_legacy.py:282
Finding

Weak Passphrases Are Permitted for High-Value Encrypted Data

Content
View full analysis
str: """Securely prompt for a passphrase.""" while True: pw = getpass.getpass("Enter passphrase: ") if len(pw) < 8: print("Warning: passphrase is short (< 8 chars). Consider a stronger one.") cont = input("Continue anyway? (y/n) [n]: ").strip().lower() if cont != 'y': continue if confirm: pw2 = getpass.getpass("Confirm passphrase: ") if pw != pw2: print("Passphrases don't match. Try again.") continue return pw ``` The associated fixed KDF setting is: ```python PBKDF2_ITERATIONS = 100_000 ``` ### Technical Analysis The application only warns when a passphrase is shorter than eight characters and explicitly allows the user to continue. It therefore accepts extremely weak passphrases, including short dictionary words and common passwords. The encrypted file contains its salt and all information necessary to verify candidate passphrases through the authentication tag. An attacker who obtains the file can consequently perform unlimited offline guesses without account lockout, rate limiting, or detection. PBKDF2-HMAC-SHA256 with 100,000 fixed iterations adds computational cost, but it is not memory-hard and may be insufficient against modern parallel cracking hardware when users select weak passphrases. The KDF cost is not calibrated to the host and cannot be upgraded on a per-file basis because the parameters are not encoded in a versioned header. ### Attack Path 1. The victim chooses a short, common, reused, or otherwise predictable passphrase. 2. The program warns the victim but allows the weak choice after a single confirmation. 3. An attac ...[truncated 797 chars]
Remediation
View remediation

T09 · Insecure Skill Coding Practices

Note
Location
scripts/digital_legacy.py:402
Finding

Unescaped Inventory Values Permit HTML Injection in the Emergency Guide

Content
View full analysis
Remediation
View remediation
`, event handlers, quotes, ampersands, and closing tags. 7. Consider adding a restrictive Content Security Policy meta tag to generated guides as defense in depth. ]]>
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Excessive AgencyUnrestricted Tool Access, Autonomous Decision Making, Scope Creep
  • 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
Findings (9)

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
89% confidence
Finding

The README promotes generating a printable emergency access guide for trusted family members but does not clearly warn that printed or insecurely stored guides can expose sensitive recovery information or materially aid access to the encrypted will. In a digital-legacy skill, users may be especially likely to create and physically store such guides, so omission of handling guidance increases the chance of accidental disclosure or misuse by anyone who finds the document.

Content

No source excerpt is available for this finding.

Undeclared Tool Scope

Medium
Category
MCP Least Privilege
Confidence
94% confidence
Finding

The skill advertises commands that read and write local files (accounts.json, digital_will.enc, emergency_guide.html) but does not declare any permissions or allowed-tools scope. That mismatch weakens least-privilege controls and can cause an agent or reviewer to underestimate the skill's filesystem access, which is especially sensitive here because the skill handles account inventories, crypto wallet details, and encrypted will artifacts.

Content

No source excerpt is available for this finding.

Intent-Code Divergence

Medium
Category
Not specified by scanner
Confidence
92% confidence
Finding

The document presents AES-256-GCM as the script's encryption scheme while also stating that the script may fall back to a stdlib-only XOR-based stream cipher. This creates a misleading security guarantee: users handling highly sensitive digital legacy data may believe they are getting authenticated encryption when they may instead receive much weaker protection without integrity guarantees.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
96% confidence
Finding

The guidance acknowledges a weaker XOR-based fallback but does not clearly warn that it is substantially less secure than AES-GCM and unsuitable for protecting sensitive assets like account inventories, recovery instructions, and crypto wallet information. In the context of a digital legacy skill, users may store extremely high-value secrets, so under-warning insecure encryption can directly lead to confidentiality compromise and possible tampering.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
92% confidence
Finding

The guide explicitly tells users to gather device passcodes, email access, and open their password manager during a long setup session without a prominent warning to avoid recording, pasting, or exposing those secrets in notes, generated artifacts, or to anyone assisting. In a digital-legacy workflow, this concentration of high-value credentials increases the chance of accidental disclosure, shoulder-surfing, unsafe storage, or inclusion in documents that may later be shared with a trusted person or stored insecurely.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
94% confidence
Finding

The script stores the full legacy inventory in plaintext JSON on disk, even though that inventory contains highly sensitive metadata such as account names, usernames, wallet access locations, important file locations, and trusted-contact details. In the context of a digital inheritance planner, this materially increases risk because local compromise, backup leakage, accidental sharing, or multi-user system access could expose a roadmap to valuable accounts and crypto assets before the encrypted will is ever used.

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 · scripts/templates/template_guide.html (reported line 106)May include surrounding context.

html
try again), but guessing wastes time.</li>
    <li>❌ Do <strong>not</strong> delete accounts immediately. Some data (photos,
        messages) may be irreplaceable. Check the will first.</li>
    <li>❌ Do <strong>not</strong> share the passphrase with anyone else without checking
        with my lawyer first.</li>
    <li>❌ Do <strong>not</strong> announce my death on social media until family has been
        personally notified.</li>

Intent-Code Divergence

Low
Category
Not specified by scanner
Confidence
98% confidence
Finding

The documentation says the script uses 'Python stdlib only' but then says it will use the external cryptography library when available. This inconsistency can mislead operators about the actual dependency and security model, increasing the chance they deploy or trust the tool under false assumptions.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
92% confidence
Finding

The HTML document explicitly sets lang="en", and all visible instructional content is written only in English. For a user-facing emergency-access guide, this constitutes a language/locale constraint without any opt-in or justification in the file.

Content

No source excerpt is available for this finding.