← LeaderboardThe Skill Leaderboard

zip-filename-encoding-audit

Inspect bounded ZIP central-directory filename bytes for UTF-8 flag errors, Unicode path extra-field conflicts, and decoded-name collisions.

Published by sickn33 ↗sickn33/agentic-awesome-skills

Try your first task

A source-grounded starter task has not been verified for this skill yet.

SKILL.md

name: zip-filename-encoding-auditdescription: "Inspect bounded ZIP central-directory filename bytes for UTF-8 flag errors, Unicode path extra-field conflicts, and decoded-name collisions."category: developmentrisk: safesource: selfsource_type: selfdate_added: "2026-12-02"author: Koushik-Katkamtags: [zip, encoding, portability]

ZIP Filename Encoding Audit

Overview

Evaluate the stored names of an archive before it is extracted. Compare the selected central-directory representation with the language-encoding bit and Unicode Path field. The result applies to the supplied evidence and the selected profile.

When to Use

  • Use when names display incorrectly across ZIP consumers or when a release needs an encoded-name compatibility check.
  • Use a committed-tree audit for pre-export path conflicts and an independent member inventory for expected payload bytes.

Prerequisites

Supply one approved local single-disk ZIP using the ordinary 32-bit central-directory format. The harness uses Python 3.12 and its standard library. Use the verification reference for the input contract and runnable block.

How It Works

1. Establish the inputs

Record the archive identity and the chosen legacy code-page profile. Bound file size, central-directory length and entry count before reading member fields.

2. Perform the task

Inspect general-purpose bit 11, the name bytes, and optional extra field 0x7075. Use UTF-8 for a set bit. For the documented legacy profile use CP437 unless an applicable version-1 Unicode Path value passes its name CRC check.

3. Verify the result

Report the entry index and the conflicting rule. Use a separate extraction-policy review if the task also concerns paths, file modes, links, or contents.

Examples

A ZIP producer writes a UTF-8 filename and a stale Unicode Path extra-field CRC. The illustrative expected result is unicode_path_crc_mismatch for that entry. Run python -I verify.py --self-test on the extracted reference. Audit the selected fixture or evidence with python -I verify.py --audit release.zip.

Limitations

  • ZIP64, multi-disk archives, masked names, and directory extensions outside the fixed profile are refused.
  • Central-directory checks do not establish local-header agreement, target filesystem safety, or decompression integrity.
  • Bit 11 and extra-field layout follow APPNOTE. Legacy decoder selection is compatibility. Rejecting duplicate decoded names is the fixture's policy.

Safety and side effects

Read a bounded local file in a stable directory. Interpret metadata only. Keep members compressed and leave the archive untouched.

Sources and related skills