Back to skill

Security audit

Receipt & Warranty Tracker

Security checks for vulnerabilities and agentic risk

Overview

This is a local receipt and warranty tracker that stores user-entered purchase details on disk and does not show hidden network, credential, or persistence behavior.

Install only if you are comfortable keeping receipt text, item names, prices, and warranty dates in a local JSON ledger. Avoid putting secrets or full payment details in receipt text, and do not set RECEIPT_WARRANTY_STATE_DIR to a shared or synced folder unless that is intentional.

Vulnerability Patterns
  • 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
  • Unauthorized Access and Privilege EscalationObtains permissions beyond the task's legitimate needs
Vulnerability Patterns
  • Rogue AgentSelf-Modification, Session Persistence
  • Behavioral ASTexec() Call, eval() Call, Dynamic Import
  • Taint TrackingDirect Taint Flow, Variable-Mediated Taint Flow, Credential Exfiltration Chain
  • MCP Least PrivilegeUnderdeclared Capability, Wildcard Permission, Missing Permission Declaration
  • MCP Tool PoisoningHidden Instructions, Unicode Deception, Parameter Description Injection
Findings (10)

Undeclared Tool Scope

Medium
Category
MCP Least Privilege
Confidence
91% confidence
Finding

The skill advertises executable behavior via bash/python, writes persistent files, and uses environment-variable-controlled state, but does not declare any explicit tool scope or permissions. That mismatch weakens security review and runtime containment because an invoking agent may grant broader shell/file capabilities than users expect.

Content

No source excerpt is available for this finding.

Session Persistence

Medium
Category
Rogue Agent
Confidence
83% confidence
Finding

The skill intentionally persists receipt details and warranty dates on disk, creating a local record of purchases and potentially sensitive personal finance information. Session persistence is expected for the use case, but it still increases privacy risk if filesystem permissions are weak, backups are shared, or the state directory is redirected to an unsafe location via RECEIPT_WARRANTY_STATE_DIR.

Content

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

md
## Behaviour rules

- **Idempotent add**: the same item name replaces its previous record.
- **Price is unitless money here** — you write the amount, the skill
  neither formats nor interprets it; use `--currency` to tag it.
- **Reminder policy**: `remind` fires when `warranty_until − today ≤
  remind_ahead_days`. `remind_ahead_days` is config (`config

Intent-Code Divergence

Medium
Category
Not specified by scanner
Confidence
97% confidence
Finding

The module documentation says the skill stores receipts you photograph, which implies image intake or photo processing. In practice, the implementation only accepts a --receipt text string plus item/price/warranty fields and stores them in JSON; there is no code for image capture, file ingestion, or OCR anywhere in the file.

Content

No source excerpt is available for this finding.

Tainted flow: 'tmp' from os.environ.get (line 324, credential/environment) → open (file write)

Medium
Category
Data Flow
Confidence
65% confidence
Finding

Data from a source is assigned to a variable that is later passed to a sink, creating a variable-mediated taint flow.

Content

Scanner excerpt · receipt_warranty.py (reported line 325)May include surrounding context.

python
cfg = load_config()
        cfg["remind_ahead_days"] = args.remind_ahead_days
        tmp = os.path.join(STATE_DIR, "config.json.tmp")
        with open(tmp, "w") as f:
            json.dump(cfg, f, indent=2, sort_keys=True)
            f.write("\n")
        os.replace(tmp, os.path.join(STATE_DIR, "config.json"))

subprocess module call

Medium
Category
Dangerous Code Execution
Confidence
70% confidence
Finding

subprocess module calls execute external commands. Without careful input validation, this enables command injection.

Content

Scanner excerpt · test_receipt.py (reported line 60)May include surrounding context.

python
"""Run the CLI as a subprocess. Returns CompletedProcess."""
        import subprocess as _sp
        _cmd = [sys.executable, CMD] + list(argv)
        p = _sp.run(_cmd, capture_output=True, text=True, timeout=30)
        return p

    def _raw(self, argv):

subprocess module call

Medium
Category
Dangerous Code Execution
Confidence
70% confidence
Finding

subprocess module calls execute external commands. Without careful input validation, this enables command injection.

Content

Scanner excerpt · test_receipt.py (reported line 67)May include surrounding context.

python
"""Run the CLI as a subprocess. Returns CompletedProcess."""
        import subprocess as _sp
        _cmd = [sys.executable, CMD] + list(argv)
        p = _sp.run(_cmd, capture_output=True, text=True, timeout=30)
        return p

    def _raw(self, argv):

Intent-Code Divergence

Low
Category
Not specified by scanner
Confidence
80% confidence
Finding

The documentation says "All data stays on disk — nothing is sent anywhere," which conveys a strictly local-only behavior. However, the example at L61 demonstrates piping reminder output to sed, meaning data is emitted to stdout for external process consumption rather than remaining only on disk. This is a documentation-to-behavior contradiction, though low severity because it is in example usage rather than hidden code behavior.

Content

No source excerpt is available for this finding.

Intent-Code Divergence

Low
Category
Not specified by scanner
Confidence
79% confidence
Finding

The docstring states that no personal data leaves local disk, implying a tightly local-only storage model. However, L022-L023 allow the storage location to be redirected via the RECEIPT_WARRANTY_STATE_DIR environment variable, so receipt data may be written outside the expected local application directory and potentially onto mounted or shared storage.

Content

No source excerpt is available for this finding.

Intent-Code Divergence

Low
Category
Not specified by scanner
Confidence
98% confidence
Finding

The module docstring states 'no network, no subprocess', which actively contradicts the implementation in helper methods that invoke the skill using subprocess.run. This is a documentation-to-code mismatch within the test file itself, not merely an omitted detail.

Content

No source excerpt is available for this finding.

Intent-Code Divergence

Low
Category
Not specified by scanner
Confidence
77% confidence
Finding

The base-class docstring describes a 'Thin base' with helper wrappers around the real CLI, but the class also sets RECEIPT_WARRANTY_STATE_DIR and writes config/state files in setUp. That documentation understates and partially contradicts the actual intent of the fixture setup.

Content

No source excerpt is available for this finding.