1.1.0 — 2026-08-05 — PyPI ecosystem support
In plain terms: pkgxray now scans Python packages, not just npm. Point it
at a Python lockfile or a pypi: package and it runs the same engine — OSV,
quarantined download, behavioral scan, cited verdict.
What changed
- Python manifests.
pkgxray auditnow acceptsrequirements.txt,
poetry.lock,Pipfile.lock, andpyproject.toml, resolving each to
PEP 503-normalizedname@versiondeps and querying OSV'sPyPIecosystem.
Exact pins are vetted; ranges / VCS / URL / editable installs are surfaced as
unresolved rather than counted safe. pypi:guard.pkgxray guard pypi:name@versionstages the source
distribution (a.tar.gz, reusing the npm download + integrity-verify +
extraction path), pinned tofiles.pythonhosted.org, and runs the full
behavioral audit. Wheel-only versions get a metadata-only audit.- PyPI registry client (
src/pypi.js) — package existence (a name PyPI
never published is the hallucinated/slopsquat signal), version list, and
metadata mapped onto the same evidence contract the heuristics already use
(project_urls→repository,ownership.roles→maintainers,yanked→deprecated). setup.py/pyproject.tomlinstall-hook detection.pip installof an
sdist executessetup.py; pkgxray blocks the dropper shape (dynamic exec over
a decoded or network-fetched payload) and flags generic install-time execution
(subprocess / customcmdclass/ in-treebackend-path) for review.recheckmonitors PyPI lockfiles.pkgxray recheck requirements.txt
now buildspypi:guard refs and pre-vets newer versions with a real PEP 440
comparator (src/pep440.js) — epochs, pre/post/dev ordering — instead of
mis-ordering PyPI versions through the semver path. npm lockfiles are
unaffected.- Behavioral engine scoped to the languages it models. The shared
JS-primitive behavioral detectors (env-harvest+network, dynamic-require,
persistence, credential-access, …) are calibrated for JavaScript and
false-fire on ordinary Python — aos.environread read as a token-harvest, a
lexer's.bashrcfilename string as an rc-file write. A top-1000 PyPI scan
measured a 7.9% heuristic false-block rate driven entirely by these detectors
on.py. They now skip source in a language the engine doesn't model (Python);
a Python sdist is audited by thesetup.py/pyprojectinstall-hook detectors,
OSV, metadata/governance, and the language-neutral checks (prompt-injection,
hidden-unicode) — which still run on every file. A.pya lifecycle script
actually executes is not skipped. npm scanning is byte-for-byte unchanged
(npm ships behavioral payloads in.js/.sh/.gyp, none of which are
gated). Deep per-.pybehavioral parity is tracked for a later release. - PyPI calibration. A committed PyPI benchmark cohort (5 malicious sdist
droppers + 7 benign shapes) is gated in CI alongside the npm corpus, and
scripts/validate-at-scale.js --ecosystem pypiproves 0 heuristic false blocks
across the top-1000 most-downloaded PyPI packages — the same regression-gated
bar the npm claim rests on. - No detection change for npm. The shared behavioral engine is untouched for
npm; ecosystem is threaded file-level from the manifest format. 50 new tests.