v0.3.0 - Seed Database, Expanded Ruleset, CLI Overhaul
TL;DR
Cold-start INCONCLUSIVE eliminated via an auto-imported novelty seed. 14 new detection rules (R039-R059), 4 new context rules (C004-C007), and a homograph detection rewrite. CLI overhaul with rich tiered inspect output, override management, seed import, and rules linting. PKGBUILD maintainer now correctly extracted from the # Maintainer: comment (was silently returning None).
Added
- Novelty seed database: bundled
seed.db.gz(178k source URLs, maintainer counts) auto-imported on first run. Removes the cold-start penalty where every Medium verdict was downgraded to INCONCLUSIVE because maturity was permanently zero. - 14 detection rules (R039-R059): eval with dynamic content, shell -c with dynamic payload, shell network redirection (
/dev/tcp), download-then-execute, base64 blob decode, interpreter one-liner with network access, binary encoding pipe, source URL uses IP address, source URL on non-standard port, source URL on free registrar TLD, compiler hardening disabled, setuid/setgid bit (in and outside $pkgdir), persistence unit outside package root, git clone with variable branch, download-then-source, TLS verification disabled, write outside package root. - 4 context rules (C004-C007): checksum removed for unchanged source (CRITICAL), binary artifact from untrusted source (MEDIUM), maintainer change with new source domain (HIGH), command substitution in source array (CRITICAL).
- CLI
inspectoverhaul: rich tiered score breakdown (structural, priors, novelty, verification), source URL table with bucket classification, suppressed rules display, deceptive codepoint description panel. - CLI
override: add/rm/list rule suppressions with scoped package support. FATAL-severity findings can never be suppressed. - CLI
seed-db: import the bundled novelty seed or a custom seed file, with force-reimport support. - CLI
lint-rules: validaterules.tomlfor unreachable or over-broad patterns, detect missing shipped rules. - CLI
config sync-rules: append newly shipped rules to an existingrules.toml, optionally replace superseded shipped patterns (user-edited rules are never touched). [seed]and[rules]config sections:auto_importtoggle,experimentalflag to gate new rules before calibration.- Override system
filter_triggered_rulesnow returns suppressed rule dicts: with reason and scope, so the report can show what was hidden and why. describe_fatal_codepoints(): reports offset and Unicode name of each deceptive character a FATAL finding matched.
Fixed
- PKGBUILD maintainer was always None: fetcher was reading
.SRCINFO(which never carries amaintainer=field in AUR mirrors). Now reads# Maintainer:fromPKGBUILDwith.SRCINFOas fallback, restoringmaintainer_changed, maintainer novelty weight, and C006. - Homograph detection bypass via punycode:
xn--encoded confusables (e.g.github.xn--githb-6rd.com) were not decoded before analysis. New mixed-script detection also catches non-ASCII Latin diacritics within the same script. - Legitimate IDN false positives: Japanese (Han + kana), Korean (Han + Hangul), and all-Cyrillic domains are no longer flagged as homographs.
fallback_verdictclaimed clean packages were suspicious: was showing "No suspicious patterns detected" even on packages scoring 100/100 with CRITICAL rules. Now lists the top 3 signals by severity and says "No risk signals fired" on clean packages.trustsight config shownow prints all scoring weights: previously only showed LLM settings.SHA256=('SKIP')no longer earns verification or pinning credit: a skipped checksum was being credited aschecksum_present(-10) andchecksum_pinned(-5) while also firing R004.- Corpus mirror-check CI: was failing due to drift between
corpus.lockandbenign-corpus/. Lock regenerated from on-disk state.
Updated
- CLI output:
reviewnow shows a 4-column table (Package, Score, Risk, Verdict) with caption noting how many packages exceeded the CLEAN threshold.inspectgroups findings by evidence tier (A/B/C/D). Risk table sorted by score descending. - CLI
history: table usesSIMPLE_HEADstyle; score breakdown shown as sub-table when--score-breakdownis passed. - Novelty weights: recalibrated after tier C went live:
url_first_in_package10->5,url_first_globally15->10,maintainer_first_in_package20->15. Prevents a borderline package from jumping straight to High. - Homograph detection in
buckets.py: completely rewritten with_script_of(),_decode_punycode(), and compatible script groups. - Rule engine: supports
experimentalflag, function-name scoping (build(),pkgver(), etc.), andadded_onlyfilter for raw-line rules. detect_verification_evidence: now takeschecksum_behaviorparameter so SKIP is never incorrectly credited.- Docs: all stale weighting values and rule ranges corrected across 7 doc pages; missing
first_seenandsuppressed_rulesfields documented in report schema. rebaseline.py: new--order chain|filenameand--warmflags for true commit-order replay with observation counting.build_corpus.py: validates existing bare repos, handlesgit clonetimeouts (6h), cleans up partial clones on interrupt.- Packaging: AUR
PKGBUILDnow follows Arch packaging guidelines: single-quoted strings,python-pytestin makedepends, no--no-isolation, description under 80 chars, no self-referencing.
Stats
- 19 commits since v0.2.1
- 574 tests, all passing (was 267)
- 21 new rules (14 detection + 4 context + restored C006/C007 from prior work)
- 178k seed URLs: auto-imported on first run, no manual step needed
- 100% FATAL recall preserved, CRITICAL p5 unchanged at 40