Foster
OfficialChecks Bun install commands, lockfiles, and create commands for malware, hallucinated names, and risky dependencies before execution.
Checks Composer install commands and PHP package metadata for malware, hallucinated names, and risky dependencies before execution.
Checks npm install, npx, and create commands and npm lockfiles for malware, hallucinated names, vulnerabilities, and abandoned packages before installs run.
Reads Packagist registry metadata to verify PHP package existence and check for malware, hallucinated names, and abandoned or vulnerable packages.
Checks pipx install commands for malware, hallucinated names, and risky packages before execution.
Checks pnpm install commands, lockfiles, and workspace configuration for malware, hallucinated names, and risky dependencies.
Checks Poetry install commands and lockfiles for malware, hallucinated names, and vulnerable or abandoned dependencies.
Reads PyPI registry metadata to verify package existence and check for malware, hallucinated names, and abandoned or vulnerable packages.
Reads RubyGems registry metadata to verify gem existence and check for malware, hallucinated names, and abandoned or vulnerable packages.
Checks Yarn install commands and lockfiles for malware, hallucinated names, and risky dependencies.
Stop AI agents, and people, from installing malware, hallucinated names and packages nobody can fix. Then find the dependencies nobody maintains anymore, and the fixes that exist for them.
Foster checks every package a command would install before it runs, and scans the dependencies you already have. Open source, no account or API key, six ecosystems: npm, PyPI, Cargo, Go, RubyGems and Packagist.
Works in the coding agent you already use. One Agent Skill teaches Claude Code,
Codex, Cursor, Gemini CLI, GitHub Copilot, OpenCode, Hermes, Windsurf and 20+ other agents to check every
install first, including the npm create that starts a new project. Also a Claude Code plugin (hook, skill
and MCP server in one step), an MCP server in the official registry, a CLI and a GitHub Action.
npx foster-oss skill install # teach your coding agent to check every install first
npx foster-oss guard -- npm install some-package # check an install before it runs
npx foster-oss scan # what in my lockfile is orphaned, or vulnerable with no fix?
npx foster-oss fund # which at-risk dependencies I rely on, and who to sponsor
npx foster-oss fix # switch to published drop-in patches (edits package.json)The Orphan Index, a public dataset of which critical packages are unmaintained, is live at https://foster-oss.github.io/foster/ and rebuilt every week.
Guard: check installs before they run
Coding agents run npm install and pip install on their own. The package they pick can be a
hallucinated name (attackers register those: "slopsquatting"), a look-alike of a popular package,
known malware, or abandoned with holes nobody will fix. foster-oss guard decides before anything runs:
Situation | Decision |
The package or version is known malware (OSV, including the OpenSSF malicious-packages database) | deny |
The name does not exist on the registry (checked against the real registry, not just an index) | deny, with "did you mean …?" |
A vulnerability that no release fixes | deny, with maintained alternatives |
A look-alike of a far more popular package ( | ask |
npm: a package first published in the last 30 days that runs an install script | ask, showing the script |
npm: a fresh release that adds an install script the previous release did not have (how the 2025 Shai-Hulud worm spread) | ask, suggesting the previous version |
Brand-new package that no index tracks yet | ask |
Installed straight from a URL or git ( | ask, since no database covers it |
A vulnerable version that a newer release fixes, or a drop-in patch exists | ask |
Dead or dormant, with no known vulnerability | allowed, with a note and maintained alternatives |
Everything else | allowed silently |
Install scripts are questions, not blocks: native modules run them too. A typical check takes one to two seconds, and guard fails open: if the registry or OSV can't be reached, the install goes ahead.
What guard reads
The names on the command line are only part of what an install puts on disk. Guard understands npm, pnpm,
yarn, bun, pip, uv, poetry, pipx, pipenv, cargo, go, gem, bundle and composer, including cd app && npm i -D x
chains and options before the subcommand (npm --prefix app ci), and follows the less obvious ways in:
Lockfile installs:
npm ci,pnpm install,yarn,pip install -r,uv sync,poetry install,bundle install,composer install,cargo fetch. Every locked package is checked for known malware in one OSV request; locked names that look like popular packages are looked up too (missing from the registry: deny; a little-used look-alike: ask).No lockfile yet (a fresh clone,
bun.lockb): the packages inpackage.json, including dev, optional and peer dependencies (npm 7+ installs peers; optional ones are skipped), across every workspace of a monorepo (workspaces,pnpm-workspace.yaml).Stale lockfiles after a merge: a plain
npm install(orpnpm install,yarn,bun install, andnpm install <name>, which installs the rest of the project too) rewrites the lockfile from package.json, so whatever the lockfile does not have yet, or has at another version, is checked.npm ci,--frozen-lockfileand--immutableinstall the lockfile as it is.Overrides: npm
overrides, yarnresolutionsandpnpm.overridesreplace what a dependency installs ("ms": "npm:crossenv@0.0.2-security"installs crossenv under the name ms). The replacement is checked.Aliases (
tc@npm:@ctrl/tinycolor@4.1.1) and registry tarball URLs: the real package and version.Ranges and dist-tags (
x@^4.1.0,x@next): the version npm would pick, not just the latest.Run-once tools:
npx,npm exec,pnpm dlx,pnpx,yarn dlx,bunx, andcorepack pnpm …/corepack yarn@4 ….Project scaffolders:
npm create vite@latest,npm init next-app,pnpm create,yarn createandbun createrun acreate-*package straight from the registry; that package is checked (npm create viteeis a name that does not exist: deny).
A fixable vulnerability in a dependency your own package.json already pins is a note rather than a
question on every install (scan reports it). More than five notes are summarised.
Set it up
Any coding agent, as an Agent Skill: one folder, skills/foster, in the open
Agent Skills format. The agent reads it and runs foster-oss guard on every install command before it runs
it, including the scaffolding command that starts a new project.
npm i -g foster-oss # recommended: agents then run "foster-oss guard" directly
foster-oss skill install # this project: .agents/skills (Codex, Cursor, Gemini CLI, GitHub Copilot,
# OpenCode, Amp, Cline, Zed, Warp, …) and .claude/skills (Claude Code)
foster-oss skill install --global # your user, for every agent installed on this machine
foster-oss skill install --agent hermes # one agent (windsurf, kiro, roo, goose, trae, …; see skill --help)
npx skills add foster-oss/foster # or with the community skills CLIThe same commands work in bash, zsh, PowerShell and cmd, on Linux, macOS and Windows. Without the global
install the skill falls back to npx -y foster-oss@latest guard, which works too but is about 1.5 s slower,
and some permission systems refuse it: Claude Code's auto mode blocks npx -y …@latest as code fetched from
the registry, while it lets an installed foster-oss guard run. For Claude Code, skill install also allows
Foster's own check (foster-oss guard and foster-oss check, which only read) in .claude/settings.json, for
both its Bash tool and its PowerShell tool on Windows, so it runs without a prompt; --no-permissions skips
that. foster-oss skill print prints the SKILL.md for agents that take instructions some other way. A skill
is advice the agent follows; the hook below enforces the check even when the agent forgets.
Claude Code plugin (hook + skill + MCP server in one step):
/plugin install foster --marketplace foster-oss/fosteror /plugin marketplace add foster-oss/foster then /plugin install foster@foster-oss.
Claude Code: a PreToolUse hook in .claude/settings.json (project) or ~/.claude/settings.json (all projects):
{
"hooks": {
"PreToolUse": [
{
"matcher": "Bash|PowerShell",
"hooks": [{ "type": "command", "command": "npx -y foster-oss guard --hook claude", "timeout": 60 }]
}
]
}
}The hook answers with Claude Code's deny / ask permission decisions, uses the session's working
directory for lockfiles, and stays silent for commands that install nothing.
Other agents (Codex, Cursor, Gemini CLI, Copilot, …): add the MCP server and this rule to
your AGENTS.md (or .cursorrules, GEMINI.md, .github/copilot-instructions.md):
Before running any command that installs packages, call the `foster_check_install_command` tool
(or run `npx -y foster-oss guard -- <the exact command>`). If it says DENY, do not run the command:
explain why and suggest the alternative it names. If it says ASK, show the reason and let the user decide.Your own shell: wrap npm, npx, pnpm, pnpx, yarn, bun, corepack, pip, uv, poetry, pipx, pipenv, cargo,
go, gem, bundle and composer, so every install you type is checked first. A deny cancels it, an ask prompts
Install anyway? [y/N] (and cancels when nobody can answer), and if guard itself cannot run the install goes
ahead. Install Foster once so the check starts fast:
npm i -g foster-oss
# then in ~/.bashrc or ~/.zshrc
eval "$(foster-oss shell-init bash)" # or: zsh# $PROFILE
foster-oss shell-init powershell | Out-String | Invoke-ExpressionTo skip the check once: command npm install … (bash/zsh).
Scripts and CI: foster-oss guard -- <command> exits 0 (allow), 1 (deny) or 10 (ask), so
foster-oss guard -- npm ci && npm ci stops on both. --strict turns ask into 1, --quiet prints nothing
on allow, --json returns every verdict.
Make sure it is the real Foster
A security tool is installed on trust, which makes its look-alikes worth a squatter's while. Foster is
published only as foster-oss on npm, from this repository (github.com/foster-oss/foster); there is no
PyPI, Cargo or scoped (@…/foster-oss) package, and the unrelated npm package foster is not it.
Every release is built and published by GitHub Actions with npm provenance: the npm page shows "Built and signed on GitHub Actions" linking to this repository, and
npm audit signaturesverifies it on your machine.Guard and
checktreat names that pose as Foster (fostre-oss,foster-os,foster-oss-cli,@x/foster-oss,foster-osson another registry, …) as look-alikes: blocked when nobody has registered them, a question when someone has.
How guard is tested
Before release, an AI agent red-teamed guard for seven rounds with one goal: get known malware onto disk
without guard noticing. It found 15 bypasses (npm ci, aliases, overrides, corepack, stale lockfiles, peer
dependencies, …) and one regression; each is now a unit test. Because unit tests stub the network, a
CI job also replays real malware (crossenv, @ctrl/tinycolor@4.1.1,
ua-parser-js@0.7.29, a malicious override, a workspace and a peer dependency) against the live npm
registry and OSV on every change. Found another way past it?
Report it.
Related MCP server: depscope-mcp
Why: the data
We classified the 5,797 most depended-on packages across six ecosystems (the ecosyste.ms critical set) in November 2026:
Ecosystem | Critical packages | Dead | Dormant | Unmaintained |
npm | 2,295 | 195 | 514 | 31% |
RubyGems | 974 | 78 | 169 | 25% |
Cargo (Rust) | 813 | 70 | 116 | 23% |
Go | 645 | 120 | 168 | 45% |
Packagist (PHP) | 548 | 59 | 56 | 21% |
PyPI | 522 | 34 | 49 | 16% |
All | 5,797 | 556 | 1,072 | 28% |
The unmaintained npm and PyPI packages alone are downloaded ~192 billion times a month; all unmaintained packages together back ~940 million dependent repositories.
828 unmaintained packages can only be published by a single account.
10 unmaintained packages have security advisories that no upstream release fixes, for example:
Package | Advisory with no upstream fix | Drop-in patch |
npm | 2 × HIGH: symlink path traversal / arbitrary file write | |
npm | HIGH: SSRF, | |
Go | HIGH: audience check bypass | none: move to |
Cargo | 2 × CRITICAL | none: deprecated, use |
Packagist | 20 advisories, 10 HIGH | none: move to |
npm | LOW: risky cryptographic primitive | none yet |
The full list is in the Orphan Index.
Upgrade bots (Dependabot, Renovate) can't help when no fixed version exists, and npm audit
just says "no fix available". Meanwhile, people are fixing abandoned packages: maintained forks,
community patches and services like Keep LTS publish drop-in releases. But
nothing connects "this dependency of yours is orphaned and vulnerable" to "here is the fix someone
already published". Foster is that connection: an open, vendor-neutral index and scanner.
What to do about an orphaned dependency, in order
Upstream first. If anyone still answers, send the fix or report to the original project.
Fund the maintainers. Orphaned packages are a funding problem before they are a security problem.
npx foster-oss fundlists the at-risk dependencies you rely on and who to sponsor (most of them come down to a handful of people), or, when nobody takes sponsorship, where to offer help or co-maintenance.Move to a maintained alternative when one exists (
consider:in the scan output).Use a drop-in patch only as a stopgap while you do one of the above (
npx foster-oss fix).
Scan, fund and fix
Orphan Index ─────► foster-oss scan ─────► patch registry ─────► foster-oss fix
(weekly, public: (your lockfile + (drop-in patches (npm alias override,
who is dead, OSV, live) from any provider: imports unchanged)
dormant, unfixed) Keep LTS, Foster, …)Orphan Index. Every week, Foster classifies the critical package set as active / dormant / dead from public signals and lists advisories that no release fixes (methodology).
Scan.
foster-oss scanreads your lockfile, checks every package against OSV, and tells apart malware, upgrade, no fix yet, orphaned and vulnerable, and a drop-in patch exists.Patch registry.
registry/patches.jsonlists published drop-in patches for abandoned packages, whoever publishes them, with the versions they replace and the advisories they fix. Today: 12 packages from Keep LTS. Anyone can add an entry by PR.Fix.
foster-oss fixpoints your project at the patch through an npm alias ("ip": "npm:@keep-lts/ip@2.0.2"), sorequire("ip")keeps working.Patch Lab, as a last resort. When an orphaned, vulnerable package has no patch anywhere, Foster can build one in the open under the rules in GOVERNANCE.md. Foster does not duplicate patches that already exist.
CLI
Node 20+. Reads lockfiles from six ecosystems:
Ecosystem | Files |
npm |
|
PyPI |
|
Cargo |
|
Go |
|
RubyGems |
|
Packagist |
|
Command | What it does |
| Check the packages a shell command would install, before it runs. |
| Shell functions that guard the installs you type (bash, zsh, powershell) |
| Report malware, orphaned and unpatched dependencies. |
| Same, from a CycloneDX or SPDX JSON SBOM (any tool that emits one) |
| At-risk dependencies you rely on, ranked, with their maintainers' sponsorship links (GitHub Sponsors, Open Collective, Tidelift, …), the few people who cover most of them, and where to help when there is no link |
| Point dependencies at published drop-in patches. |
| Maintenance status, reach, unfixed advisories, patches and replacements for one package. |
| Start the MCP server for AI agents |
What the findings mean:
Finding | Meaning |
| This exact version is a known malicious package or hijacked release (OSV, OpenSSF malicious-packages). Remove it and rotate credentials. Fails the scan by default. |
| A published drop-in patch exists for this exact version. Run |
| Known vulnerability, no fix anywhere, package dead or dormant. Prefer an alternative, or nominate it. |
| Known vulnerability with no release yet, but the package looks maintained. |
| Fixed upstream. Just upgrade. |
| Widely used and unmaintained, no known vulnerability. Shown with |
Direct or transitive, and through what. Foster reads the dependency graph from the lockfile (npm, pnpm, yarn, uv, Poetry, Cargo, Bundler, Composer, and CycloneDX/SPDX SBOMs that record it), so every transitive finding names the direct dependency that brings it in, the one you can actually upgrade or replace:
UPGRADE form-data@2.3.3 [CRITICAL] (transitive, via unmaintained request)
fixed upstream in 2.5.6.
UPGRADE body-parser@1.20.1 [HIGH] (transitive, via express)
fixed upstream in 1.20.9. Upgrade normally; no patch needed.
…
ORPHANED 49 widely used dependencies nobody maintains, with no known vulnerability today
49 come in through other packages, mostly via request (34), express (17)
4 vulnerable packages come in only through request, which nobody maintains, so it will not move to the
fixed versions: replace request, or force the fixes with an npm override.
Summary: 1 patch available · 1 orphaned+vulnerable · 0 no fix yet · 11 upgrade (1 direct) · 49 orphaned (0 direct)(A project depending on request, express@4.18.2 and ip@2.0.1.) A direct dependency that nobody
maintains will never move to a fixed version of what it pulls in, so Foster says so instead of "just upgrade".
--json carries the same: dependency.direct, dependency.via and a summary with direct counts per kind.
Findings also name maintained replacements (consider: fetch (built in), ofetch, ky): for npm from
the e18e community's module-replacements dataset, and for
every ecosystem from Foster's reviewed list in registry/alternatives.json
(e.g. jwt-go → golang-jwt/jwt/v5, failure → anyhow/thiserror, phpexcel → phpspreadsheet).
fix is npm-ecosystem only for now (npm, pnpm, yarn). Other ecosystems get findings only.
A patch from a third-party provider is that provider's code and responsibility. Foster lists it so you can find it; read the provider's source and advisory before adopting it.
GitHub Action
- uses: foster-oss/foster@v0
with:
fail-on: orphaned-vulnerable # none | malicious | patch-available | orphaned-vulnerable | unpatched | any
comment: true # optional PR comment; needs pull-requests: write
sarif: true # optional: findings in the Security tab; needs security-events: writeOn pull requests the Action checks only the dependencies the PR adds or changes (only-new: true,
compared with the base branch), so existing debt doesn't drown out what the PR introduces. On pushes and
schedules it checks everything. Locally: npx foster-oss scan --since main. Known malware fails the job at
every level except none.
The report is also written to the job summary. With sarif: true, findings appear in GitHub code
scanning next to your other security alerts.
MCP server
Listed in the official MCP Registry as io.github.foster-oss/foster,
or configure it directly (Claude Code, Codex, Cursor, …):
{ "mcpServers": { "foster": { "command": "npx", "args": ["-y", "foster-oss", "mcp"] } } }Tools: foster_check_install_command (call it before running an install command), foster_check_package
(call it before adding a dependency; it also catches names that don't exist, a common sign of a hallucinated
package), foster_scan_project, foster_fund_project, foster_list_patches.
Skill: npx foster-oss skill install (see Set it up), or copy skills/foster
into your agent's skills folder.
Library
import { scanProject, checkPackage } from "foster-oss";
const result = await scanProject("./my-app");Adding a replacement suggestion
Know the maintained successor of an abandoned package? Add it to
registry/alternatives.json by pull request. Only official successors,
or replacements the original project itself recommends, with a link to the migration guide.
Adding a patch to the registry
If you publish (or know of) a drop-in security release of an abandoned package, open a PR adding
it to registry/patches.json: the original package and affected versions,
the replacement package and version, the advisories it fixes, and who maintains it. Requirements:
public source, the original license kept, and a regression test for each advisory.
Contributing
New here? Pick a good first issue or something marked help wanted: Maven and NuGet support, translations of the site, replacement suggestions, an ignore file, and more. Start with CONTRIBUTING.md.
Foster's rules are in GOVERNANCE.md, its stance on AI-written code in AI_POLICY.md, and how to report a problem in Foster itself, including a way past guard, in SECURITY.md.
Data and credits
Maintenance and reach data: ecosyste.ms (CC BY-SA 4.0). Vulnerabilities and malware: OSV.dev, the OpenSSF malicious-packages database and the GitHub Advisory Database. Drop-in patches currently listed: Keep LTS. The dead/dormant buckets follow Andrew Nesbitt's “Weekend at Bernie's” analysis.
Replacement suggestions: e18e module-replacements (MIT).
Code: Apache-2.0.
Available Tools
5 toolsfoster_check_install_commandCheck an install command before running itARead-only
Before running a shell command that installs packages (npm/pnpm/yarn/bun, npx, pip/uv/poetry, cargo, go get, gem, composer), check every package it would install. Returns deny for known malware, names that do not exist (hallucinated or typo'd) and vulnerabilities no release fixes; ask for look-alike names, brand-new npm packages or fresh releases that run install scripts, and fixable vulnerable versions; allow otherwise, with a note for unmaintained packages.
Inputs: command (required).
foster_check_packageCheck a package before depending on itARead-only
Check whether a package (npm, PyPI, Cargo, Go, RubyGems or Packagist) is still maintained, whether it has vulnerabilities with no fix, and whether a published drop-in security patch exists (from Foster or providers like Keep LTS). Call this before adding a new dependency.
Inputs: name (required), version, ecosystem.
foster_fund_projectWhere to fund the maintainers a project depends onARead-only
List the project's dependencies that are unmaintained or at risk, ranked by how much the ecosystem relies on them, with their maintainers' sponsorship links (GitHub Sponsors, Open Collective, Tidelift, …).
Inputs: path (required), recursive.
foster_list_patchesList known drop-in patchesARead-only
List known drop-in security patches for abandoned packages (Foster and other providers), with the versions they replace and the advisories they fix.
Inputs: no named parameters.
foster_scan_projectScan a project for orphaned dependenciesARead-only
Scan the lockfiles in a directory (npm, pnpm, yarn, uv, poetry, pipenv, requirements.txt, Cargo.lock, go.mod, Gemfile.lock, composer.lock) and report dependencies that are unmaintained, vulnerable with no fix, or have a drop-in security patch.
Inputs: path (required), recursive.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 5 tools
Each tool targets a distinct input shape and trigger: a single package name, a directory of lockfiles, a shell install command, a project risk ranking, or a patch catalogue. The only mild overlap is between foster_check_package and foster_check_install_command, both of which assess package risk, but the description clearly distinguishes advisory lookup from an allow/deny policy decision on a command.
All five tools use the same foster_ prefix followed by a verb_noun pattern (check_package, scan_project, check_install_command, fund_project, list_patches). The convention is predictable and readable throughout, with no mixed casing or stylistic outliers.
Five tools is tightly scoped to the dependency-risk domain, and each one covers a genuinely different workflow (single lookup, project scan, pre-install gate, funding discovery, patch discovery). There is no filler or redundant surface.
The surface covers the full decision loop for dependency risk: inspect a package, scan a project, gate installs, surface maintainer funding, and find patches. The notable gap is that foster_list_patches only lists patches with no tool to apply or pin them, and there is no explicit way to handle projects without lockfiles. These are workarounds an agent can bridge manually.
Maintenance
Related MCP Connectors
Check packages for CVEs, slopsquatting, and CISA KEV before your AI agent installs them.
Package verdicts for AI coding agents: check npm, PyPI, Go and NuGet installs before they run.
Blocks typosquatted or hallucinated npm/PyPI packages before an AI agent installs them.
Protects AI coding agents from installing malicious open source packages. Every npm and PyPI package is checked against SafeDep’s real-time threat intelligence before installation.
Related MCP Servers
- AlicenseAqualityDmaintenanceActs as a security checkpoint for AI coding agents by intercepting package installations to verify existence, check against CVE databases, and block vulnerable or hallucinated dependencies before they reach your codebase. Provides seven security tools including pre-install gates, full project audits, safe version recommendations, and deep transitive dependency scanning for npm and PyPI packages.7100 npm5MIT
- AlicenseNot gradedqualityDmaintenanceValidates and checks packages across 19 ecosystems to prevent AI agents from installing hallucinated, deprecated, or malicious packages.81 npmAGPL 3.0
- AlicenseAqualityBmaintenanceEnables AI coding agents and CI to vet npm dependencies before they reach the lockfile, flagging hallucinated, slopsquatted, or otherwise risky packages with evidence-backed verdicts.373 npm4MIT
- AlicenseNot gradedqualityBmaintenanceEnables developers and AI coding agents to vet npm packages before installation by checking existence, lookalike names, package age, install scripts, maintainers, downloads, and advisories, returning GO, RISKY, FAKE, or MISSING. It also scans a project's package.json for worst-first dependency verdicts and can run as a CLI or stdio MCP server.MIT