Adding a lockfile with Kovo
Updated November 23, 2026
Why a lockfile matters
Without a lockfile, Kovo can fix only the dependencies your package.json names. Most security issues are in their dependencies (transitive ones), and Kovo needs a lockfile to fix those.
What Kovo does
A repository admin chooses Add a lockfile on the repository's page in Kovo. Kovo never does this on its own.
- Kovo resolves your package.json in an isolated sandbox, with install scripts off. Versions published in the last 24 hours and versions Kovo holds as possible malware are skipped.
- It uses npm, or pnpm when your repository uses pnpm: a
packageManagerfield naming pnpm, or CI that installs with pnpm only. - With pnpm, Kovo runs the exact pnpm version your
packageManagerfield (or an exactengines.pnpm) names. If Kovo doesn't have that version, it says so rather than use another one. If your repository names no version, Kovo uses its default pnpm and the PR says so. - It opens one PR, on the branch
kovo-config/lockfile-adoption, that addspackage-lock.json(npm) orpnpm-lock.yaml(pnpm) at the root of the repository. It changes nothing else. - The PR description counts the packages it locks. It never lists their names.
- Kovo won't merge this PR. Check it in your CI and preview deploys, then merge it when you're ready.
- The Kovo dependencies check on the PR judges every locked package, like any other new package.
- Once you merge it, Kovo checks the repository again. It then tells you that transitive fixes are unlocked, and fixes them under your repository's existing mode.
You can ask up to 3 times a day per repository.
When Kovo can't add one
| What Kovo says | What to do |
|---|---|
| This repository already has a lockfile | Nothing. Kovo already fixes transitive dependencies here. |
| Your .gitignore ignores the lockfile | Remove that line from the root .gitignore, then ask again. |
| Your .npmrc turns the lockfile off | Remove package-lock=false (or pnpm's lockfile=false) from the root .npmrc, then ask again. |
| This looks like a published library | Libraries often leave out a lockfile on purpose. If it's an app, choose This is an app and ask. |
| Repositories with workspaces aren't supported yet | Run an install locally and commit the lockfile. Workspace support is coming in Phase 2. |
| Only npm and pnpm are supported for now | Run your package manager's install locally and commit its lockfile. |
| Kovo doesn't have the pnpm version your repo names | Run pnpm install locally and commit pnpm-lock.yaml. |
| Too many dependencies | Run an install locally and commit the lockfile. |
| Kovo can't lock this package.json as it is | Dependencies from outside the npm registry need a local install. Commit the lockfile it writes. |
| A dependency's scope looks private | Add @scope:registry=https://… for that scope to the root .npmrc, then ask again. |
| Kovo couldn't check every .npmrc and package file | Run an install locally and commit the lockfile. |
| Every allowed version of a dependency is held | Change that dependency's version range in package.json, then ask again. |
| Kovo is busy right now | Try again later. |
Private registries
Kovo locks from the public npm registry. It looks for signs that a scope is private in your
repository (.npmrc files, .yarnrc.yml, a package's publishConfig) and refuses rather than lock
a public package of the same name.
A scope configured only in CI environment variables or in a user's own .npmrc leaves no trace in
the repository, so Kovo can't detect it. The Kovo dependencies check on the PR still judges every
package as new, including its age, which is where a freshly published copy of a private name is
caught. Declare private scopes in the root .npmrc to be safe.