2026-11-26 15:47 UTC

Safer Dependencies adds multi-hook dependency checks to Claude Code

state: seedheat: lowuncertainty: mediumrelevance: mediumclaude-code dependency-security software-supply-chainRobert Auger

What is this?

Robert Auger’s Safer Dependencies is a Claude Code skill-and-hook bundle, available on GitHub. Its README describes checks for vulnerabilities, package provenance and typosquatting, abandoned or stale packages, and release age across several language ecosystems. Different hooks cover dependency changes made through Claude’s file tools, package-manager commands, and subagents. Some paths block vulnerable pinned installs before execution; others audit after a write and can correct a manifest. The evidence is the project’s own README and a Hacker News link to it; independent validation or adoption data is not supplied. Search results also point to earlier 2026 coverage, so the November 26 Hacker News post does not establish when the project was first released.

Why it matters

This is a practical example of turning an AI coding assistant’s dependency choices into a policy-enforced workflow rather than relying on the model to remember security advice. If reliable, it could reduce exposure to known-vulnerable or suspect packages as agents make changes across projects. Its reach is limited by being Claude Code-specific, and the README documents important fail-open paths and incomplete coverage; effectiveness has not been independently demonstrated in the supplied evidence.

Current assessment

Newly surfaced in the supplied evidence: a November 26, 2026 Hacker News post points to Robert Auger’s GitHub project. The README says the available bundle combines a skill with Claude Code hooks for file writes, Bash package installs, and agent/subagent work. It describes OSV and optional ecosystem-native vulnerability checks, provenance and typosquat checks, abandoned/stale package warnings, and a default seven-day release cooldown for selected ecosystems. A pre-install hook can deny vulnerable concrete pins before the command runs; post-write hooks can correct risky manifest versions, while lockfile scans can flag transitive vulnerabilities. Coverage spans npm, PyPI, RubyGems, Maven, Go, Rust, and Composer in some modes, but not every check applies to every ecosystem or execution path. The project explicitly says several hooks fail open on errors; manifest corrections occur after a write, and transitive findings generally require human judgment. These are maintainer-described capabilities, not independently verified results. Search snippets show earlier mentions dated July, August, and October 2026, making the exact release date unclear and this post not necessarily a launch. No supplied evidence establishes adoption, measured security impact, or third-party evaluation. The README calls the license source-available, not OSI open source, and restricts commercial redistribution or paid provision of the software itself without a separate license.

Measured heat

now 0 pts/hpeak 1 pts/hcomments 0/hpeers p34momentum: steady2 platformsage 2242h
points/hour across evidence · reading as of 2026-11-27 02:23:58.509736+11:00 · deterministic, not a model opinion

How the heat travelled

08-25 05:23 (minted)⭐ origin echo-reconstructedThe repository README is the originating artifact, not a repost of an upstream paper or social post. It describes the project as: “safer-dep
Robert Auger (@robert-auger) on github (echo) · attributed from hn.story.50649281 · published time unknown
—
11-25 23:38first on hacker news · published · lag ?Safer-dependencies is a security layer for Claude Code
zenomorph
—
11-25 23:38amplified on hacker news 👑hn.story.50649281
zenomorph
peak 1 · 0 comments · 103% of case engagement
08-25 05:23our radar first saw it · lag ?discovery anchor: hn.story.50649281—
pace: p18 vs 1444 stories at the 12h mark (now 16h old) — behind agent-alley-social-experiment (0.5x)

Evidence (2) — ⭐ canonical anchor

sourceobjectauthorscorecomments
🟧 hnSafer-dependencies is a security layer for Claude Code
Retrieved article excerpt

Open article · Retrieved 2026-11-26T00:21:46.109881+00:00

# Safer Dependencies for Claude Code

When AI coding assistants like Claude add packages to your project, they often pick whatever version sounds right — without checking whether it has known security vulnerabilities, whether the package is still actively maintained, or whether the name is a typo away from a malicious lookalike.

safer-dependencies is a security layer for Claude Code: it sits between Claude and your manifest files and runs its security checks automatically: vulnerable installs are denied before they run, and a risky version written to a manifest is corrected on disk right after the write. It detects and fixes risky dependencies — CVEs, typosquats, abandoned packages, and version-age issues, plus a cooldown period on brand-new releases — across npm, PyPI, RubyGems, Maven, Go, Rust, and PHP (Composer). See [CAPABILITIES.md](https://github.com/robert-auger/safer-dependencies/blob/main/CAPABILITIES.md) for exactly what is and isn't covered.

> **New here?** [GETTING-STARTED.md](https://github.com/robert-auger/safer-dependencies/blob/main/GETTING-STARTED.md) takes you from zero to a working install in about five minutes.

> **Security & privacy:** see [SECURITY.md](https://github.com/robert-auger/safer-dependencies/blob/main/SECURITY.md) (vulnerability disclosure), [PRIVACY.md](https://github.com/robert-auger/safer-dependencies/blob/main/PRIVACY.md) (data egress, no telemetry), and [CAPABILITIES.md](https://github.com/robert-auger/safer-dependencies/blob/main/CAPABILITIES.md) (what the tool defends against and what it doesn't).

> **License (source-available — NOT OSI "open source"):** Free to use and modify for your own purposes, **including for-profit/company internal use and building products you sell**. A separate paid license is required **only** to monetize the software *itself* — selling it, shipping it inside a product or service that is sold, or offering its functionality to third parties for a fee (including hosted/SaaS/API). Redistribution and derivatives must keep the license and credit this project. See **[LICENSE](https://github.com/robert-auger/safer-dependencies/blob/main/LICENSE)** (Section 4 for the commercial restriction); commercial-license requests via [github.com/robert-auger](https://github.com/robert-auger).

## Contents

- [Getting started](https://github.com/robert-auger/safer-dependencies#getting-started) — zero to installed in about five minutes
- [What it does](https://github.com/robert-auger/safer-dependencies#what-it-does)
- [What triggers it](https://github.com/robert-auger/safer-dependencies#what-triggers-it)
- [What's in this repo](https://github.com/robert-auger/safer-dependencies#whats-in-this-repo)
- [Supported ecosystems](https://github.com/robert-auger/safer-dependencies#supported-ecosystems)
- [Install](https://github.com/robert-auger/safer-dependencies#install)
  - [Configuration](https://github.com/robert-auger/safer-dependencies#configuration)
  - [Changing the cooldown period](https://github.com/robert-auger/safer-dependencies#changing-the-cooldown-period)
- [Warning levels](https://github.com/robert-auger/safer-dependencies#warning-levels)
- [How it works](https://github.com/robert-auger/safer-dependencies#how-it-works)
  - [Normal Mode (Manual)](https://github.com/robert-auger/safer-dependencies#normal-mode-manual)
  - [Intercept Mode (Automatic)](https://github.com/robert-auger/safer-dependencies#intercept-mode-automatic)
  - [Pre-Install Mode (Bash Hook)](https://github.com/robert-auger/safer-dependencies#pre-install-mode-bash-hook)
  - [Post-Install Mode (Bash Hook)](https://github.com/robert-auger/safer-dependencies#post-install-mode-bash-hook)
  - [Post-Agent Mode (Agent Hook Pair)](https://github.com/robert-auger/safer-dependencies#post-agent-mode-agent-hook-pair)
- [Audit log](https://github.com/robert-auger/safer-dependencies#audit-log)
- [Requirements](https://github.com/robert-auger/safer-dependencies#requirements)
- [FAQ](https://github.com/robert-auger/safer-dependencies#faq)

## Getting started

**[GETTING-STARTED.md](https://github.com/robert-auger/safer-dependencies/blob/main/GETTING-STARTED.md)** takes you from zero to a working install in about five minutes — prerequisites, the interactive install, and verification. For the full install reference (global/project/manual installs, Windows specifics, the [permissions allowlist](https://github.com/robert-auger/safer-dependencies/blob/main/INSTALLATION.md#permissions-allowlist), updating, and uninstalling), see **[INSTALLATION.md](https://github.com/robert-auger/safer-dependencies/blob/main/INSTALLATION.md)**.

**Everyday use:** once the hooks are installed, there's nothing to run — safer-dependencies works automatically in the background. As Claude adds or installs packages, it **flags risky dependencies and upgrades vulnerable versions to a safe one in place** — and blocks a known-vulnerable install before it even runs — so unsafe packages are caught and corrected without you having to ask. You can still invoke it directly any time: *"is `[email protected]` safe?"*, *"check safer-dependencies setup"*, or *"show safer-dependencies stats"*.

## What it does

When Claude is about to add a package to your project, safer-dependencies intercepts and runs 5 checks:

1. **Provenance** -- official registry, typosquat detection (npm/PyPI/RubyGems/Maven/crates.io), package age
2. **Version age** -- picks the newest stable version published 7+ days ago (cooldown window)
3. **Vulnerability scan** -- OSV API, with ecosystem-native tools (npm audit, pip-audit, bundle audit) when available
4. **Hash-pin integrity** -- for PyPI `requirements.txt` lines with `--hash=sha256:...` pins, the declared hash is validated against PyPI's published hashes; mismatch emits a WARNING
5. **Abandoned & stale packages** -- known-abandoned packages (e.g. `paperclip`, `request`, `pycrypto`, `github.com/dgrijalva/jwt-go`) are hard-blocked immediately with a suggested replacement; packages with no stable release in 2+ years get an advisory `STALE:` warning. Hard-blocked packages are removed from the manifest and Claude will ask how to proceed; stale-only packages are left in place.

If issues are found, Claude emits warnings and may step back to a safer version. All checks are logged to `~/.claude/safer-dependencies-audit-YYYY-MM.log` (one file per calendar month).

## What triggers it

The skill fires automatically when Claude:

**Manifest / install operations**

- Adds or updates a package in `package.json`, `requirements.txt`, `Gemfile`, `pom.xml`, `build.gradle`, `Cargo.toml`, `go.mod`, or any other supported manifest
- Writes an `import`, `require`, or `use` for a package not already declared in the manifest
- Generates or updates a lock file (checks only new/changed entries)
- Runs a package-manager install via Bash (`npm install`, `bundle install`, `poetry install`, `uv sync`, `go mod tidy`, etc.) — Pre-Install audits the command args, Post-Install audits the resulting lockfile
- Writes a `Dockerfile` or CI workflow (`.github/workflows/*.yml`, etc.) that embeds pinned package-manager install steps

**Selection & recommendation questions**

- Library/framework comparisons: "should I use axios or node-fetch?", "moment vs dayjs?", "which is better X or Y?"
- Recommendation requests: "what's a good HTTP client for Python?", "recommend a logging library for Go", "what package handles CSV in Node?"
- Version selection: "what version of Django should I use?", "latest stable Flask?"

**Intent-to-use expressions (pre-add)**

- "I want to use FastAPI for this", "I'm thinking of adding Celery", "we're looking at Prisma as the ORM", "let's use Tailwind"

**Package health and trust questions**

- "Is moment.js still maintained?", "is this gem still active?", "is X abandoned?", "is X EOL?", "can I trust this package?", "when was faker last updated?"

**Scaffolding commands**

- `npx create-react-app`, `npm create vite@latest`, `django-admin startproject`, `rails new`, `cargo new` + `cargo add`, "bootstrap a new FastAPI project"

**Implicit package adds (feature requests that imply a new dependency)**

- "Add Redis caching to the app", "connect to Postgres", "add JWT auth", "write code to send emails" — fires when no package for that capability is already in the manifest

**Migration and porting**

- "Migrate from requests to httpx", "move from CRA to Vite", "port from moment to date-fns" — audits the incoming package

It does **not** fire for:

- Standard library imports (`os`, `fs`, `java.util.*`, etc.)
- Already-declared dependencies that aren't being changed
- Academic discussion of how a package works internally ("explain React's reconciler", "how does webpack's module resolution work?") — comparison and selection questions do still fire
- Installing OS-level apps, runtimes, or IDE extensions (Python itself, Docker, Homebrew, VS Code extensions)

## What's in this repo

This is a **skill + hook bundle**, not a single skill file. A complete install deploys these pieces:

| File | Role |
| --- | --- |
| `skills/safer-dependencies.md` | The **skill** (`SKILL.md` once installed). Describes audit procedures and includes management mode for installation/stats. |
| `skills/safer-dependencies-shim.sh` | `PostToolUse:Write`/`Edit` hook — audits manifest + lockfile writes and auto-corrects vulnerable versions in place (Intercept Mode). |
| `skills/safer-dependencies-pretooluse-bash.sh` | `PreToolUse:Bash` hook — pre-flight OSV audit of package-manager install commands; denies vulnerable concrete pins before the install runs (Pre-Install Mode). |
| `skills/safer-dependencies-posttooluse-bash.sh` | `PostToolUse:Bash` hook — post-flight audit after Bash commands; catches transitive CVEs in freshly-written lockfiles, manifests edited via `sed`/`jq`/scripts, and the resolved environment of plain `pip install` (Post-Install Mode). |
| `skills/safer-dependencies-pretooluse-agent.sh` + `skills/safer-dependencies-posttooluse-agent.sh` | `PreToolUse:Agent` + `PostToolUse:Agent` hook pair — closes the subagent coverage gap. Modes 2–4 only fire for root-session tool calls, so any manifest a subagent writes bypasses them. Post-Agent audits whatever the subagent wrote after each Agent tool-call returns (Post-Agent Mode). |
| `skills/scripts/` | Shared Python library (`safedep/`) and standalone resolver scripts used by all hooks. |
| `skills/scripts/safer_dependencies_manager.py` | Management module for interactive installation, usage stats, and setup validation. |

The skill file alone is not enough — without hooks, automatic invocation depends on Claude deciding to reach for the skill. Install all five pieces for full coverage; many skills and slash commands dispatch subagents internally, so the Post-Agent pair matters even if you never explicitly spawn one. (See [FAQ.md](https://github.com/robert-auger/safer-dependencies/blob/main/FAQ.md#why-a-skill-alone-is-not-sufficient) for why a skill on its own can't guarantee coverage.)

## Supported ecosystems

| Ecosystem | Manifest | Lock file |
| --- | --- | --- |
| npm | `package.json` | `package-lock.json`, `yarn.lock`, `pnpm-lock.yaml` |
| PyPI | `requirements.txt`, `pyproject.toml`, `Pipfile`, `setup.py`, `setup.cfg` | `Pipfile.lock`, `poetry.lock`, `uv.lock` |
| RubyGems | `Gemfile`, `*.gemspec` | `Gemfile.lock` |
| Maven | `pom.xml`, `build.gradle`, `libs.versions.toml` | -- |
| Go | `go.mod` | `go.sum` |
| Rust | `Cargo.toml` | `Cargo.lock` |
| PHP (Composer) | `composer.json` | `composer.lock` |

## Install

New to the project? Start with **[GETTING-STARTED.md](https://github.com/robert-auger/safer-dependencies/blob/main/GETTING-STARTED.md)**. The short version:

```
git clone https://github.com/robert-auger/safer-dependencies /tmp/safer-dependencies
python3 /tmp/safer-dependencies/skills/scripts/safer_dependencies_manager.py interactive_install
```

The installer prompts for scope (global vs project) and which hooks to enable, then writes `settings.json` for you —
zenomorph10
🟧 echo.github ⭐The repository README is the originating artifact, not a repost of an upstream paper or social post. It describes the project as: “safer-depRobert Auger (@robert-auger)——

Interpretation history

Decision trace