Back to skill

Security audit

self-trust

Security checks for vulnerabilities and agentic risk

Overview

This appears to be a real personal-finance ledger skill, but it needs Review because it persists sensitive financial data and has a confirmed customization path that can turn encrypted data into plaintext.

Install only if you are comfortable with a local persistent finance ledger. Prefer a dedicated private data directory, enable encryption at initialization, avoid using generic customize --set for crypto.* or other internal fields, and do not run concurrent commands against the same encrypted ledger until the audit-write issue is fixed.

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

T09 · Insecure Skill Coding Practices

Error
Location
scripts/modules/customize.py:49
Finding

Unrestricted customization can disable encryption and rewrite the ledger as plaintext

Content
View full analysis
None: parts = path.split(".") cur = d for p in parts[:-1]: nxt = cur.get(p) if not isinstance(nxt, dict): nxt = {} cur[p] = nxt cur = nxt cur[parts[-1]] = value ``` ```python for item in (args.set or []): if "=" not in item: raise ValueError(f"--set format must be DOTPATH=VALUE: {item}") path, _, raw = item.partition("=") changes["set"].append({ "path": path.strip(), "value": _parse_scalar(raw), }) ``` ```python new, _ = _apply_changes(contract, changes) changed = _diff(contract, new) contract_io.write_contract( data_dir, new, actor="configurator", confirm=True, ) ``` The contract writer selects encryption according to the new contract value: ```python encrypted = bool(contract.get("crypto", {}).get("enabled")) if encrypted: blob = crypto_io.seal_json(contract) with open(tmp, "wb") as f: f.write(blob) else: with open(tmp, "w", encoding="utf-8") as f: json.dump(contract, f, ensure_ascii=False, indent=2) ``` ### Technical Analysis The generic `--set` mechanism accepts an arbitrary dot path. It does not enforce an allowlist of documented customizable fields and does not reject security-sensitive fields such as `crypto.enabled`, `crypto.mode`, or `crypto.key_file`. The top-level schema guard only verifies that `crypto` is a recognized configuration field. Because customization writes as `actor="configurator"` with `confirm=True`, the generic guard does not prevent the change. Consequently, a command such as `--set crypto.enabled=false` can pass t ...[truncated 1766 chars]
Remediation
View remediation

T09 · Insecure Skill Coding Practices

Warning
Location
scripts/core/contract.py:211
Finding

Sensitive plaintext financial files are created without restrictive permissions

Content
View full analysis
Remediation
View remediation

T09 · Insecure Skill Coding Practices

Warning
Location
scripts/core/audit.py:91
Finding

Encrypted audit-log updates can lose or corrupt records under concurrent execution

Content
View full analysis
None: path.parent.mkdir(parents=True, exist_ok=True) tmp = path.with_suffix(".jsonl.tmp") with open(tmp, "wb") as f: f.write(blob) os.replace(tmp, path) if path.read_bytes() != blob: raise IOError(f"Audit log write verification failed: {path}") ``` Encrypted append is implemented as an unlocked read-modify-write operation: ```python def _append_encrypted(path: Path, line: str) -> None: existing = "" if path.is_file(): raw = path.read_bytes() if crypto_io.is_encrypted(raw): existing = crypto_io.unseal(raw).decode("utf-8") else: existing = raw.decode("utf-8") text = (existing + "\n" + line) if existing.strip() else line _atomic_write_bytes( path, crypto_io.seal(text.encode("utf-8")), ) ``` The append dispatcher does not acquire the lock used by plaintext logs: ```python if crypto_io._audit_encrypted or ( path.is_file() and crypto_io.is_encrypted(path.read_bytes())): if not crypto_io.have_session(): raise crypto_io.CryptoError( "Encrypted audit append requires key material") _append_encrypted(path, line) else: _locked_append(path, line) ``` ### Technical Analysis Plaintext logs use an exclusive file lock around append operations, but encrypted logs do not. Encrypted append requires decrypting the complete file, appending one line in memory, encrypting the complete result, and replacing the original file. This entire read-modify-write transaction must be serialized. Two concurrent processes can both read the same original log, independently append different reco ...[truncated 1726 chars]
Remediation
View remediation
Vulnerability Patterns
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Trigger AbuseOverly Broad Trigger, Shadow Command Trigger, Keyword Baiting Trigger
  • MCP Least PrivilegeUnderdeclared Capability, Wildcard Permission, Missing Permission Declaration
  • MCP Tool PoisoningHidden Instructions, Unicode Deception, Parameter Description Injection
Findings (41)

Tp4

High
Category
MCP Tool Poisoning
Confidence
98% confidence
Finding

The supplied code does not implement bookkeeping, budgeting, reconciliation, debt modeling, mortgage calculations, multi-currency handling, or AES-256-GCM ledger encryption. Instead, it is a small generic utility module for hashing JSON objects and generating short confirmation tokens used in customize/import workflows. While hashing utilities could be a supporting detail in some systems, this code’s described usage centers on contract confirmation and import confirmation rather than the declared personal-finance discipline engine. That makes the actual behavior materially different from the declared purpose.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
98% confidence
Finding

The declared description presents the skill as the core deterministic personal-finance discipline engine. However, this code file is specifically a rendering module (renderer.py) whose docstring says it converts structured JSON into formatted visible receipts. All functions format text based on fields already present in input dictionaries. Although the rendered commands correspond to finance features named in the description, this chunk does not perform those features' substantive logic—it neither evaluates approvals, manages ledgers, reconciles accounts, models debts/mortgages, nor encrypts data. The actual code is a presentation layer for an engine, not the engine itself. Therefore the supplied code chunk does not accurately represent the declared purpose.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

High
Category
Not specified by scanner
Confidence
96% confidence
Finding

The file title and all prescribed interaction text are in Chinese, and the skill presents fixed Chinese user-facing phrases and examples without indicating that language selection is optional. This constitutes a locale/language constraint that is not documented as optional or justified as region-specific.

Content

No source excerpt is available for this finding.

Undeclared Tool Scope

Medium
Category
MCP Least Privilege
Confidence
94% confidence
Finding

The skill instructs the host to execute local Python commands, read multiple reference files, use environment variables for secrets, and write ledger/audit data, but it declares no explicit tool scope or permission boundary. In an agent runtime, that creates excessive implicit authority: the skill may gain shell, filesystem, and env access beyond what a bookkeeping renderer should need, increasing the blast radius if the skill is misused or its inputs are adversarial.

Content

No source excerpt is available for this finding.

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
93% confidence
Finding

The trigger list includes broad terms like bookkeeping, budget, saving, debt, mortgage, and audit, which are common in ordinary conversation and can cause unintended activation. Because this skill can drive shell commands, read/write local financial data, and potentially access encryption secrets, accidental invocation could expose sensitive information or perform state-changing operations in the wrong context.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
98% confidence
Finding

The instruction requires all user-visible engine strings to be entirely in Chinese, which imposes a language constraint regardless of user preference. This is a natural-language policy concern because no opt-in, fallback, or documented regional limitation is provided.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

This markdown file prescribes specific user-facing phrasing in Chinese, including the required tone and the exact cooldown notification text. Because it does not offer a language/locale option or document a justified locale restriction, it violates the language/locale policy criteria.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
96% confidence
Finding

This markdown file is written entirely in Chinese and does not indicate that the skill supports other languages or that Chinese is a documented, justified locale restriction. Under the policy rules, forcing a specific language without user opt-in is a natural-language policy violation.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
93% confidence
Finding

The file is written entirely in Chinese and includes a Chinese-only command phrase (记账切模式) without any indication that other languages are supported or that the skill is intentionally restricted to Chinese-speaking users. Under the policy, forcing a specific language without user opt-in or documented justification is a natural-language policy concern.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
94% confidence
Finding

This file presents all user-facing instructions, warnings, and invocation examples only in Chinese. Under the policy, forcing a specific language without user choice is a natural-language policy violation unless the locale restriction is explicitly documented and justified, which is not present here.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
93% confidence
Finding

The onboarding flow asks for available funds, monthly savings capacity, and long-term goals, all of which are highly sensitive financial data, but the interaction rules do not require any warning about sensitivity, retention, or how the information will be used. Because this is a bookkeeping and budget-governance skill, users may disclose detailed financial state without understanding the privacy implications, creating avoidable confidentiality risk.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
89% confidence
Finding

The skill instructs the agent to proactively query pending cooling-off reminders at conversation start, which can surface prior request metadata from the current or previous interactions without first obtaining the user's consent or clearly signaling that historical finance workflow data will be accessed. In a personal-finance skill, reminder entries can reveal sensitive spending categories, amounts, and timing, so unsolicited retrieval increases privacy exposure and the chance of over-collection.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
97% confidence
Finding

The document explicitly requires all user-visible strings to be entirely in Chinese and states there is no exemption. This is a natural-language locale policy constraint applied globally, but the file does not offer the user any language choice or opt-in, which matches the policy-violation category.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
96% confidence
Finding

The entire skill documentation is written in Chinese and includes prescriptive natural-language output requirements such as 必须转述, with no indication that another language is supported on request. This creates a locale/language constraint without user opt-in or documented justification.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
88% confidence
Finding

The file’s natural-language interface text, including the primary module docstring and later raised exception messages, is written exclusively in Chinese. This imposes a fixed language/locale choice on users and operators without offering an alternative or documenting a justified region-specific constraint, which matches the language-policy violation criteria.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
96% confidence
Finding

The module docstring states that engine user-visible strings must not expose English enum/field names and centralizes conversion to Chinese labels. This is a natural-language locale policy embedded in the codebase, and it does not indicate any user choice or opt-in for language selection.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
93% confidence
Finding

The comments require all rendered status values to pass through zh_status, reinforcing a mandatory Chinese presentation layer. Because no alternative locale or user preference is mentioned, this appears to violate the language/locale choice policy.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
93% confidence
Finding

The docstring states that rendering-layer status values '必须走 zh_status' and uses '统一中文化', which indicates a mandatory Chinese localization requirement. Under the policy, forcing a specific language without user opt-in is a natural-language locale policy violation.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The module docstring and embedded user-facing notes/messages are written exclusively in Chinese, and the code imports Chinese localization helpers (OBJECTIVE_STATUS_ZH, zh) to produce Chinese output. There is no indication in this file that the user can opt into another language or locale, which matches the language/locale policy violation criteria.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
92% confidence
Finding

Several return values include natural-language messages intended for users, and they are hard-coded in Chinese rather than selected based on user preference. In this file, there is no visible mechanism allowing users to choose language or acknowledging a justified locale restriction.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
94% confidence
Finding

The transition_objective function returns multiple user-facing messages and confirmation prompts solely in Chinese, including the explicit confirmation flow. Because this file shows no user opt-in or fallback locale handling, this is a natural-language locale policy concern.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
90% confidence
Finding

The module docstring is entirely prescriptive in Chinese and presents the skill's operating contract and user-facing behavior without any indication that users may select another language or locale. Under the policy, forcing a specific language without opt-in is a natural-language policy violation unless the locale restriction is explicitly justified.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
94% confidence
Finding

The module docstring and all user-facing messages are written exclusively in Chinese, and the code imports Chinese locale helpers (CORPUS_STATUS_ZH, zh) to render output. There is no indication that the user can choose another language or that the skill is restricted to a China-specific deployment context, which can violate language/locale policy requirements.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
96% confidence
Finding

This file contains user-facing natural-language strings and i18n usage that are explicitly Chinese-only, including the module docstring and multiple returned messages. The policy requires flagging language or locale constraints when a skill forces a specific language without user opt-in, and no alternative locale selection is present in this file.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The module docstring is written as normative instructions in Chinese, including output requirements like "数字必须原样引用本模块输出," with no indication that another language or locale may be used. Under the policy, forcing a specific language without user opt-in is a natural-language locale violation.

Content

No source excerpt is available for this finding.