Repository navigation
Backlog
2 / 162 of 16 issues completedBacklog
2 / 162 of 16 issues completed
Copy link
Labels
bugSomething isn't working
Description
Why
An audit of 0.17.8 (64599b3) found 86 defects: 1 critical, 4 high, 46 medium and 35 low. The critical one, Zarr codecs that run code, was released as a fix in 0.17.9 (B0, #132), with advisory GHSA-q5v7-469m-2xj2.
What holds up:
- The October fixes. All 3,832 unit tests and 209 cost guards pass, at 95.7% coverage.
- Real data. On three real stores of 6.7 to 55 GB (4.7M × 12k, 4.3M × 480 with layers, 115k × 2.3M), 22 farm runs of subset, split, concat, recast, the CSC transpose, the Zarr round trip, 10x and export/import:
- every output matched its source, by a checker that does not use adata;
- peak memory stayed between 70 MB and 1.6 GB, and was the same at
--chunk64 and 1024.
- Differential fuzzing against anndata (150 to 700 examples per operation, on h5ad, Zarr v2 and sharded v3, at
--chunk1, 3 and the default) found only the five issues filed here.
Where the defects cluster:
- Untrusted input beyond HDF5. October hardened HDF5 links and pickles. The same idea has not yet reached images, the terminal, Zarr links, or the moment pickled objects are built. Zarr codecs it now has (0.17.9).
- Sizes taken from the file. Text widths, header lines, named lengths and fixed-width attributes set how much is read, rather than
--chunkor the stored bytes. - The write path's edges:
- a secondary input (
--raw) that is not checked as an input; - folder sources and transpose scratch with no free-space check;
- Xenium unpacking before the checks;
- staging's rollback and lock takeover in corner cases.
- a secondary input (
- anndata parity on less-travelled paths: imported obs columns, concat's text columns and outer-join padding, float16.
- The RowWriter rule: five converters write blocks straight into chunks they don't match.
- Process:
- the release gate was in the workflow alone (the settings that close it were applied on 2026-12-04);
- a dependency's own advisory went unnoticed, because it never reached GitHub's global database and so raised no Dependabot alert (B0b);
- nothing runs on macOS or Python 3.14;
- two integration suites run in no job;
- coverage uploads fail silently.
Security findings not yet fixed are described here only in general terms until their fix is released.
Plan
15 batches, each one PR and each owning a set of files, plus settings the maintainer applies. Batches in the same wave touch different files, so they run in parallel; a batch that shares files with another starts after it has merged.
| Wave | Batches | Release | Theme |
|---|---|---|---|
| 0 | B0 (done), B0b | 0.17.9 (out), 0.17.10 | Zarr codecs; a patched numcodecs |
| 1 | B1, B2, B3, B4, B5, B6 | 0.17.11: safety | untrusted input, the write path's edges, the release pipeline, the one silent wrong output |
| 2 | B7, B8 | 0.17.12: fidelity | concat, subset, query, split names, converters |
| 3 | B9, B10, B11 | 0.17.13: streaming | reads bounded by bytes, the RowWriter rule, the transpose |
| 4 | B12, B13 | with 0.17.13 | CI and test coverage, packaging and docs |
| none | S | repository settings and housekeeping |
Decisions
Agreed (the last five confirmed on 2026-12-04):
- Versioning: all of it ships as 0.17.x patches.
- Zarr links (B1): links are read through, as anndata reads them, because datalad, git-annex and DVC stores consist of links. A copy never dereferences a link into a stray file, and never leaves the store.
- concat's dense fill under an outer join (B7): match anndata (NaN, widening an integer X only where a cell is filled). The changelog says so.
- Pickles (B2): they stay trusted input in the docs, but the reader keeps its promise to refuse a crafted file rather than crash.
py.typed(B13): dropped, with theTyping :: Typedclassifier. A lenient mypy pass reports 212 errors, and the package is a command, not a library API.- Platforms (B12): a macOS leg for the write-safety tests, and a Python 3.14 leg. The classifiers follow what CI runs.
Rules for every batch
- One PR, on a
fix/<batch>branch frommain. - A regression test for every finding. Its docstring names the ref and says what used to go wrong, and it checks the result with an oracle (anndata, scipy or pandas), not only against the tool's own output.
- Root causes are fixed once. For example, one shared check runs before every read of an untrusted store, and one byte budget sizes every text read.
- Docs in the same PR; a new refusal or flag goes into
docs/reference/commands.md. The changelog entry is written in the PR's description, and the wave's release PR assembles the version's### Fixedsection and updates STATUS.md, as October's waves did, so batches running side by side do not collide in those files. - Merged only after review, and with CI green on the exact commit. The PR lists the refs it closes.
- The audit's repro script for each finding gives a refusal or the correct output on the fix branch.
Sub-issues
- B0: Hotfix: Zarr codecs that run code (released in 0.17.9) #133 B0: Hotfix: Zarr codecs that run code (released in 0.17.9)
- B0b: A patched numcodecs #134 B0b: A patched numcodecs
- B1: Store and folder inputs #135 B1: Store and folder inputs
- B2: Pickle reader #136 B2: Pickle reader
- B3: Names, images and pipes #137 B3: Names, images and pipes
- B4: Staging, scratch and free space #138 B4: Staging, scratch and free space
- B5: Release pipeline #139 B5: Release pipeline
- B6: Elements written by
import#140 B6: Elements written byimport - B7: concat, subset, query and split names #141 B7: concat, subset, query and split names
- B8: Converters' fidelity #142 B8: Converters' fidelity
- B9: Reads bounded by bytes, not by what a file claims #143 B9: Reads bounded by bytes, not by what a file claims
- B10: Blocks that match the output's chunks #144 B10: Blocks that match the output's chunks
- B11: Core algorithms #145 B11: Core algorithms
- B12: CI and test coverage #146 B12: CI and test coverage
- B13: Packaging and docs #147 B13: Packaging and docs
- S: Settings and housekeeping (no PR) #148 S: Settings and housekeeping (no PR)
Done when
- Every batch is merged, and 0.17.10 to 0.17.13 are tagged (0.17.9 is out).
- Each ref is closed in its PR.
- The remaining repository settings are applied, and the two renamed jobs are required checks on
main. - The audit's repro scripts give a refusal or the correct output against
main. - The new tests guard the general rules, not only the findings:
- the Zarr guard runs against every store anndata 0.7.8 to 0.13 writes (done in B0);
- a byte budget is asserted for every text read;
- the RowWriter rule's encode counts are guarded for every converter;
- the write-safety tests run on macOS.
Sub-issues
Collapse Sub-issuesSub-issues
Loading 16 sub-issues
Metadata
Metadata
Assignees
Labels
bugSomething isn't working
Activity
import#140