PicoSentry โ deterministic supply-chain scanner for npm/pnpm, safe for ML pipelines
Project description
PicoSentry ๐ฆ
Deterministic, offline supply-chain scanner for npm/pnpm.
PicoSentry is the first product in the Pico security series โ a set of deterministic security tools for software supply chains. Companion tools: PicoDome (runtime sandbox), PicoWatch (LLM defense), PicoShogun (command centre).
Same inputs + same corpus version = same findings and scan fingerprint. Every time.
No HTTP at scan time. No probabilistic heuristics. No narrative in findings.
Deterministic output: Default JSON includes audit timestamps and timing data. For byte-identical CI artifacts, use
--deterministic-outputor--verify-determinism.
Quick Start
pip install picosentry
# Scan a project
picosentry scan ./my-project
# CI gate (exit 1 on HIGH+CRITICAL)
picosentry check ./my-project --fail-on high
# Deterministic JSON
picosentry scan ./my-project --format json --deterministic-output
# Verify byte-identical determinism
picosentry scan ./my-project --verify-determinism
# Monorepo scan
picosentry workspace .
# CycloneDX SBOM
picosentry scan ./my-project --format cyclonedx
What It Detects
21 deterministic rules across 6 attack categories:
| Category | Rules | Severity |
|---|---|---|
| Post-install scripts | L2-POST-001 | HIGHโCRITICAL |
| Obfuscation | L2-OBFS-001..004 | HIGH |
| Dependency confusion | L2-DEPC-001 | HIGH |
| Typosquatting | L2-TYPO-001 | MEDIUMโHIGH |
| Manifest anomalies | L2-MANI-001/002 | MEDIUM |
| Fork drift | L2-FORK-001 | MEDIUM |
| Credential exposure | L2-CRED-001 | HIGHโCRITICAL |
| Lockfile drift | L2-LOCK-001 | MEDIUM |
| Bundled shadow code | L2-BUND-001 | HIGH |
| Provenance | L2-PROV-001 | MEDIUM |
| Maintainer changes | L2-MAINT-001 | MEDIUM |
| pnpm config | L2-PNPM-001 | MEDIUM |
| License violations | L2-LICENSE-001 | MEDIUM |
| Engine constraints | L2-ENGIN-001 | LOW |
| Protocol sideloading | L2-SIDELOAD-001 | HIGH |
| Advisory lookup | L2-ADV-001 | MEDIUMโCRITICAL |
See SCAAT.md for the full attack-vector-to-rule mapping.
Deterministic Guard Stack
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ Layer 4: CI Gate โ
โ --verify-determinism (CLI) โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโค
โ Layer 3: Diff โ
โ picosentry diff a.json b.json โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโค
โ Layer 2: Guard (runtime) โ
โ Validates invariants after each scan โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโค
โ Layer 1: Models (structural) โ
โ Frozen dataclasses, sorted keys โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
CLI Reference
picosentry scan <target> [OPTIONS] Scan a project directory
picosentry check <target> [OPTIONS] CI health check (exit-code only)
picosentry workspace <root> [OPTIONS] Scan monorepo
picosentry corpus export/import/list Manage IoC corpus packs
picosentry ioc register/list/remove Manage custom IoCs
picosentry rules [--json] List detector rules
picosentry version Version, corpus, rule count
picosentry diff <a.json> <b.json> Compare scans for determinism
picosentry init [target] [--force] Generate .picosentry.yml
picosentry update [--top N] Download latest npm corpus
Scan Options:
--format, -f json, sarif, table, ml-context, github, cyclonedx
--output, -o Write output to file
--rules, -r Run only specific rules
--corpus, -c Path to corpus directory
--exit-code Exit 1 if findings found
--fail-on Exit 1 only at or above severity
--quiet, -q Summary only
--baseline, -b Path to baseline JSON or ignore file
--verbose, -v Per-rule timing and scan details
--timeout Scan timeout in seconds (0 = no timeout)
--deterministic-output Omit timestamps for byte-identical output
--verify-determinism Run twice, verify SHA-256 match
Daemon Mode
PicoSentry can run as an HTTP daemon for CI integration and team use:
# Token auth
PICOSENTRY_AUTH_TOKEN=your-token picosentry daemon --port 9090
# OIDC/JWT auth
PICOSENTRY_AUTH_MODE=oidc picosentry daemon --port 9090
# Enterprise mode (fail-closed defaults)
PICOSENTRY_ENTERPRISE_MODE=1 picosentry daemon --port 9090
See docs/DAEMON.md for full daemon configuration, RBAC, and TLS.
Architecture
picosentry/
โโโ cli.py # CLI entry point
โโโ engine.py # ScanEngine orchestrator
โโโ models.py # Finding, ScanResult (frozen dataclasses)
โโโ guards.py # Deterministic guard stack
โโโ config.py # .picosentry.yml loader
โโโ daemon.py # HTTP daemon (health, scan, metrics)
โโโ auth.py # Token + OIDC/JWT auth, RBAC scopes
โโโ enterprise.py # Fail-closed enterprise mode enforcement
โโโ rules/ # 21 detector rules (pure functions)
โโโ formatters/ # 6 output formats
โโโ corpus/ # Built-in IoC database
Status
See STATE.md for honest project status โ what's production-ready, what's scaffolded, what's not built.
Documentation
- SCAAT.md โ Attack-vector-to-rule mapping
- SECURITY.md โ Vulnerability reporting
- CONTRIBUTING.md โ How to contribute
- CHANGELOG.md โ Release history
- LICENSE โ BUSL-1.1
- COMMERCIAL-LICENSE.md โ Commercial licensing
License
Business Source License 1.1 (BUSL-1.1) โ source-available; production use allowed except for competitive offerings. Commercial use that competes with KirkForge's paid products requires a separate commercial license. After 3 years, converts to Apache-2.0. See LICENSE, LICENSE-SUMMARY.md, and COMMERCIAL-LICENSE.md.
Pico Security Series
| Tool | Purpose |
|---|---|
| PicoSentry ๐ฆ | Deterministic offline supply-chain scanner |
| PicoDome ๐ก๏ธ | Runtime sandbox + behavioral analysis |
| PicoWatch ๐๏ธ | LLM prompt/output defense + telemetry |
| PicoShogun | Command centre (enterprise) / panel (personal) |
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file picosentry-1.0.1.tar.gz.
File metadata
- Download URL: picosentry-1.0.1.tar.gz
- Upload date:
- Size: 360.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
e45af460c65fc6d95e5d90a67a5e5bd54a6fb9c77da853340ed009cd61c00f45
|
|
| MD5 |
8c6bf32a940b37729561b482b6464a19
|
|
| BLAKE2b-256 |
6a14806cb5c85486ebfc65d92ebf6fe8405a02ace56f23cc377a9aaf27215897
|
File details
Details for the file picosentry-1.0.1-py3-none-any.whl.
File metadata
- Download URL: picosentry-1.0.1-py3-none-any.whl
- Upload date:
- Size: 247.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
3145d9dbf374d5d8dc4a78020fce9859a0d2e4762e29ed52cea3316c865e4062
|
|
| MD5 |
1d96f0748680f72a686ee915e9ada81d
|
|
| BLAKE2b-256 |
7937cc9f8af84c09525f124e568500dc728ad76d12c8e1b23e0612961034767f
|