Skip to main content

PicoSentry

PicoSentry Banner

PyPI version Python License: BUSL-1.1 Docker Hub Docker Image Version Docker Image Size Build Status Downloads GitHub Stars GitHub Issues Code style: ruff SLSA


Catch malicious packages before they bite. PicoSentry is an offline, deterministic supply-chain security suite: a static scanner for typosquatting, dependency confusion, obfuscation, exfiltration, IOCs and CVEs across 7 ecosystems; a kernel sandbox; an LLM prompt/output guard; and a multi-tenant API server tying them together. No internet required, no phone-home, bit-identical output for identical inputs.

All technical documentation lives in the manual — install options, CLI reference, every detection rule, deployment, security model, operations, and benchmarks.


60-second quickstart

pip install picosentry
picosentry scan ./your-project

Works offline, deterministic, no API keys. Try it on a built-in malicious fixture:

git clone https://github.com/KirkForge/PicoSentry.git
cd PicoSentry
picosentry scan examples/pypi-obfuscated-setup/

The scan fires 5+ findings across obfuscation, post-install, and exfiltration rules. Re-run it: the Scan ID and Corpus digest match exactly — that's the determinism guarantee (--verify-determinism asserts it in CI).


The four components

picosentry scan — the static supply-chain scanner. Analyzes package manifests, lockfiles, and source across npm, PyPI, Go, Cargo, Maven, RubyGems, and NuGet: 53 L2 detection rules covering typosquats, dependency confusion, install-time execution, obfuscation, credential access, network exfiltration, known CVEs (OSV), and license compliance. Advisory findings carry a reachable flag so present-but-unused CVEs triage faster. → Manual ch. 5

picosentry sandbox — the runtime sandbox (PicoDome). Executes untrusted commands under seccomp-bpf (Linux) or seatbelt (macOS), records syscall-level behavioral events for L4 analysis, and ships as an HTTP + gRPC sandbox-as-a-service daemon with auth, rate limiting, TLS/mTLS, and token-scoped multi-tenancy. → Manual ch. 8

picosentry watch — the LLM defense layer (PicoWatch). Deterministic, offline prompt-injection detection (L5) and output-policy validation (L6): regex rules plus a lexical classifier behind a normalizer that defeats base64/ROT13/homoglyph/zero-width obfuscation. A fast pre-filter, honestly not a semantic guarantee. → Manual ch. 7

picosentry serve — the control plane. FastAPI API server with dashboard, RBAC (viewer/operator/admin), MFA/TOTP, JWT revocation, role-scoped API keys, multi-tenant SQLite/Postgres persistence, plugins, scheduling, alerting, and cross-layer kill-chain correlation (Beta). → Manual ch. 9

Also: picosentry firewall (registry metadata proxy), daemon, admission (K8s webhook), corpus, advisories, update, diff, doctor, rules, init, health, version — full CLI reference in the manual ch. 4.


Status

Component Status Notes
picosentry scan Stable Core scanner; 7 ecosystems; deterministic, offline; 53 rules, 5674 fixtures
picosentry sandbox Stable seccomp-bpf enforces; gRPC + HTTP daemon; L4 behavioral analysis; seccomp-trace is opt-in and argument-limited
picosentry watch Stable Deterministic regex + lexical classifier pre-filter for prompt injection (L5) and output validation (L6); not a semantic/LLM guarantee; CLI + HTTP server
picosentry serve Beta API server, dashboard, RBAC, multi-tenant Postgres backend — security review + regression tests in place. Auth hardening: MFA/TOTP enrollment, JWT jti revocation, account lockout, role-scoped API keys (services/auth.py)
picosentry daemon Beta Sandbox-as-a-service; HTTP + gRPC; auth, rate limiting, TLS/mTLS, audit
picosentry admission Beta K8s admission webhook; pod security validation + optional image scanning; fail-closed by default when image scanning is enabled; live-tested against a kind cluster
picosentry corpus Stable Export/import/validate/list/sign IoC packs; 3 built-in packs; deterministic signatures
Cross-layer correlation Stable Links findings across scan + sandbox + watch layers; persistence, dedup, and per-minute backpressure tested in CI
Plugin system Stable Loads, validates, dispatches; Ed25519 signature verify against a configured trusted-key allowlist; unsigned plugins load only when signing is not required
Postgres backend Stable psycopg2 pool + runtime placeholder translation + DDL auto-translation + dialect helpers; live PG 15/16/17/18 CI
Cluster mode Beta Gossip over HTTP(S) with shared cluster token + optional mTLS; monotonic versioning; 3-node integration test
Detection benchmarks Stable 5674 fixtures (3431 pos / 2236 neg), 53 rules, 100.00% prec, 90.87% recall — see docs/model-card.md
Docker image Stable multi-arch (linux/amd64 + linux/arm64), non-root; latest published: kirkforge/picodome:v2.0.18 — kirkforge/picodome:v2.2.0 push pending (WO5.0.0-014)
PyPI package Stable pip install picosentry — v2.2.0 published

"Beta" = works, has regression + security tests, suitable for controlled production use. This table is generated from picosentry/experimental.py and CI-enforced against drift. Per-component reviews: manual, security chapters.


Install

pip install picosentry                # core (offline-ready)
pip install picosentry[scan]          # + online corpus management
pip install picosentry[serve]         # + API server + dashboard
pip install picosentry[all]           # everything

Docker: docker pull kirkforge/picodome:v2.0.18 (latest published; multi-arch, non-root) — kirkforge/picodome:v2.2.0 push pending (WO5.0.0-014). All install options incl. [grpc], [watch-server], [otel], [sigstore]: manual ch. 2.


The manual

Everything technical is in docs/manual.md:

Quick start · Install · Docker · CLI reference · Scanner · Firewall · Watch · Sandbox · Serve · Plugins · Architecture · Configuration · Runbook · Offline · Deployment security · Threat model · Attack surface · Benchmarks & model card · Internal API map · Extension guide · Limitations & status · ADR index

Reference files that stay standalone: generated per-rule benchmark table docs/BENCHMARKS.md (CI-enforced) and the ADRs.

Supply chain: wheel builds are reproducibleSOURCE_DATE_EPOCH is pinned from the commit timestamp in release.yml, the Dockerfile, and CI, so the same source yields a byte-identical wheel (asserted by the CI reproducible-build job). Details: manual ch. 15.


Getting help


License

BUSL-1.1 — see LICENSE and COMMERCIAL-LICENSE.md.

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

picosentry-2.2.0.tar.gz (837.1 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

picosentry-2.2.0-py3-none-any.whl (1.1 MB view details)

Uploaded Python 3

File details

Details for the file picosentry-2.2.0.tar.gz.

File metadata

  • Download URL: picosentry-2.2.0.tar.gz
  • Upload date:
  • Size: 837.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.12.1 {"installer":{"name":"uv","version":"0.12.1","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

File hashes

Hashes for picosentry-2.2.0.tar.gz
Algorithm Hash digest
SHA256 8fcf18a6572ff470337b8846de8dcf750a7792afa8c974474fa08a8a67a44353
MD5 9afb07d9a173da538764ea9e4ff1e7cf
BLAKE2b-256 c7d20178af803539b5bf9778e15c164a8fabdc4b26347b3d117d2657c37fda58

See more details on using hashes here.

File details

Details for the file picosentry-2.2.0-py3-none-any.whl.

File metadata

  • Download URL: picosentry-2.2.0-py3-none-any.whl
  • Upload date:
  • Size: 1.1 MB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.12.1 {"installer":{"name":"uv","version":"0.12.1","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

File hashes

Hashes for picosentry-2.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 5b70b9fa6f7ccd0f29e89bdb93934ce6a176c169137b681060c9564556f750af
MD5 7d458311dbcd5c8866e18e9ad28f67a2
BLAKE2b-256 36863405b1ec854dae13077b75430ca23fedd41e5f6f073294f9099719f93326

See more details on using hashes here.

Release history Release notifications | RSS feed

This release

2.2.0 This release

2 files

2.1.3

2 files

2.1.2

2 files

2.1.1

2 files

2.1.0

2 files

2.0.18

2 files

2.0.17

2 files

2.0.13

1 file

2.0.9

2 files

2.0.7

2 files

2.0.2

2 files

2.0.1

2 files

1.0.1

2 files

1.0.0

2 files

0.16.0

2 files

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page