@humaan/patch-patrol
v0.5.2
Published
Scan GitHub repositories for advisory-driven package bumps and open pull requests.
Readme
Patch Patrol
Patch Patrol is an interactive CLI for finding advisory-driven package updates across GitHub repositories, then optionally creating update pull requests.
Requirements
- Node.js 20+
- GitHub CLI authenticated with
gh auth login - To create PRs: git access to the selected repos, plus their package manager for lockfile updates
Run
Run the published CLI directly:
pnpx @humaan/patch-patrolInteractive Flow
The CLI will guide you through:
- Entering a GitHub owner, GitHub repo, or GitHub URL.
- Choosing an advisory rule.
- Choosing which bump levels to include.
- Reviewing affected projects.
- Deciding whether to stop after the scan or create update pull requests.
- Selecting which projects should receive update branches and pull requests.
Use arrow keys to move through prompts, spacebar to toggle multiselect items, and enter to continue.
If you choose to create PRs, Patch Patrol clones each selected repo into a temporary checkout, creates an advisory-specific branch, re-checks affected packages, updates package.json, refreshes the lockfile, commits the change, pushes the branch, and opens a GitHub pull request.
Safety
- Scans read
package.jsonfiles through the GitHub API. - PR creation only runs after you opt in and select repos.
- Repos are patched in temporary checkouts, not in your local working tree.
Contributing Advisories
Advisories live in advisories/*.json, but advisory consumption is decoupled from the published package. The published CLI loads advisory rules from this repo's main branch, so the repo can receive new advisories without waiting for an npm publish.
Advisory files use human-readable rule IDs and publishedAt dates so the CLI can show the newest advisories first. Technical identifiers such as GHSA and CVE IDs live in each rule's metadata and are displayed as secondary CLI info.
To add an advisory:
- Use the
adding-advisoriesagent skill with the security advisory URL, GHSA, CVE, changelog, or affected-version notice. - Open a pull request that adds the new advisory JSON file.
- Once the PR is merged to
main, the advisory becomes available to everyone using the published CLI with the default advisory source.
Development
pnpm install
pnpm start