Add deterministic tar and gzip utilities for OCI skills#22
Merged
Conversation
Add reproducible archive creation and extraction utilities to the oci/skills package. These are foundational for the skill packager. tar.go: Deterministic tar creation with sorted entries, normalized headers (UID/GID=0, PAX format, epoch-based timestamps). Extraction rejects symlinks, hardlinks, device entries, and path traversal. Per-file size limit (100MB) prevents decompression bombs. gzip.go: Deterministic gzip compression with fixed headers (OS=255, empty name/comment, BestCompression). Decompression with size limit (100MB) prevents decompression bombs. Convenience CompressTar and DecompressTar for combined tar.gz operations. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
rdimitrov
approved these changes
Feb 6, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
tar.go: reproducible tar creation with sorted entries, normalized headers (UID/GID=0, PAX format, epoch timestamps). Extraction rejects symlinks, hardlinks, device entries, and path traversal. Per-file size limit (100MB)gzip.go: reproducible gzip with fixed headers (OS=255, empty name/comment, BestCompression). Decompression with size limit (100MB). ConvenienceCompressTar/DecompressTarhelpersThese are foundational utilities for the skill packager (next PR). No new dependencies added.
Part of #16
Test plan
taskpasses (lint + test)task license-checkpasses🤖 Generated with Claude Code