Metadata-Version: 2.4
Name: lattice-scan
Version: 1.1.0
Summary: Match CISA-exploited CVEs, looked up through Lattice, against what is installed on this host. Prints evidence for a person to read.
Author-email: NamiQ LLC <contact@namiq.io>
License-Expression: Apache-2.0
Requires-Python: >=3.9
Description-Content-Type: text/markdown
License-File: LICENSE
License-File: NOTICE
Dynamic: license-file

# lattice-scan

Looks up CVEs that CISA lists as exploited, through the Lattice MCP server, and compares each with what is installed on **this** machine: packages,
snaps, the hardware, the running container images and what is inside them (all local images with `--deep`), the kernel. It prints the evidence, including installed version, CISA's dates and required action, and NVD's affected
version ranges. A person reads it and decides. It does not detect incidents or decide whether the host is affected, and it never closes a finding by itself.

`lattice-scan posture` also shows what the host exposes and runs: listening ports, firewall, SSH settings, services and processes that no package owns.

Standard library only: no runtime dependency. Python 3.9 or newer. [Self-audit](https://github.com/namiq-ai/lattice-scan/blob/main/docs/SELF-AUDIT.md).

## Install

```bash
pipx install lattice-scan                    # or: pip install lattice-scan
```

**Platforms.** Linux (Debian and Ubuntu are tested) and macOS 12 and later. On a Mac the tool reads the operating system version, the apps in /Applications and
/System/Applications, and the Homebrew Cellar folder names, all from files; it never runs `brew` and never opens a folder macOS protects with a permission
dialog. For a Mac, a fix is judged per macOS release: Apple lists fixes only for the releases it still patches, so an older release, or a Mac with a
background security improvement letter such as `(a)`, is reported as "undetermined", never as fixed. `--discover --all`, `posture` and `inventory --share` do not read a Mac yet
and stop with a message and exit 3. macOS support is new and has been tried on hosted test machines only: treat a result as a lead, and tell us what you see.

On Debian and Ubuntu, from the signed apt repository:

```bash
sudo curl -fsSL https://namiq.io/apt/lattice-scan.gpg -o /usr/share/keyrings/lattice-scan.gpg
echo "deb [signed-by=/usr/share/keyrings/lattice-scan.gpg] https://namiq.io/apt stable main" | sudo tee /etc/apt/sources.list.d/lattice-scan.list
sudo apt update && sudo apt install lattice-scan
```

The signing key's fingerprint is `C473 6154 4115 8A3E 775C 2EC2 7E61 15F4 0A41 061D`. Check it against the key you downloaded
(`gpg --show-keys /usr/share/keyrings/lattice-scan.gpg`). It is also published at https://namiq.io/lattice/docs, apart from the repository.

Or take the single-file `lattice-scan.pyz` or the `.deb` from the [releases page](https://github.com/namiq-ai/lattice-scan/releases) and check it with
`sha256sum -c SHA256SUMS`: `python3 lattice-scan.pyz --cve CVE-...`.

## What it does

| You want to | Run | It reads | What leaves the machine |
|---|---|---|---|
| Check a CVE you know of | `lattice-scan --cve CVE-...` | this host's inventory, locally | the CVE id |
| Start with nothing (an agent, a morning check) | `lattice-scan` or `lattice-scan recent` | namiq.io's list of recent CVEs, then this host | nothing for the list; only the ids that may match |
| Give the Lattice Analyst what you run, to check it against today's exploited list | `lattice-scan inventory --share` | names and versions of the important software, copied by you | nothing (reads namiq.io's public list once) |
| See what this host has installed, quickly | `lattice-scan --refresh --inventory` | packages, snaps, hardware, the images containers run | nothing |
| Look through every container image | `lattice-scan --deep` | every local image (OS and packages) and the Python, Node, Java and Ruby packages in them; minutes | nothing |
| See what this host exposes and runs | `lattice-scan posture` (`--deep`) | listening ports, firewall, SSH settings, services; deep: processes no package owns | nothing |
| Check a project's declared dependencies | `lattice-scan project .` | manifests, Dockerfiles, compose files | the CVE ids |
| Look up ids from an audit or advisory | `... \| lattice-scan enrich` | the text you pipe in | the CVE ids |

A person reads what it prints and decides. It also ships as a Claude Code and OpenAI Codex skill (`/plugin install lattice-scan --marketplace namiq-ai/lattice-scan`).

## Use

**A CVE you name** (no key needed):

```bash
lattice-scan --cve CVE-2021-44228 --cve CVE-2026-46300     # compared with this host; prints the evidence, priority, EPSS, SSVC, weakness, ATT&CK
lattice-scan --discover --all                              # older software in levels: no key = this machine, image OS, what listens; with a key = also packages until the allowance ends (--yes in scripts)
lattice-scan --discover --weekly                           # no key: what CISA added in the last week, checked against this host (--daily, --monthly, --open)
lattice-scan list | impact CVE-... | resolve CVE-... --status fixed --proof "..."    # the findings recorded so far, one in detail, and closing one
```

**Nothing to start from:**

```bash
lattice-scan                                               # no arguments: the same as `--discover --weekly` (it was `recent --daily` before 0.5.0)
lattice-scan recent                                        # every CVE in namiq.io's recent list (weekly + open: exploited and critical); only likely matches go to Lattice (--daily: last day or two; --weekly; --open: only the older ones)
printf '...' | lattice-scan enrich                         # ids from an audit or advisory: exploited? since when? patch due? ransomware? (no key: 20 ids a run)
```

**This host and its container images** (`quick` by default; `--deep` for everything):

```bash
lattice-scan --refresh                                     # collect the inventory again, show its totals, then run the daily scan
lattice-scan inventory --share                              # the important software as one block (150 lines at most) to paste into My products in the Lattice Analyst
lattice-scan --refresh --inventory                         # only the inventory: totals, no scan, no network call (--list prints every package)
lattice-scan --deep                                        # deep inventory: every local image and the packages inside them (about 6 minutes for 24 images)
```

**What this host exposes and runs** (read only; nothing is sent):

```bash
lattice-scan posture                                       # listening ports, firewall, SSH settings, services (seconds)
lattice-scan posture --since last                          # what is new, changed or gone since the last stored run (every host scan prints this too)
lattice-scan posture --deep                                # also processes no package owns, and persistence points (about a minute)
sudo lattice-scan posture --deep                           # as root: firewall rules, effective SSH settings, every process
```

**A project, a key, and what is happening:**

```bash
lattice-scan project . --cve CVE-2026-46300                # what the project declares (see below)
lattice-scan get-key --name ... --position ... --company ... --email ... --purpose "..."   # asks nothing until --accept-terms; for a real person who read the terms
lattice-scan --progress --cve CVE-...                      # which CVE, and which part of the host or project, as it runs (on by default; -q silences)
lattice-scan --debug --cve CVE-...                         # every request, response and match decision
```

## Check a project's dependencies

Not sure whether you want this command line, the Claude skill or the Lattice MCP server? The [channel guide](https://namiq.io/lattice/guides/choose-your-channel) compares them, lists what works without a key, and has a CI recipe.

**Who can scan what.** Reading many ids is for a key whose owner has confirmed their email. With a confirmed key, `--kev-catalogue` lets CISA's catalogue choose the ids. A key whose email is not
confirmed yet (tier `trial`) is refused with a message to confirm it; no id is read. **Without a key you name the CVEs yourself**, comma separated:
`lattice-scan project . --cve CVE-2026-46300,CVE-2021-44228` (at most 40 a run, inside the keyless daily allowance).

**No ids and no key:** `lattice-scan project . --discover` reads namiq.io's list of recent exploited CVEs (the last thirty days; `--weekly`, `--daily` and `--open` change the window), keeps the ones whose product a dependency in your project matches, and reads only those from Lattice. The list request carries nothing from your project.

```bash
lattice-scan project . --cve CVE-2026-46300,CVE-2021-44228                       # no key needed: only the CVEs you name
LATTICE_API_KEY=... lattice-scan project .  --kev-catalogue known_exploited_vulnerabilities.json   # confirmed key: CISA's file chooses the ids
lattice-scan project app/ api/ --name APP --name API --cve CVE-2026-46300         # explicit ids; several folders at once, labelled
lattice-scan project . --cve CVE-2026-46300 --csv findings.csv                    # the report on screen, a CSV alongside
lattice-scan --discover --exposed                                                     # only software that listens or runs as a service here; each candidate shows an exposure line
lattice-scan project . --cve CVE-2026-46300 --fail-on in-range                    # exit 1 when a declared version is inside an affected range
```

Reads what the project **declares**. Nothing is executed and nothing is installed.

| Ecosystem | Files |
|---|---|
| Python | `requirements*.txt` and `requirements*.lock` (with `-r` includes), `pyproject.toml` (PEP 621, optional groups, poetry) |
| JavaScript | `package.json`, `package-lock.json` |
| Java | `pom.xml` (properties resolved), `build.gradle`, `build.gradle.kts`, `gradle.lockfile`, `gradle/libs.versions.toml` |
| Rust | `Cargo.toml`, `Cargo.lock` |
| C and C++ | `CMakeLists.txt` and `*.cmake` (`find_package`, `FetchContent_Declare`, `ExternalProject_Add`, `CPMAddPackage`, `pkg_check_modules`), `conanfile.txt` / `conanfile.py`, `vcpkg.json` |
| Make | `Makefile`, `GNUmakefile`, `*.mk` (`NAME_VERSION = x.y.z`, `pkg-config` constraints, library names from `-l` flags, tarball names in download commands) |
| Containers | `Dockerfile*` (`FROM`, `pip install`, `apt-get install`, tarball names), `docker-compose` / `compose` files (`image:`) |

- A **pinned** version (`==2.14.0`, a lockfile entry, `=1.4.2` in Cargo, a Docker tag with two or more numbers such as `16.2` or `13.0.1-security-01`) is compared with NVD's ranges. A range
  (`>=1.0`), a caret requirement, `find_package(X 1.1)` (a minimum), a branch name, `latest` or a major-only tag (`16`) has no version, and the answer for it is `undetermined`, never `outside-range`.
- A `-lssl` link flag or an unversioned `find_package` names a library, not a version: it is listed so a person knows the library is used.
- Where a lockfile pins a name, the unpinned declarations of that name are left out: the lock says what is installed.
- Matching is by identity: the product must be the package (or its npm scope, or vendor+product). For Maven, Cargo, Conan, vcpkg, CMake and Make names the product as a whole token of a longer
  coordinate also matches (`org.apache.logging.log4j:log4j-core` is Log4j2), and its versions are compared. A match through an npm scope alone (`@vitejs/plugin-react` for Vite) is a lead only:
  that package's version is not the product's, so no range is compared. `minio` the Python client matches MinIO the server by name; reading the finding tells you which it is. A match is a candidate for a person to read against what is really deployed (a distribution may backport a fix; a lockfile may not be what runs).
- Writes no host records (`~/.lattice-scan` is untouched). Skips `node_modules`, virtualenvs, build output and `.claude`. If its file search reaches its limit it says so.
- Without a key, Lattice allows 60 reads a day; `--max-read` (default 40 without a key, 200 with one) stops a run from using them all, and the ids not read are listed.

### Reading the report

The default output is a report for a person: a summary table (one row per project, a total for several), then each project's findings with the declared component and its
file and line, CISA's dates ("listed 3 days ago, due in 18 days"), the version check and CISA's required action, then the ids that were not read, and a legend. Colour is used only on a
terminal (`--color auto`; never when `NO_COLOR` is set). `--width N` fixes the width.

| Verdict | Meaning |
|---|---|
| `in-range` | A declared, pinned version lies inside a range NVD lists as affected. Check what is really deployed. |
| `undetermined` | The declaration is a range, a minimum, a floating tag or has no version; NVD's bounds are dates or build ids. |
| `lead` | The declared package only shares a scope or name with the product, or is its client library (the PyPI `minio` is not the MinIO server). No range is compared. |
| `outside-range` | Every pinned version declared is outside every usable range. This does not close a finding. |
| `not-read` | An id that matches a dependency by name was not read from Lattice (a limit or a stop). Neither safe nor affected. |

### For scripts: CSV and JSON

`--format csv` prints (and `--csv FILE` writes) one row per finding and declared component, UTF-8, LF line ends, always with a header row, in this fixed column order:

```
project,cve,title,verdict,component,ecosystem,declared,version,file,line,listed,due,due_status,action,why
```

`version` is the pinned version alone (empty when there is none), `declared` is the text as written (`==2.14.0`). Text from outside (a CVE title, CISA's action, a file name) that starts with `=`, `+`, `-` or `@` is
written with one leading apostrophe so a spreadsheet does not run it as a formula; strip one leading `'` for the raw text. `--format json` (or `--json FILE`) is the same data with the files read and the ids not read.

```bash
lattice-scan project . --cve CVE-2026-46300,CVE-2021-44228 --format csv | \
  python3 -c 'import csv,sys; [print(r["cve"], r["component"]) for r in csv.DictReader(sys.stdin) if r["verdict"]=="in-range"]'
```

`lattice-scan index` and `project --discover --all` are not available: the exploited dataset is not published, and dependency names of a project can be private. Old software on the host is checked one item at a time with `--discover --all` (levels: no key, key, paid report).

Machine output: `--format json|csv` (or `--json FILE`, written with mode 0600) on the host check, `recent` and `enrich` gives the RESULT BY CVE table as one JSON document or CSV and nothing else on standard output.

Exit status: `0` done, `1` `--fail-on` matched (the host scan, `recent`, `project` and `enrich`), `2` bad usage or an unreadable input, `3` stopped part-way (Lattice's allowance ran out or it could not be reached; the ids not read are listed).

The full manual is `man lattice-scan` (installed by the `.deb`; `man -l man/lattice-scan.1` from a checkout), and `lattice-scan project --help` has examples and the CSV columns.

## Use it as a Claude Code skill

The same tool ships as a plugin whose skill runs it on the machine Claude is running on and reports each match as a candidate for a person to check.
```
/plugin install lattice-scan --marketplace namiq-ai/lattice-scan
```

The skill refuses to scan a hosted sandbox, because it would scan the sandbox and not the machine you mean.

### In OpenAI Codex

Codex reads the same `SKILL.md` format. The repository carries it where Codex looks: clone it and `.agents/skills/lattice-scan` is found when you start Codex in the folder.
To use it everywhere, copy `skills/lattice-scan` to `~/.agents/skills/lattice-scan`, or ask Codex's skill installer for it from `namiq-ai/lattice-scan`, path `skills/lattice-scan`.
Each release also attaches `lattice-scan-openai-plugin-<version>.zip`, the package for OpenAI's plugin directory. In ChatGPT the skill stops at its first step, because
ChatGPT runs it in a hosted sandbox and it checks the machine it runs on; Codex on your own computer is where it does its work.

## Share your inventory with the Lattice Analyst

`lattice-scan inventory --share` prints a block that starts `LATTICE INVENTORY v1` and ends `end`. Copy it and paste it into **My products** at <https://lattice.namiq.io/chat>:
the Analyst reads it, says which of today's, this week's and still-open CISA-exploited CVEs may concern what you run (a candidate is a lead for you to check, never a verdict), and
explains the posture lines. The block holds the kernel, what listens, any installed item that the CISA list may concern, the running container images, snaps and server software,
each with the reason it is listed, plus your firewall and SSH settings. It holds no host name, address, user name, serial or path. `--no-feed` leaves out the one request for
namiq.io's public list (the block then says so and can miss items); `--all FILE` writes every package to a private file for you; the block is the definition the Analyst reads
(the format is in `docs/INVENTORY-BLOCK.md`).

## What the host inventory collects: quick and deep

Every host scan starts by taking an inventory of the machine. It has two levels, because reading inside container images is slow.

| | **Quick** (default) | **Deep** (`--deep`, or `LATTICE_SCAN_LEVEL=deep`) |
|---|---|---|
| Hardware (maker, model, version, board, firmware version and date, architecture, CPU, memory, virtualisation) | yes | yes |
| Host packages (dpkg, rpm, apk), snaps, kernel, Node.js | yes | yes |
| Images that containers are running: base OS and release, package list, version label, `*_VERSION` variables | yes | yes |
| Every other local image (stopped, unused) | no | yes |
| Python, Node, Java and Ruby packages inside images | no | yes (every image) |
| Which local image each image was built on | yes | yes |
| Time (test host: 24 images, 31 GB, 7 running) | about 12 seconds | about 6 minutes |

After a quick scan the tool prints one line on stderr saying how many local images were opened, how long `--deep` would take and when a deep scan was last done (it suggests repeating one after 30 days). A deep scan prints a rough estimate first, then `[n/N %]` with elapsed time for each image and a summary. `-q` silences all of it. **A quick result is not "all clear":** stopped images and the packages inside images were not read.

`lattice-scan --refresh --inventory` prints the totals and a short summary of the images (by base OS, packages inside them); the full lists are in `inventory.json` in the records folder, and `--refresh --inventory --list` prints them.

**How images are read.** Nothing is started or pulled. For each image the tool runs `docker image inspect`, then `docker create` (with `--pull never`, `--network none` and the label `io.lattice-scan.run`), copies out only the OS release file and the package database with `docker cp`, and removes the container. The package database is chosen by the OS family: apk (Alpine), dpkg (Debian, Ubuntu, and distroless images through `status.d`) and rpm (sqlite databases: Fedora, RHEL 9 and later, Amazon Linux 2023; Berkeley DB and ndb databases are not read). In a deep scan it also streams `docker export` once per image and records the names and versions of Python (`dist-info`), Node (`package.json`), Java (jar file names) and Ruby (gems) packages, with a limit of 180 seconds per image after which that image is marked partial. Go and Rust binaries, Composer and NuGet are not read. The tool compares the image's own package versions, not the host's. A candidate found inside an image names the image (`musl 1.2.5-r8 (image redis:7-alpine)`). Environment variables of an image are never kept, except those ending in `_VERSION`. Serial numbers and UUIDs of the machine are never read. No registry is contacted.

**Safe to stop, safe to fail.** The container is removed after each image, also on an error. When the run ends or is stopped (Ctrl-C, SIGTERM) every container it made is removed. A run killed outright (SIGKILL) can leave a never-started container; the next run removes labelled containers older than 15 minutes. Only containers with that label are touched. `docker cp` and `docker export` write nothing to disk (at most 40 MB of one file is held in memory); an rpm database is written to a temporary folder that is removed at once. An image that fails is skipped and named, and the others are kept. Images are not opened when less than 1 GB is free where Docker keeps its data, and no new image is started after 30 minutes.

| Environment variable | Meaning |
|---|---|
| `LATTICE_SCAN_LEVEL` | `quick` (default) or `deep`, the same as `--deep` |
| `LATTICE_SCAN_IMAGES` | which images are opened, overriding the level: `all`, `running` or `off` |
| `LATTICE_SCAN_IMAGES_LANG` | which images get the Python/Node/Java/Ruby scan, overriding the level: `all`, `running` or `off` |
| `LATTICE_SCAN_MIN_FREE_MB` | free space needed where Docker keeps its data (default 1024) |
| `LATTICE_SCAN_DEEP_SECONDS` | no further image is started after this many seconds (default 1800) |
| `LATTICE_SCAN_DEEP_CACHE` | `on` (default) or `off`: a quick run uses the last complete deep scan for each image whose id is unchanged; `--refresh` opens them again |
| `LATTICE_SCAN_DEEP_CACHE_DAYS` | how old a kept deep scan may be (default 30) |
| `LATTICE_SCAN_READ_CACHE` | `on` (default) or `off`: an answer Lattice gave about one CVE id is kept in your cache folder and reused for a few hours, so a repeat run asks it nothing; `--again` and `--refresh` ask again |
| `LATTICE_SCAN_READ_CACHE_HOURS` | how old a kept answer may be (default 6) |
| `LATTICE_SCAN_READ_CACHE_FILE` | where the read cache is kept (default: your cache folder) |
| `LATTICE_SCAN_STALE_MINUTES` | age after which a leftover container of a killed run is removed (default 15) |

**The inventory file.** `inventory.json` (and the file named by `LATTICE_SCAN_INVENTORY`, which replaces the collection for tests and other tools) is a JSON object with `kernel`, `os`, `node`, `restartRequired`, `packages` (name to version), `snaps` (name to version) and `images` (running image names). The new, optional keys are `host` (the hardware: `manufacturer`, `model`, `version`, `board`, `biosVersion`, ...), `imageDetails` (image reference to `{os, osVersion, osName, packageManager, packages, versions, languages, builtOn, running, ...}`) and `imageScan` (`level`, `local`, `opened`, `skipped`, `deepSeconds`). An inventory without them still works.

## What this host exposes and runs: `posture`

`lattice-scan posture` looks at the machine itself, beyond what is installed. It only reads, changes and installs nothing, and sends nothing anywhere. It reports **signals for a person to read, not verdicts**: each says why it can be harmless, and the tool still does not detect incidents or decide that a host is compromised.

```bash
lattice-scan posture                    # quick: listening ports, firewall, SSH settings, services
lattice-scan posture --deep             # also every readable process and persistence points (about a minute)
sudo lattice-scan posture --deep        # as root: firewall rules, effective SSH settings, every process
lattice-scan posture --format json      # or --json FILE (mode 0600): the full result
```

**It follows the user who runs it and says which.** As root it reads the firewall rules, `sshd -T` and every process; as anyone else it reads what that user may and lists under *NOT READ* what it could not, so a missing answer is never mistaken for a clean one. It never asks for root and never runs `sudo`.

| | Quick | Deep |
|---|---|---|
| Listening TCP/UDP sockets: all interfaces, loopback only or one address; the owning process, its package or container image | yes | yes |
| Host firewall: ufw, firewalld, nftables, iptables (rules need root) | yes | yes |
| SSH server settings from `sshd_config` and `sshd_config.d` (first value wins, `Include` followed, OpenSSH defaults) | yes | yes |
| Running services and whether a package owns each program | yes | yes |
| Every readable process: program in a temporary folder, deleted while running, memory only, or owned by no package; outbound connections of those | no | yes |
| Programs replaced by a package update after they started (they still run the old version) | no | yes |
| `ld.so.preload`, accounts other than root with user id 0, cron and setuid files no package owns | no | yes |

Command line arguments are never recorded (they carry passwords). Programs in containers, snaps and flatpaks are attributed to those. Package ownership is read for dpkg, apk and rpm. Windows and macOS are not covered. A process that hides from the user it runs as is out of reach of any tool that runs as that user: this is a first look, not monitoring.

## What leaves the machine

CVE ids, and the key if you set one. `posture` sends nothing at all, unless you add `--attack`: then the signal codes it found (fixed labels such as `ssh.password-auth`) are shown, confirmed and sent one at a time. `--discover --all` asks first, in one question: how many items, three examples, what is sent (name and version only) and what you get back. Answer `d` to see every item, `a` to remember "always" for this kind of lookup (`lattice-scan consent` shows it, `lattice-scan consent forget` removes it); an "always" applies only at a terminal and only while the fields sent stay the same. It sends the items one at a time; never a host name, address, port or path. The inventory (hardware, package names and versions, and what is inside images) is not sent as a list; matching happens locally, except for the items you confirm with `--discover --all`.
`recent` also downloads namiq.io's public list of recent CVE ids; that request carries no id and nothing about the host.

**One report per run.** When a run has read from Lattice or from the recent list, the tool tells namiq.io once that a scan ran, so we can count scans (downloads cannot tell us). The whole of it is four fields: the command (such as `recent`), how it ended (`ok`, `matched`, `stopped` or `failed`), how many reads it made, as a band (`0`, `1-5`, `6-20`, `21-100`, `100+`), and the operating-system family (`linux` or `macos`, that word only, so we can see how many Mac scans there are). Never a host name, package, CVE id, path, address or key. The first run prints a note saying so. Turn it off with `LATTICE_SCAN_NO_REPORT=1`; it is also off whenever `LATTICE_URL` or the feed address points anywhere but namiq.io, and it never changes the exit code or waits more than 3 seconds. `get-key` sends the name, position, company, email and purpose you give it, only after `--accept-terms`.

**Signed list.** namiq.io signs the recent-CVE list. The tool fetches the signature and a short certificate (two static files beside `recent.json`, the same host, nothing of yours sent) and checks them with a key built into the tool: the certificate must be signed by NamiQ's root key, valid for at most 90 days and not older than the lowest serial this version accepts, and its key must have signed the exact bytes of the list. A good check prints `[feed] signature verified`. A list with no signature (for example from a self-hosted server) is read and labelled `not signed`. A wrong, expired or revoked signature or certificate stops the read with the reason, and the list is not used. You can check the same signature by hand with OpenSSL once you have the public key: `openssl pkeyutl -verify -rawin -pubin -inkey FEEDKEY.pub -sigfile recent.json.sig -in recent.json`.

**The distribution's own verdict (sent by default, printed first).** When a host scan matches packages by identity, it sends, for each matched
package only, its source package name, ecosystem, version and OS release (for example `brotli`, `deb`, `1.1.0-2+deb13u1`, `Debian 13`), and prints a notice of what it sends
before it does (even with `--quiet`; the full list is in the progress lines). It does not ask, so a script or CI job never waits. Lattice answers
with the distribution's or registry's own fixed version, so a Debian fix backported under an unchanged upstream number shows as `FIXED`, and a package
NVD gives no usable range for gets the registry's verdict instead of "undetermined". Unmatched packages, host name, addresses, paths and the package list are never sent.
Pass `--no-distro`, or set `LATTICE_SCAN_ITEM_VERDICT=off`, and nothing is sent for it: the verdict stays a comparison of upstream numbers, as before 1.1.0.
With no connection nothing is sent: a verdict saved on an earlier run is used and labelled with its date, and a package with none keeps the upstream comparison.

**Package identity list.** A host scan (`--cve`, `--discover`, `recent`) also downloads namiq.io's signed list of package identities per exploited CVE
(`identities.json` and its manifest, at most twice a day; nothing of yours is sent, and the list carries no version data). Where the list has a row for a CVE,
an installed package matches when its source package is one the row names (`openssh-client` is built from `openssh`; `libssl3` from `openssl`); a package that
only shares a word with the product is shown as `LEAD`, with no range compared. Where it has no row (most vendor and appliance products), names decide as
before. A list that is unsigned, signed by a key this version does not know, older than one already accepted, or carrying version data is refused, and
names decide; when namiq.io cannot be reached, the last verified copy is used, or the copy bundled in the release, with its age printed.
`LATTICE_SCAN_IDENTITIES_URL=0` turns it off. The source-package names are read from dpkg, rpm or apk and stay in the local `inventory.json`.
With `--python`, Python packages installed by pip, uv or conda (system and user site folders, virtual environments in the home folder) are read from
their metadata files and join as `pypi:NAME`; no interpreter is started, and the folders stay in `inventory.json`. With `--node`, globally installed
npm packages and their dependencies are read from their `package.json` files and join as `npm:NAME`; nothing is run.

**No network.** When Lattice or namiq.io cannot be reached, the tool does not stop. It tries once (not once per id), then answers from what an earlier run saved: the recent list and each CVE answer, at any age. The first line of the output says `OFFLINE:` and how old the saved data is, and warns past 30 days. A saved "not listed" is printed as `not listed as of DATE, not rechecked` and is never the same as clear; an id with no saved answer is listed as not read, and the exit code is 3 only for those. The "a scan ran" note is not sent then: it waits in a small file in the cache folder (50 notes at most, 30 days at most, the same three fields and the day) and goes out, oldest first and at most 10 at a time, with the next run that can reach namiq.io. A note kept this way is never sent if `LATTICE_SCAN_NO_REPORT=1`. Saved answers live in the same cache folder as before; the inventory and `posture` never needed the network.

## What it writes

`~/.lattice-scan/` (or `LATTICE_SCAN_DIR`; records from the earlier internal name `~/.host-scan` are still found), mode 0700, every file 0600: findings, scan, inventory and debug logs. They name this host's installed software. Do not commit,
publish or share them. `lattice-scan get-key` also stores a key there as the file `key` (mode 0600, never printed). `enrich` and `project` write nothing.

**Running as an agent, in a sandbox.** With no terminal and no records folder yet, a host run writes to a temporary folder that is deleted when it ends, so nothing stays in the home folder; `--keep` (or `LATTICE_SCAN_KEEP=1`) keeps the records. If the home is read-only or missing the run says so in one line and does the same. Set `LATTICE_SCAN_DIR` to a folder the agent owns to choose where records go, and `LATTICE_API_KEY` for a key; if `LATTICE_SCAN_DIR` is set and cannot be written, the run stops with one line naming it.

## What it cannot tell you

- Version ranges are compared as upstream numbers. A distribution can fix a CVE under an unchanged version number, so `in-range` is a lead, not a finding;
  the report also shows whether an installed package's own changelog names the CVE (Debian-family hosts only).
- Without a key, only `graph_lookup` is available and the daily allowance is small. The script waits between calls to stay under it. Getting a key is
  described at https://namiq.io/lattice/docs#agents; a person does that, and the tool never requests one.
- Host inventory: see "What the host inventory collects" above for what quick and deep read and do not read inside container images.
- Tested on Debian-family hosts. On rpm and apk hosts the inventory is collected (checked on Fedora and Alpine) but matching and the changelog check are not tested there; the changelog check is Debian-only.

## Reporting a problem

A wrong match, a crash, or anything that looks like a security problem: open an issue, or write to contact@namiq.io for anything you would rather not post
publicly. See `SECURITY.md`.

## Licence

Apache License 2.0. See `LICENSE` and `NOTICE`. Copyright 2026 NamiQ LLC.

The licence does not grant the right to use the names "NamiQ" or "Lattice" or their logos. Releases up to v0.1.0 were published under MIT; see `NOTICE`.
