Skip to content

Harden Pithos archive parsing, extraction, and block handling#35

Merged
das-Abroxas merged 14 commits into
mainfrom
fix/security-correctness-interoperability
Jul 23, 2026
Merged

Harden Pithos archive parsing, extraction, and block handling#35
das-Abroxas merged 14 commits into
mainfrom
fix/security-correctness-interoperability

Conversation

@das-Abroxas

Copy link
Copy Markdown
Contributor

These changes hardens pithos_lib across archive writing, parsing, reading, extraction, and append flows. It addresses multiple correctness and security issues around compression handling, path safety, external block access, malformed archive validation, directory integrity, plaintext integrity checks, header/version validation, and append-time block reuse.

What changed

Additional changes

  • Added and expanded regression coverage in pithos_lib integration tests for writer, reader, marshalling, and robustness scenarios.
  • Updated dependency metadata, workspace crate versions, CI/release workflows, license files, and README badges/documentation.

Testing

  • Added coverage for malformed headers, invalid archive bounds, corrupted directory metadata, plaintext/block corruption, path traversal and symlink extraction escapes, external block reads, compression level zero, and duplicate append block reuse.
  • Verified the branch with the relevant pithos_lib integration tests and workspace checks.

@das-Abroxas das-Abroxas self-assigned this Jul 21, 2026
@das-Abroxas das-Abroxas added bug Something isn't working enhancement New feature or request labels Jul 21, 2026
@codecov

codecov Bot commented Jul 21, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 89.62062% with 145 lines in your changes missing coverage. Please review.
✅ Project coverage is 76.60%. Comparing base (218c888) to head (6f8bd26).

Files with missing lines Patch % Lines
crates/pithos_lib/src/io/pithosreader.rs 79.83% 74 Missing ⚠️
crates/pithos_lib/src/model/deserialization.rs 89.58% 20 Missing ⚠️
crates/pithos_lib/src/io/extraction.rs 80.61% 19 Missing ⚠️
crates/pithos_lib/src/helpers/crypt4gh.rs 80.64% 12 Missing ⚠️
crates/pithos_lib/src/io/pithoswriter.rs 84.84% 10 Missing ⚠️
crates/pithos_lib/src/helpers/file_entry_map.rs 96.17% 6 Missing ⚠️
crates/pithos_lib/src/helpers/directory.rs 91.17% 3 Missing ⚠️
crates/pithos_lib/src/model/structs.rs 95.65% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main      #35      +/-   ##
==========================================
+ Coverage   69.07%   76.60%   +7.52%     
==========================================
  Files          17       19       +2     
  Lines        2985     4154    +1169     
==========================================
+ Hits         2062     3182    +1120     
- Misses        923      972      +49     

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@St4NNi
St4NNi self-requested a review July 22, 2026 18:56

@St4NNi St4NNi left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These are quite a few long standing issues that have been fixed. LGTM!

@das-Abroxas
das-Abroxas merged commit 2c27a51 into main Jul 23, 2026
13 checks passed
@das-Abroxas
das-Abroxas deleted the fix/security-correctness-interoperability branch July 23, 2026 07:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment