Matcher
The matcher is a pure function over two tables. It has no network access and no file writes outside the findings table. It runs when either the intel or inventory table changes.
Deterministic matching
The matcher applies indicators from the intel table to items in the inventory table. An indicator matches when its condition is true:
| Indicator type | Condition |
|---|---|
package-version | Purl base matches and version is in the list |
package-range | Purl base matches and version is in at least one range |
file-path | The glob matches at least one inventory path or host artifact path |
file-hash | SHA-256 matches a host artifact or a scanned file |
file-string | The glob matches a file and at least one string is in the file |
persistence | The glob matches a LaunchAgent plist and at least one string is in ProgramArguments |
ssh-key | Fingerprint matches a key in authorized_keys |
The network indicator is stored but never matched locally in v1. It appears in remediation text only.
Version comparison
Version comparison is per ecosystem:
| Ecosystem | Comparator |
|---|---|
| npm, Cargo | SemVer 2.0 |
| PyPI | PEP 440 |
| Go | SemVer with the v prefix and pseudo-versions |
| RubyGems | Gem::Version rules |
| Homebrew, cask, VS Code, Docker | Exact string match in v1 |
OSV ranges use events with introduced and fixed keys. The matcher evaluates them with the ecosystem comparator:
The introduced boundary is inclusive. The fixed boundary is exclusive. A lastAffected value is inclusive.
A nil introduced means version zero. A nil fixed with a lastAffected means the range ends at that version (inclusive).
Explicit versions lists use exact match, regardless of ecosystem.
File-path globs
File-path globs support:
*matches any sequence except/**matches any sequence including/~expands to the home directory$TMPDIRexpands to the environment value
Examples:
**/site-packages/litellm_init.pthmatches the file in anysite-packagesdirectory~/.cursor/extensions/anthropic.claude-code-*/extension.jsmatches the extension file with any version suffix~/Library/LaunchAgents/*.plistmatches all LaunchAgent plists
The matcher walks the inventory paths and host artifact paths. It does not walk the entire home directory again.
Watchlist
The watchlist affects matching in two ways:
- Prefilter bypass: Articles that name a watched package go to the LLM, even when they lack a keyword.
- Advisory tier: Advisories with no local match still produce an
advisoryfinding when they name a watched package.
An advisory finding has no purl and no path. It exists to show that an advisory affects a package you care about, even when it is not installed.
Exploited aliases (KEV)
A vulnerable finding rises to exploited when the matched intel ID has an alias that matches a CISA KEV CVE.
Example:
- OSV intel for CVE-2026-12345 produces a
vulnerablefinding. - OSV intel carries
aliases: ["CVE-2026-12345"]. - CISA KEV provider writes an
exploited-vulnerabilityintel record for CVE-2026-12345. - The matcher sees the alias match and raises the tier to
exploited.
This mechanism lets any OSV vulnerability become exploited when KEV adds it, without duplicating the entire intel record.
Matching order
The matcher runs in this order:
- Package indicators against inventory items (purl + version)
- File-path indicators against inventory paths and host artifact paths
- File-hash indicators against host artifact SHA-256 values
- File-string indicators (glob + string search)
- Persistence indicators (LaunchAgent plists)
- SSH key indicators against baseline diffs
The matcher writes one finding per key (intel_id, purl, path). Multiple indicators on the same key produce one finding with multiple evidence lines.
Evidence format
Each match produces one evidence line in the finding:
package-version pkg:pypi/litellm@1.107.0file-path ~/.venv/lib/python3.13/site-packages/litellm_init.pthfile-string ~/.cursor/extensions/anthropic.claude-code-2.1.313-darwin-arm64/extension.js: svc-telemetryssh-key SHA256:abc123...
The evidence array in a finding lists every indicator that matched on that key.
Homebrew limitation
OSV has no Homebrew ecosystem. In v1 a Homebrew item matches only intel that names the formula or cask directly, such as a trojanized cask advisory.
Upstream CVE matching through the formula source URL is planned for v2.