Introducing The Sweep: OX’s New Live Security Research Series
Register Now
Breaking: The 2026 Vulnpocalypse Hits PHP: Four Critical RCEs, but How Dangerous Are They?
Read the Report
Are you exposed? Connect your apps in minutes.
Scan your apps free

safeinstall-cli

Latest version: v0.16.1

Overview

Last scanned
1 Dec 2026
Published
1 Dec 2026
npm package Publisher: mickdownunder
3 Stars
0 Forks
2 Versions
1.1K Downloads
TypeScript Repo language

Scan summary

safeinstall-cli was last scanned on 1 Dec 2026 at version 0.16.1. Risk score 0 of 100. No malicious behavior was detected.

  • Releases: 2 versions; the latest was published on 1 Dec 2026.
  • Findings: No rules fired in version 0.16.1.
  • Downloads: 1,095 downloads.

Versions

2 versions published
Versions and the rules that fired in each
VersionPublishedStatus
0.16.1 LATEST 1 Dec 2026 No rules fired
0.15.0 1 Oct 2026 No rules fired

No rules fired in 0.16.1

Findings

Findings for v0.16.1. The score is a capped sum of the weights of the rules that fired — not CVSS, not exploitability, and not a probability. It is not comparable across packages with different scan coverage.

The score describes 0.16.1; other versions have their own rules, not their own score.

Known vulnerabilities

1 CVE · last 10 Jul 2026

0 CRITICAL 1 HIGH 0 MEDIUM 0 LOW

Versions

  • ≥ 0.10.2
  • < 0.10.2 1 HIGH

Vulnerabilities

  • GHSA-XRMC-C5CG-RV7X High 10 Jul 2026 SafeInstall agent guard shell parsing can miss raw package execution Fixed in 0.10.2

README

The publisher’s own README, as collected from the registry.


What it does

SafeInstall runs your policy before your package manager — locally, blocking by default. One tool, three layers of defense:

  • 🧑‍💻 For the humans who install — prefix supported install commands: safeinstall pnpm add axios. Policy runs first; the resolved lockfile is then checked against the approved version and SHA-512 before the frozen install. Release age, install scripts, untrusted sources, typo-squats, and cryptographic provenance are policy checks.
  • 🤖 For the AI agents that install for you — an MCP tool agents can call, plus a shell guard that intercepts install commands in Claude Code, Codex, and Cursor before they run. Best-effort shell interception — one defense layer that fires even when the agent isn't cooperating, not a lossless guarantee.
  • 🔒 For the files that program the agents — the Agent Trust Surface: a committed hash baseline of your config, hooks, rules, and MCP files, reconciled locally and re-verified in CI, so tampering with the rules surfaces as drift instead of silently owning every future session — with a fully consistent rewrite caught by human review of the diff, not the automated check alone.

Why SafeInstall

AI coding tools suggest packages in seconds. They don't check publish dates. They don't read install scripts. They don't verify the source. You type "yes" and move on.

SafeInstall is the gate between suggestion and execution.

$ safeinstall pnpm add compromised-pkg@9.9.9

Install blocked.
- compromised-pkg@9.9.9
  Blocked: release too new (published 3 hours ago; minimum is 72 hours).
  Blocked: install script present (has postinstall).

No dashboard. No account. No cloud. One command prefix — policy runs locally, blocks by default, then invokes the real tool.


Catching a maintainer-compromise attack

A valid Sigstore signature is not enough. An attacker who compromises an npm maintainer account can publish a malicious version of a package you already trust, and the attestation on that malicious version will cryptographically verify — signed by a GitHub Actions workflow the attacker controls in a fork of the real repository.

SafeInstall catches this. Pin the expected source repository with provenance.trustedPublishers and any build that comes from anywhere else is blocked, even if the signature is valid:

$ safeinstall check
Using config: ./safeinstall.config.json
Check blocked.
- axios@1.99.0
  Blocked: publisher mismatch for axios (expected axios/axios, got evil-org/axios).
  Suggestion: Verify the package source. Update provenance.trustedPublishers only if the change is intentional.

This is the only check of its kind in an install-time policy gate. CVE scanners look for known vulnerabilities. Content analyzers look for suspicious code. SafeInstall enforces that the cryptographic chain of trust points at the repository you agreed to trust — and refuses anything else, no matter how legitimate it looks.

SafeInstall itself is published with a Sigstore attestation. You can eat your own dog food: enable provenance verification, pin safeinstall-cli to Mickdownunder/SafeInstall, and watch SafeInstall verify its own trust chain against the public Sigstore transparency log.

$ safeinstall check
Using config: ./safeinstall.config.json
Info: safeinstall-cli: provenance verified from Mickdownunder/SafeInstall via .github/workflows/release.yml.
Check passed: no direct dependency policy violations found.

Install

npm install -g safeinstall-cli

Node.js >=20 · macOS, Linux, Windows · Command: safeinstall

Quickstart

safeinstall init                      # config + shell guard hooks + trust lock, in one command
safeinstall pnpm add axios            # policy runs, then pnpm
safeinstall npm install               # lockfile-aware project install
safeinstall check                     # audit direct deps against policy

How it works

Resolve → Policy → Lockfile-only preparation → Verify artifact binding → Frozen install
                      Any failed policy or binding check → Exit 2 (blocked)
  1. Resolves the requested version and captures the registry's tarball URL and SHA-512
  2. Fetches registry metadata (publish time, declared scripts)
  3. Evaluates policy rules
  4. For explicit package additions, pins the evaluated version and runs a scripts-disabled, lockfile-only preparation
  5. Checks every direct registry dependency in the affected lockfile scope against its evaluated version, SHA-512, and tarball URL where recorded; applies configured transitive checks
  6. Runs npm ci or pnpm install --frozen-lockfile with scripts disabled and the configured registry enforced; rejects manifest/lockfile changes during evaluation or installation

No registry proxy. No tarball rewriting. No cloud dependency.


Policy defaults

Rule Default Block message
Release age 72 hours minimum Blocked: release too new
Lifecycle scripts preinstall, install, postinstall blocked Blocked: install script present
Source types registry, workspace, file, directory allowed. First-party workspace packages (workspace:, or a path matched by the workspace globs) are always allowed; any other local directory counts as directory and a local tarball as file Blocked: untrusted source
Trust downgrade Flags a dependency that was registry in the committed manifest and is now git/url/tarball or any local source (file:, link:, directory, workspace:). A dependency that was already local at the baseline is not flagged. decisions authorize compares against the base commit's manifest (never the config); check and installs compare against the manifest at git HEAD. sourceBaselines applies only when there is no HEAD manifest (no git, unborn HEAD, untracked manifest), and then missing history fails closed Blocked: trust level dropped
Typo-squat detection Off by default; opt in via typoSquat.mode Blocked: suspected typo-squat
Provenance verification Off by default; opt in via provenance.mode Blocked: attestation missing/invalid/publisher mismatch
Lockfile sources Every entry of an npm or pnpm lockfile, direct or transitive, must come from a source in allowedSources Blocked: transitive dependency resolves from an untrusted source
Transitive install scripts Off by default; opt in via transitive.mode Blocked: transitive install script
Provenance continuity Off by default; opt in via continuity.mode Blocked: provenance downgrade / identity discontinuity

All rules are configurable. Ambiguous or incomplete metadata blocks instead of allowing.

Provenance continuity — catching what npm defaults can't

This is SafeInstall's most distinctive check, and the one no other consumer-side tool does. npm verifies provenance at publish time and binds a package to a source repository — but it does not enforce continuity between versions. A compromised maintainer account can publish a new version with no attestation (from a stolen token), or from a different repository, and npm raises no alarm. This is the signature of the 2026 attack wave (Mastra, the dormant-account republishes).

Continuity learns a per-package trust baseline from the provenance identity of recent versions, then blocks deviations:

  • provenance-downgrade — recent versions were attested, this one isn't. The fingerprint of an account-compromise publish from a personal token. (This is the Mastra case.)
  • identity-discontinuity — this version is attested from a different source repository than the established baseline.

Because the baseline is learned per package, there are no false positives on the large majority of packages that never adopted provenance — they simply have no baseline and the check stays silent. No global "require provenance" sledgehammer.

Continuity verifies the attestation of the target version and of each baseline version locally with the optional sigstore package before using its repository identity (about one second per package, and it needs the Sigstore trust root, so it needs network access to it the first time). An attestation that fails verification counts as no provenance. If sigstore is not installed or the trust root cannot be fetched, continuity is reported as unevaluated with a warning and does not block. Opt in with continuity.mode set to "warn" or "block".

Honest limit: continuity does not catch an attack that comes through a legitimately-compromised CI workflow with valid provenance from the real repository (e.g. the Shai-Hulud worm class). There is no identity discontinuity to detect there. SafeInstall raises the bar against the dominant 2026 attack pattern; it does not close every door.

Transitive dependencies

Most supply-chain attacks reach you through a transitive dependency — a package you never chose, pulled in several levels deep. Two checks read the full lockfile tree, with zero extra registry calls.

Lockfile sources, always on. Every entry of an npm or pnpm lockfile must resolve from a source in allowedSources. An entry whose download address points at another host or a git repository blocks check, project installs and decisions authorize with transitive-untrusted-source, whatever transitive.mode says: a single edited lockfile line is enough to change what gets installed, so this is not opt-in and never degrades to a warning. The public npm registry and the configured registryUrl count as registry. Workspace links are not flagged. If a transitive dependency legitimately comes from git or a URL, add that source type to allowedSources.

Transitive checks, opt-in via transitive.mode:

  • install-script — flags transitive packages that declare a lifecycle script (the ua-parser-js attack class: a deeply nested dependency running code at install time). npm records this in the lockfile; pnpm lockfiles do not, so this check is npm-only for now.
  • untrusted-source — accepted for compatibility. The source check above runs regardless of this entry and of the mode.

Release-age, typo-squat, and provenance are deliberately not run transitively — they would either flood you with noise or require a registry round-trip per package. Transitive evaluation applies to safeinstall check, project installs, and the prepared lockfile for explicit npm/pnpm additions.

OX Radar and Response Center

Find threats in your stack.

OX Radar can check high-priority threats, like critical package CVEs, against your context.

Each incident is marked Detected or Not Detected with a remediation plan and proof all tracked in the Response Center.

Where it’s listed

The probe returned only these fields for this server — auth requirement, protocol and tool list weren’t observed, so they’re not shown (never guessed).

  • npm safeinstall-cli

References

The publisher’s own links, as the registry reports them. These are not sources for the assessment on this page.

Powered by Read the latest findings

Scan your whole stack

Group 1261154050 1
Group 1261154050
 

From OX Research Newsroom

Copy of Template Design OX Blog (2)
Research

NGINX2Root: Five Critical NGINX Flaws Expose Web Servers to Remote Code Execution

Vulnerability Insights

OpenSSH Password Authentication Bypass on Alpine Linux (*sshole) – CVE-2026-123158

Cry2Wolf: How to Tell a Real Bug from a Nothingburger
AI & VibeSec

Cry2Wolf: Not Every Branded Bug Deserves a Fire Drill

Frame 2085668439 (1)
Group 1261154229