Skip to content

Harden LowPack for 0.2.0 - #9

Merged
devkyato merged 1 commit into
mainfrom
agent/hardening-0-2-0
Jul 29, 2026
Merged

Harden LowPack for 0.2.0#9
devkyato merged 1 commit into
mainfrom
agent/hardening-0-2-0

Conversation

@devkyato

Copy link
Copy Markdown
Owner

What changed

I treated every input path and archive field as potentially hostile and completed the coordinated 0.2.0 hardening pass:

  • centralized path and filesystem-identity collision handling
  • symlink-cycle and output-inside-input protection
  • bounded dictionary sampling plus single-descriptor source snapshots and mutation detection
  • centralized dictionaries and preferred-versus-actual deduplication explanations
  • strict, separately versioned manifest relationship validation
  • chunk-streamed ordinary verification and extraction
  • bounded, structurally validated telemetry reconstruction
  • opt-in masked permission restoration
  • deterministic policy names that do not claim measured speed
  • payload, tar-container, and full-archive benchmark scopes
  • hostile archive generation, resource regression tests, and Atheris smoke CI
  • reproducible wheel and source-distribution builds

Why

The 0.1 implementation had good defensive foundations, but hostile archive handling needs correctness and resource guarantees at every boundary. Several paths could previously create invalid archives, consume memory proportional to total output, or report a preferred codec as though it were the representation actually reused by deduplication.

Impact

This intentionally advances the binary format to 1.1 and introduces manifest schema 2.0. Ordinary extraction and full verification now use bounded chunk memory. Canonical telemetry remains memory-resident behind an explicit 64 MiB cap; full transform streaming and alpha migration tooling remain tracked separately.

Validation

  • 62 tests collected; 59 passed and 3 expected platform skips on Windows
  • Ruff passed
  • strict Mypy passed
  • lowpack doctor passed
  • wheel and sdist reproduced byte-for-byte across two isolated builds
  • clean wheel install passed pack, quick/full verify, explain, unpack, and canonical telemetry smoke tests

Closes#8

@devkyato
devkyato marked this pull request as ready for review July 29, 2026 10:58
@devkyato
devkyato merged commit d61c475 into mainJul 29, 2026
10 checks passed
@devkyato
devkyato deleted the agent/hardening-0-2-0 branch July 29, 2026 10:58
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Harden archive handling for hostile inputs

1 participant

@devkyato