Repository navigation
priorart v0.1.2
[0.1.2] - 2026-11-19
Security hardening, release provenance and tests. The matcher, the gates,
the schemas, the vocabularies and the benchmark harness are unchanged
(git diff v0.1.1 v0.1.2 -- src/match src/gates schemas vocab eval shows
only test-fixture strings), so the benchmark numbers in docs/benchmark.md
still describe this build. Five adversarial and property cases priorart gets
wrong today are committed as ignored tests with their inputs
(cargo test -- --ignored).
Added
-
docs/threat-model.md: assets, attackers, trust boundaries and the test or
CI job behind each guarantee, with file and line references. Open items are
marked unverified or read-only.SECURITY.mdanddocs/no-network.mdlink to it. -
Release provenance. Each release archive carries a build provenance
attestation, checked withgh attestation verify <archive> --repo KhomDev/priorart
(install.md). A CycloneDX
software bill of materials,priorart-vX.Y.Z.cdx.json, is attached to each
release and listed inSHA256SUMS. Attestations are made on version-tag runs
only, never on a dry run. -
verify-releaseworkflow. Runs when a GitHub release is published, and by
hand for a given version. It installs that release on Linux, macOS and Windows
three ways (cargo installfrom crates.io, the release archive checked against
SHA256SUMS, andcargo binstall), checkspriorart --version, and runs the
demo build, check and ledger validation. It writes nothing. -
fuzz/cargo-fuzz crate with seven targets: markdown and text import, the uncompressed PDF scrape,program.yaml, known-issues YAML, the ledger YAML, dossier JSON load (with the gates run over a loaded dossier) and the finding profile and matcher. The property is no panic. The targets live infuzz/src/targets.rs, whichtests/fuzz_replay.rsalso compiles, so the committed seeds (fromexamples/and hostile edge inputs) replay through every target on eachcargo testwithout nightly. -
Weekly fuzz workflow (
.github/workflows/fuzz.yml): five minutes per target on nightly, on a schedule and by hand. A crash fails its job and is uploaded as an artifact. -
Property tests (
tests/properties.rs,proptest, dev-dependency only): the dossier bytes do not depend on file creation order; the case of an audit's file name changes only its recorded path and title;check --jsonis identical across runs and validates againstcheck.schema.json; the top-k is a prefix of the larger ranking;--top-k Nreturns at most N items. Two tests are#[ignore]d: adding an item that shares no identifiers can change the top-k, because the generic-symbol threshold depends on the item count. -
docs/test-quality.md:cargo mutantsoversrc/match,src/gatesandsrc/dossier(571 mutants: 389 caught, 158 missed, 6 timeouts, 18 unviable; survival 28.6%) and onecargo llvm-covrun (87.34% line coverage), with the ten most important surviving mutants. Linked from CONTRIBUTING.md. Not gated in CI.
Security
pdftotextruns under limits. It is killed after 60 seconds or after
16 MiB of output, and the source is skipped with a warning, as for any PDF
without text. priorart finds it onPATHitself: relativePATHentries and,
on Windows, the current directory are never searched. The PDF is passed by
absolute path, so a file name beginning with-cannot be read as an option.- Input limits on a build. A folder with a file over 64 MiB, more than 1000
documents, more than 512 MiB of documents,audits/nested past 16 levels or
more than 10 000 directory entries is refused with exit 2 before the files are
read. The error names the limit.
Fixed
- Two unit-test fixtures no longer paraphrase a real finding. The
identifier-matching and PDF-scrape tests used a limiter-refund mechanism
taken from the author's private log. They now use an invented rebate bug
(settle_rebate,claim_rebate). The old text remains in earlier releases
and in git history. pdftotextis retried when the executable is busy. Starting a file that was
written a moment earlier can fail with "text file busy" (ETXTBSY) on Linux or a
sharing violation on Windows. The start is now retried up to ten times, 20 ms apart,
for those two errors only. It madea_pdftotext_that_runs_past_the_timeout_is_killed
fail intermittently on ubuntu-latest.- A dry run dispatched on a branch whose name contains a slash no longer fails
at upload: the archive names use the ref with/replaced by-. The release
step now runs only on a tag, so a dispatch on a branch cannot create a release
or a tag.
Tests
tests/adversarial.rs: inputs built to fool or break priorart, run through the real binary. A finding stuffed with every dossier identifier is ranked within the top-k bound and still reads as a reading list. A denied role does not trip the role exclusion, and exclusion clauses are quoted whole. A malformedprogram.yamland a YAML alias bomb exit 2 or 0 without a panic, and the bomb is bounded in time. Identical audits keep distinct item ids and one digest. An image-only PDF is named as unread. A homoglyph identifier does not match its ASCII form. Terminal control characters in a quote never reach stdout. Three cases fail onmainand are#[ignore]d with the bug named: a double negation is read as the opposite, a hand-edited quote that is in no source is not flagged, and a page past the source's page count is accepted.