Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
25 changes: 25 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,31 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

## [Unreleased]

## [0.3.1] - 2026-04-19

### Fixed

**False positives on `npx <tool>` and other unversioned package references**

When a package was referenced without a version (e.g. `npx vite`,
`npx playwright install chromium`), PatchPilot queried OSV without a
version field. OSV returns vulnerabilities across **all versions ever
published** in that case, surfacing patched CVEs as active threats.

Real-world impact before the fix:
- `vite@latest` reported with 5 HIGH vulnerabilities — `vite@8.0.8` (current latest) has 0
- `playwright@latest` reported with 1 HIGH — `playwright@1.59.1` has 0

Fix: when no version is specified, resolve `latest` from the npm or PyPI
registry first, then query OSV with that concrete version. On registry
failure (404, timeout, network error), falls back to the previous
unversioned query — preserves fail-closed behavior for unknown packages.

The resolved version now appears in the hook output (`vite@8.0.8` instead
of misleading `vite@latest`).

Closes #19, #21.

## [0.3.0] - 2024-01-06

### Security - Critical Fixes from Security Audit
Expand Down
11 changes: 11 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -109,11 +109,22 @@ NODE_ENV=production npm install evil-pkg
| MODERATE or LOW | **Allow** - with warning message |
| None found | **Allow** |

## Accuracy

When you reference a package without a version (e.g. `npx vite`, `npm install lodash`),
PatchPilot resolves the current `latest` from the npm or PyPI registry before querying
OSV. This avoids surfacing patched CVEs from older versions as if they affected the
release you're about to install.

If the registry lookup fails (timeout, 404, network error), PatchPilot falls back to
querying OSV without a version — preserving fail-closed behavior for unknown packages.

## Limitations

- **Homebrew**: OSV has no vulnerability database for Homebrew packages. Brew commands are detected but not checked.
- **Private registries**: Only public npm and PyPI packages are checked.
- **Offline**: Requires internet connection to query OSV API.
- **Local `npx <tool>`**: PatchPilot treats `npx <tool>` as a potential install. If the tool is already installed in `./node_modules/.bin/`, npx runs the local copy and nothing is downloaded — but the OSV check still runs against the latest published version.

## Development

Expand Down
9 changes: 5 additions & 4 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "patchpilot",
"version": "0.3.0",
"version": "0.3.1",
"description": "Security scanner for vibe coders - Claude Code hook that checks packages before installation",
"type": "module",
"main": "dist/index.js",
Expand Down
Loading