Sentinel

npm supply-chain security for AI agents.

Sentinel is an auditing proxy in front of registry.npmjs.org. It serves real packages unchanged, scores every tarball with a deterministic audit engine and attaches a verdict, so an agent or a human sees the risk before install-time code runs. It also works as a registry, with audit-gated publishes and verified namespace ownership.

Status

In production useAlpha

Runs at Codento Engine in observe mode. It scores every tarball and blocks none yet.

Maturity
Pre-1.0 alpha. Not production hardened. APIs may change.
Latest release
0.1.0-alpha.3 on npm, released 20 November 2026.
Production use
The auditing npm proxy in Codento Engine's build stack, in observe mode. There are no other production users.
Not yet done
Enforcement (block) mode is not yet proven in production.
Language
TypeScript
License
Apache 2.0

Quickstart

Installs from npm.

The current alpha is 0.1.0-alpha.3. All seven @git-agentic/sentinel-* packages are published under the alpha dist-tag.

shell
$ npm install -g @git-agentic/sentinel-cli@alpha @git-agentic/sentinel-proxy@alpha

# audit a package version before anything installs it
$ sentinel audit is-odd 3.0.1

Features

Sentinel audits each tarball before it installs. In enforced runs, lifecycle scripts execute in a capability sandbox.

In production use

Auditing proxy

The proxy resolves and serves real npm packages unchanged. It intercepts every tarball, scores it and returns the verdict in response headers. For a tarball that has not been retracted, the block policy answers a block verdict with a 403, and observe, the default, reports the verdict and still serves the tarball. A retracted tarball gets a 410 in either mode.

Codento Engine runs this proxy in its build stack in observe mode. It scores every tarball and blocks none yet. Block mode is not yet proven in production.

Deterministic scoring

A score starts at 100 and loses a weighted penalty per finding. An unwaived critical finding produces a block verdict under the default scoring policy. The result is reproducible in CI.

Policy and human approval

Policy is signed per enterprise. An agent can request an approval, and only a human can grant it.

Deny-by-default sandbox

In an enforced run, lifecycle scripts get by default no network, no credential environment variables and no writes outside a fixed floor. Approved capabilities can relax each default. It uses macOS Seatbelt or Linux bubblewrap.

Audit-gated publish

An npm-compatible publish route scores every version before it is accepted and commits atomically.

Verified namespace claims

An organization proves ownership of a name with a DNS TXT challenge on its apex domain. A claimed name is served only from Sentinel's own store.

Time-locked retraction

For native or claimed packages, a publisher can retract a release while it is under both policy limits. The defaults are 72 hours and 1,000 cumulative downloads.

Whole-tree audits

Audit every package in an npm, yarn or pnpm lockfile, write a CycloneDX SBOM, and produce signed attestations that verify offline.

Agent and CI interfaces

A stdio MCP server for agent hosts, a CLI whose exit codes make sentinel audit a CI gate, and a GitHub Action that posts the verdict to the pull request.

How it works

The demo

A previously clean package ships a patch release with a postinstall script that harvests secrets. This is the event-stream pattern. Below is Sentinel's verdict, and what npm install sees when it fetches the bad tarball under the block policy.

sentinel audit
$ sentinel audit color-stream 1.4.1

  color-stream@1.4.1
  ────────────────────────────────────────────────────────
  install    ⚠ runs lifecycle scripts
  score      ░░░░░░░░░░ 0/100
  verdict    BLOCK
  findings (7)
  critical [install-scripts] postinstall reads environment variables,
                              decodes an encoded blob
  critical [secret-exfil]    reads sensitive material (~/.npmrc, AWS
                              credentials) with a network egress sink
  high     [network-egress]  connects to a hardcoded IP address
  high     [obfuscation]     uses eval()

$ npm install --registry http://localhost:4873 color-stream
  HTTP 403  x-sentinel-verdict: block  x-sentinel-score: 0

# and a clean package passes untouched
$ sentinel audit is-odd 3.0.1
  is-odd@3.0.1  → score 100/100  ALLOW  (signed, no install scripts)

This transcript shows the block policy. Under observe the verdict is the same and the tarball is still served. The production deployment at Codento Engine runs in observe mode and blocks nothing yet.

The parts

Scoring
The audit engine starts at 100 and subtracts a weighted penalty per finding. Under the default scoring policy an unwaived critical finding produces a block verdict. The verdict is separate from HTTP enforcement. For a scoring verdict on a tarball that has not been retracted, the proxy answers a block verdict with a 403 under block, and under observe it reports the verdict and still serves the tarball. A retracted tarball gets a 410 in either mode. An LLM adapter can add context to a verdict. It never changes the score.
Policy and approval
Per-enterprise policy is signed, with a lint and a dry-run impact preview against real audit history before signing. Capability manifests declare what a package may do at install time. The agent can request an approval and only a human can grant it, enforced by signed Ed25519 role tokens on the control plane.
Sandbox
The sandbox covers only enforced runs: sentinel run-scripts, sentinel install --enforce and sentinel exec. sentinel install without --enforce only routes npm through the proxy, and a plain npm install or npx is not contained either. In an enforced run the defaults are no network, no credential environment variables, no writes outside a fixed floor, and no $HOME reads except what a script needs: system paths, the Node install prefix, the project root and the build caches. Approved capabilities can relax each default. On macOS, executing a binary outside an approved floor is denied by default. On Linux that restriction needs Landlock and the compiled landlock-exec helper. Without them the run stays filesystem and network confined, and only the listed exfiltration tools such as curl and wget are blocked. A detected violation can quarantine that exact tarball fleet-wide. sentinel exec runs one command under the same sandbox, without a shell and with argument boundaries preserved.
Publishing and resolution
The publish route is npm-compatible. Every version is scored before it is accepted and commits atomically. A deterministic native-versus-mirror rule serves a claimed name only from Sentinel's own store, so public npm cannot shadow it. That closes dependency confusion for claimed names.
Namespace claims
Ownership is proven by a DNS TXT challenge on the organization's apex domain and shipped as a signed, offline claim corpus verified at boot. Claims renew yearly and freeze on failure. A lapsed name never falls through to public npm and never transfers automatically to a domain's new owner.
Retraction
Retraction applies to native and claimed packages, the ones Sentinel serves from its own store. It succeeds only while a release is under both policy limits, by default 72 hours and 1,000 cumulative downloads. Past either limit the release cannot be retracted. A retracted version leaves a 410 tombstone and its identifier is permanently spent. A local retraction takes effect at once on that installation. It reaches other installations only if the advisory is submitted to the steward, which accepts only packages in claimed namespaces. Those installations see it when they load a signed corpus that contains it, and from then on it flags a lockfile that still pins the version.
Release cooldown
Policy can give a freshly published version a block verdict for a wall-clock window. This counters attacks that ship a trojaned release and rely on installs within hours. Last-known-good suggestions respect the window.
Detection
Offline signature and Sigstore provenance verification, known-malicious (GHSA) advisories and CVE-range detection, typosquat and dependency-confusion detection, and release-anomaly findings: maintainer takeover, dormancy resurrection and new capabilities in a patch release. Raw-byte magic classification and loader-chain analysis catch binaries shipped as source files.
Remediation
sentinel explain turns a verdict into per-finding remediation and a suggested last-known-good version. It is advisory and never rewrites a lockfile.
Installers
npm, pnpm, Yarn (1 and Berry) and bun work unmodified against the registry. Leaving registry mode requires an explicit acknowledgement and emits a revert manifest, so claimed names cannot silently flip back to public npm.
History and metrics
Durable history is opt-in and stored in SQLite with no extra dependency. It gives verdict trends, top-flagged packages and a violation timeline on the dashboard, the CLI and /-/metrics.

Security and limits

Sentinel is a pre-1.0 alpha. Read this before you rely on it.

Alpha
Sentinel is pre-1.0 and not production hardened. Its APIs may change.
Observe mode in production
Codento Engine runs Sentinel in observe mode. It scores every tarball and blocks none yet, so enforcement (block) mode is not yet proven in production. In that deployment installs fail closed if the proxy is down, unless someone explicitly bypasses it. No one outside Codento Engine runs Sentinel in production.
Evidence still to collect
The next milestone is design-partner evidence: blocked incidents, false-positive rate and audit latency.
Opt-in behavior
Auto-quarantine is opt-in and auth-gated. Rate limits on expensive routes are opt-in.
Network trust boundary
Tarball fetches are pinned to allowlisted origins to prevent SSRF, Host-header spoofing is refused, and expensive routes have byte caps.

The threat model and the security policy have the details.

Recent changes

November 2026

November 2026

  • 0.1.0-alpha.3 was released on 20 November 2026 under the alpha dist-tag.
  • Sentinel runs in production at Codento Engine as the auditing npm proxy in the build stack, in observe mode.
  • 0.1.0-alpha.3 ships the security-audit fix round (#84) across the scanner, proxy, sandbox, steward, CLI and CI, plus install-script analysis fixes (#89 to #92) covering npm, pnpm, yarn and bun hooks, shell wrappers and bundled node_modules.

Since July 2026

  • Obfuscation false-positive fixes, approval identity coverage and dependency updates.

July 2026

  • 0.1.0-alpha.2 was released on 14 July 2026.
  • The registry work (Phases 30 to 33, ADRs 0045 to 0048) was implemented as of 13 July 2026: audit-gated publishes, verified namespace claims, time-locked retraction, and a registry that npm, pnpm, Yarn and bun can use, with a safe exit path.

Frequently asked questions

What is Sentinel?
Sentinel is an open-source security layer and registry for npm. It audits package tarballs before install-time code runs and returns a deterministic allow, warn, or block verdict.
How does Sentinel protect AI agents that install npm packages?
Sentinel places policy and human approval between an agent request and package execution. The agent can request an exception, but only a human can grant one.
Does Sentinel modify packages from npm?
Its transparent proxy serves upstream packages unchanged while attaching audit findings and a verdict. The registry layer separately supports audit-gated publishing and verified namespace claims.
Is Sentinel production ready?
Sentinel is a pre-1.0 alpha (currently 0.1.0-alpha.3), it is not production hardened, and its APIs may change. Codento Engine runs it in production as an auditing npm proxy in observe mode, where it scores every tarball and blocks none. Enforcement (block) mode is not yet proven in production.

Docs and source

Everything links to the repository on GitHub.