Skip to content
Back to skills

Dotlottie Bundle Validation

ASecurity

Audit local dotLottie 2.0 (.lottie) ZIP archives offline for manifest schema, declared animations, image assets, themes, state machines, duplicate entries, and path safety.

  • 50,717 stars
  • 0 votes
  • 0 copies
  • 0 views
  • Added December 2, 2026
ai-agentsjavascriptpythonrustgojavaexpressgit

Security analysis

A100/100

Pro scans all 2 files and shows the line behind each finding

Scanned December 2, 2026

npx -y skills add sickn33/agentic-awesome-skills --skill dotlottie-bundle-validation --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Dotlottie Bundle Validation?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Dotlottie Bundle Validation
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/sickn33-dotlottie-bundle-validation/badge)](https://www.skillsdirectory.com/skills/sickn33-dotlottie-bundle-validation)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: dotlottie-bundle-validation
description: "Audit local dotLottie 2.0 (.lottie) ZIP archives offline for manifest schema, declared animations, image assets, themes, state machines, duplicate entries, and path safety."
category: design
risk: safe
source: self
source_type: self
date_added: "2026-12-01"
author: Koushik-Katkam
tags: [dotlottie, lottie, animation, zip-validation, manifest, jsonschema]
---

# dotLottie Bundle Validation

## Overview

Audit local **dotLottie 2.0** `.lottie` ZIP containers strictly offline without rendering animations, executing embedded Lottie expressions, extracting files to disk, or fetching external assets. Validates bounded ZIP archive integrity (duplicate central-directory entries, path traversal, symlinks, member size caps), enforces the **dotLottie 2.0 vs. 1.0 boundary**, schema-validates `manifest.json` (`jsonschema==4.26.0`), verifies declared animation paths (`a/<id>.json`), external image asset references (`i/...`), themes (`t/<id>.json`), and state machines (`s/<id>.json`).

Distinction from existing Lottie/video skills:
- `hyperframes`: embeds `@lottiefiles/dotlottie-web` into HTML video compositions (`window.__hfLottie.push(player)`) and drives frame-seek timelines rather than validating `.lottie` ZIP bundle integrity and `manifest.json` references.
- `remotion-to-hyperframes` and `remotion-best-practices`: translate `@remotion/lottie` and Lottie components into Remotion/HyperFrames compositions rather than auditing dotLottie `2.0` package structure offline.

## When to Use

- Validating `.lottie` 2.0 asset bundles in CI or design-asset pipelines before shipping mobile/web builds.
- Catching missing animation JSON files (`a/<id>.json`), missing image assets referenced inside Lottie `assets[]`, dangling theme/state-machine references, duplicate ZIP members, or dotLottie `1.0` (`animations/`) vs. `2.0` (`a/`) structure mismatches.
- Do **not** use this skill to execute animation expressions, render frames, or extract untrusted `.lottie` archives to disk.

## Prerequisites

- Python `3.10+` with `jsonschema` and `pytest` (tested with Python `3.12.10`, `jsonschema==4.26.0`, `pytest==9.1.1`).
- Local or synthetic `.lottie` ZIP files.
- **No browser/WASM dotLottie player runtime, network asset fetch, or filesystem extraction required.**

## How It Works

### 1. Enforce pre-central-directory archive bounds & reject dotLottie 1.0 cleanly

1. Enforce an archive-input byte bound (`<= 64 MiB` regular non-symlink file read into bounded memory) **before** calling `zipfile.ZipFile` so oversized inputs cannot trigger central-directory allocation.
2. Inspect each original `info.orig_filename` string **before normalization** (`PurePosixPath`/`posixpath.normpath`): reject empty names, leading `/`, `\`, Windows drive prefixes (`C:`), NUL bytes, empty `//` segments, `.` or `..` path components, symlink attributes (`S_ISLNK`), duplicate raw or normalized entry names (`DUPLICATE_ARCHIVE_ENTRY`), member count (`> 500`), and uncompressed size caps (`16 MiB` member / `64 MiB` total). Use the normalized `info.filename` for lookups only after the original decoded name passes.
3. Require root `manifest.json` and parse JSON cleanly (`INVALID_INPUT` on corrupt ZIP/JSON). Explicitly reject dotLottie `"1"` / `"1.0"` packages as `UNSUPPORTED` (`UNSUPPORTED_DOTLOTTIE_V1`) because v1.0 uses `animations/` + `images/` rather than the v2.0 `a/`, `i/`, `t/`, `s/`, `f/` layout. Strict dotLottie 2.0 validation requires `version == "2"`; `"2.0"` is rejected unless explicit `compat_extensions=True` compatibility mode is requested.

### 2. Validate strict dotLottie 2.0 manifest, animations, assets, themes, and state machines

Run the local verification suite in [dotLottie 2.0 bundle harness](references/dotlottie-bundle-harness.md):

1. Schema-validate `manifest.json` against strict dotLottie 2.0 rules (`version == "2"`, unique non-empty `animations[].id` with optional string `initialTheme`, unique `themes[].id`, unique `stateMachines[].id`, and `initial` object `{"animation": ..., "stateMachine": ...}`). Legacy/compatibility forms (manifest `version: "2.0"`, root `states` alias, animation `themes` arrays, dict-shaped state-machine `states`) fail strict validation and are accepted only under explicit `compat_extensions=True` with explicit `WARN` findings.
2. Enforce canonical dotLottie 2.0 archive paths strictly (`a/<id>.json` for animations, rejecting non-canonical `"file"` overrides or traversal IDs), verify every `animations[].initialTheme` references a declared `themes[].id` (`MISSING_INITIAL_THEME_REF`), and verify every animation parses as a JSON object containing `v`, `fr`, `ip`, `op`, `layers`, and a valid list of `dict` items for `assets[]` (`INVALID_LOTTIE_ASSETS` otherwise).
3. Inspect each animation's `assets[]`: skip embedded `data:` base64 assets (`e == 1` or `p.startswith("data:")`), reject external `http://`/`https://` remote URLs as `EXTERNAL_ASSET_DISALLOWED`, and confirm local image references resolve canonically inside `i/` to existing archive members (`MISSING_ASSET_FILE`).
4. Confirm every declared theme (`t/<id>.json`) and state machine (`s/<id>.json`) exists at its canonical path, parses as a structured JSON object, satisfies declared `initial` / `initialTheme` cross-references, and in strict mode requires state-machine `states` to be a non-empty array of state objects (`name` non-empty string) with `initial` as a string naming an existing state in `states`.

## Examples

Run the self-contained verification suite in [dotLottie 2.0 bundle harness](references/dotlottie-bundle-harness.md):

```text
User request: "Validate hero-banner.lottie against the dotLottie 2.0 packaging spec before release."
Inputs: Synthetic or local .lottie ZIP archive inspected read-only in memory.
Expected result: Valid v2.0 bundle with a/hero.json, i/badge.png, t/dark.json, and s/interactive.json passes;
  missing animation file, missing image asset, missing theme/state-machine, or duplicate ZIP entry fails loudly;
  v1.0 returns UNSUPPORTED; traversal member returns UNSAFE_ARCHIVE.
```

## Limitations

- Targets **dotLottie 2.0** (`version: "2"`, `initialTheme`, array `states`, string `initial`) in default strict mode; compatibility aliases (`version: "2.0"`, manifest `states`, animation `themes`, dict-shaped state-machine `states`) require explicit `compat_extensions=True`, while dotLottie `1.0` bundles (`animations/*.json`) return `UNSUPPORTED`.
- Verifies JSON presence and structural keys (`v`, `fr`, `ip`, `op`, `layers`), not full Lottie expression AST validity, pixel rendering parity, or `@lottiefiles/dotlottie-web` WASM player compatibility.

## Safety and Side Effects

- Strictly **offline, read-only, and non-executing**: inspects ZIP members in memory with bounded member counts and uncompressed byte limits (`16 MiB` member, `64 MiB` total).
- Never runs JavaScript/Lottie expression evaluators, renders WebGL/WASM frames, or fetches external URLs.

## Sources and related skills

- [dotLottie 2.0 Specification](https://dotlottie.io/spec/2.0/)
- Related skills: [hyperframes](https://github.com/sickn33/agentic-awesome-skills/blob/e4dcf3977b6d1e18a2539f630bd82c2433d283e2/skills/hyperframes/SKILL.md), [remotion-to-hyperframes](https://github.com/sickn33/agentic-awesome-skills/blob/e4dcf3977b6d1e18a2539f630bd82c2433d283e2/skills/remotion-to-hyperframes/SKILL.md), [remotion-best-practices](https://github.com/sickn33/agentic-awesome-skills/blob/e4dcf3977b6d1e18a2539f630bd82c2433d283e2/skills/remotion-best-practices/SKILL.md).

Files in this skill

  • SKILL.md7.4 KB
  • references/dotlottie-bundle-harness.md35.4 KB

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

View all in ai-agents →

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.