# Known-fix matching

> Findings that match code an advisory's fix removed, and how the signed database is updated.

Source: https://keryn.dev/docs/guides/known-fix/

## Goal

Understand a finding at the top rung of the proof ladder, a known-fix match, and keep the signed database up to date.

## Before you start

- The Keryn CLI ([install](https://keryn.dev/docs/start/install/)). Matching is on by default for `keryn scan` and `keryn bundle` whenever the database is present; `KERYN_NDAY=0` turns it off.
- The [proof ladder](https://keryn.dev/docs/concepts/proof-ladder/), for what rung 4 means next to the others.

Keryn ships a database of fingerprints of vulnerable code: code blocks that the fix for a published advisory removed. When your code contains one, the finding reaches proof rung 4 (**known-fix**) and cites the CVE, or the GHSA when there is no CVE.

A match says that your code resembles code an advisory's fix removed. It is not proof that the code can be exploited.

## Signed updates

The database is three files: a manifest, the signatures, and a signed manifest (a DSSE envelope, Ed25519) that binds the digests of the other two. Every Keryn surface verifies the signature against a key built into Keryn before it loads the database. An unsigned or altered database is refused as a whole, and the report says so once; the scan still runs without known-fix matching.

For a database release you have copied into `nday-db-2026-11`:

```sh
keryn nday-db update --from ./nday-db-2026-11        # verify, then swap in atomically
keryn nday-db update --from ./nday-db-2026-11 --check                   # verify only, write nothing
```

In the Node CLI, `nday-db` hands over to a helper called `keryn-native`, which the CLI archives ship beside `keryn`; if it is missing (the npm package does not include it), the command says so and stops. An older database needs `--allow-downgrade`. Nothing checks for updates on its own: the network is used only for an `https://` source you pass.

## What you just proved

A known-fix match ties your code to a **published advisory**: a block the fix for a CVE or GHSA removed is in your tree. That is the one place a finding cites an outside record, which is why its database is signed and why an altered database is refused as a whole. It is still a resemblance, not a reproduction: the proof ladder keeps exploitability for rung 5.

## Next

- Update with no network: [air-gapped use](https://keryn.dev/docs/guides/air-gapped/).
- Read the finding like any other: [read an attack chain](https://keryn.dev/docs/guides/attack-chain/).
- What the benchmark does and does not show: [what Keryn does not do](https://keryn.dev/docs/concepts/limits/).
