Back to skill

Security audit

Baby Photo Book

Security checks for vulnerabilities and agentic risk

Overview

This skill locally turns a user-selected baby photo folder into a PDF photo book, with no evidence of hidden network, credential, persistence, or destructive behavior.

Install in a dedicated virtual environment, avoid running as administrator/root, and point the tool only at the photo folder you intend to include because it scans subdirectories and processes private family photos locally.

Vulnerability Patterns
  • Insecure DependenciesIntroduces malicious components through unsafe dependency sources
  • 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 (1)

T08 · Insecure Dependencies

Warning
Location
SKILL.md:70
Finding

Unpinned Third-Party Dependencies Permit Supply-Chain Substitution

Content
View full analysis

Vulnerability Details

File Location: SKILL.md, lines 70-74
Vulnerability Type: Unpinned and integrity-unverified Python dependencies
Risk Level: Medium

Vulnerable Code

markdown
Install dependencies:
```bash
pip install Pillow reportlab
text

### Technical Analysis

The installation instructions request `Pillow` and `reportlab` without fixed versions or cryptographic hashes. Consequently, pip resolves mutable package versions using the package indexes configured in the user's environment.

This does not establish that either named package is currently malicious. However, it leaves dependency selection and integrity outside the reviewed project. A compromised package release, compromised package index, malicious index mirror, or unsafe pip configuration could cause the user to install code that was not included in this audit.

Python package installation may execute package build logic. Installed dependencies are also imported by `scripts/generate_photo_book.py`, meaning malicious dependency code could execute when the generator runs even if it did not execute during installation.

### Attack Path

1. An attacker compromises a permitted package release, package-index account, configured mirror, or another source used by pip.
2. The user follows the documented command `pip install Pillow reportlab`.
3. Because versions and hashes are not pinned, pip accepts the dependency artifacts selected by the configured index without validating them against project-approved hashes.
4. Attacker-controlled code executes during package installation or when the script imports `PIL` or `reportlab`.
5. The malicious dependency operates with the privileges of the user running pip or the photo-book generator and can access resources available to that account.

This exploitation path requires compromise or attacker influence over dependency distribution or the user's pip configuration; the audited project does not itself retrieve a known malicious package.

...[truncated 684 chars]
Remediation
View remediation

Remediation Suggestions

  1. Create a reviewed dependency lock file containing exact versions, including all transitive dependencies.
  2. Generate and record SHA-256 hashes for every approved distribution artifact.
  3. Install dependencies with hash enforcement, for example:
    bash
    python -m pip install --require-hashes -r requirements.txt
    
  4. Prefer binary wheels from a trusted package index where appropriate, and explicitly configure the approved index rather than relying on arbitrary local pip configuration.
  5. Install dependencies in a dedicated virtual environment under an unprivileged user account.
  6. Add an automated dependency-review process to monitor pinned versions for known vulnerabilities and update the lock file through a controlled review.
  7. Document that users should not run dependency installation or the generator as root or administrator.
Vulnerability Patterns
  • Trigger AbuseOverly Broad Trigger, Shadow Command Trigger, Keyword Baiting Trigger
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
  • Supply ChainUnpinned Dependencies, External Script Fetching, Obfuscated Code
Findings (2)

Vague Triggers

Low
Category
Not specified by scanner
Confidence
84% confidence
Finding

The manifest description says to use the skill when the user wants to "create baby photo albums" or "automatically layout photos for printing," which are broad natural-language triggers rather than a constrained invocation condition. It does not provide exclusion conditions or clarify how this skill should be distinguished from more general photo album or printing workflows.

Content

No source excerpt is available for this finding.

Missing User Warnings

Low
Category
Not specified by scanner
Confidence
87% confidence
Finding

This code scans the supplied folder recursively for image files and creates a PDF at the chosen output path. Although this behavior is core to the tool, there is no explicit disclosure in the module docstring or argument help that the script will traverse subdirectories and write a new file, which is the kind of user warning this rule looks for in code files.

Content

No source excerpt is available for this finding.