DocsAsset ManagementScan Coverage

Scan Coverage

Which parts of an agent scan succeeded: every report carries one coverage entry per collector and scope, the backend uses it to decide which software can be removed, and the asset page shows it.


Coverage Entries

Each agent report includes coverage[], with one entry per collector and scope. An entry has the collector name, the scope, a status, the duration in milliseconds, the number of items reported and a reason (empty when the scope is ok with nothing to note).

  • ok: the scope was scanned completely
  • partial: the scope was scanned but something was missed (an error after some data was read, malformed entries, truncation, a time budget or limit reached while scanning, directories that could not be read)
  • failed: the scope could not be scanned (for example a package query that timed out, an unreadable root, or a root never reached because the scan stopped earlier: reason not scanned: <cause>)
  • skipped: the scope does not apply or was not run (package database not found, collector disabled by configuration, not supported on the operating system, excluded root or skipped mount)

Scopes

Package scopes always have the form packages:<ecosystem>[:<root>], using the same ecosystem as the reported packages. Collectors without scopes of their own (system, process, network, application, container, certificate) get one entry whose scope is the collector name.

  • packages: packages:deb, packages:rpm and packages:apk on every host; a missing database, as on Windows, is skipped
  • packages:candidates (collector packages): the query of the upgrades available in the local package indexes. ok when it ran; partial with a reason starting with "indici datati" when the newest index is older than packages.candidates.stale_index_days (default 7) or no index is found, and with N malformed candidate entries skipped for unparsable lines; failed when the command timed out or failed (e.g. dnf without cache); skipped when disabled by configuration, when apt-get, dnf/yum or apk is not installed, or with reason no supported package manager. It never covers a component, so it has no effect on removal: it only decides whether the upgrade candidates of the report are stored
  • windows_software: packages:windows (installed programs) and hotfixes; on other operating systems both are skipped with reason not supported on <os>
  • language_packages: one scope per configured root and ecosystem, for example packages:pypi:/srv or packages:npm:/opt; a malformed manifest makes only the scope of its ecosystem in that root partial
  • A root that no longer exists is reported ok with 0 items and reason root not found: it is a valid observation that nothing is there
  • With features.package_collection disabled the three package collectors and packages:candidates are reported skipped with reason disabled by configuration
{
  "collector": "packages",
  "scope": "packages:rpm",
  "status": "failed",
  "duration_ms": 60000,
  "items": 0,
  "reason": "rpm query timed out after 1m0s"
}

How Coverage Protects the Inventory

A component not seen in a report is removed only when the report proves it is gone: every package scope that covers it is ok. Otherwise it stays present and is marked with stale evidence, keeping the last seen time of its last valid observation.

  • A scope covers a component when it has the same ecosystem and either has no root or the component path is inside the root
  • A component that no scope covers (for example a pypi package under a directory that is no longer a configured root) is never removed, only marked stale
  • If the server discarded any malformed package or coverage entry, no package is removed in that report
  • A stale component seen again becomes fresh, with a new last seen time
  • Open CVE findings on the software of a stale component are not auto-resolved: missing evidence is not proof that the vulnerable software is gone

Note: Agents older than this release do not send coverage: for them the backend keeps the previous rule based on the report errors.

Viewing Coverage on the Asset Page

The page of an agent host shows a Scan Coverage panel with the time of the last report and a table of collector, scope, status, items, duration and reason. Every scope that is not ok is highlighted with its status badge and its cause, and the panel header counts the scopes not ok. If the agent did not report coverage the panel says so: upgrade the agent to see it. Assets that are not agent hosts do not show the panel.

  • API: GET /api/v1/assets/{uid}/coverage/ returns agent_id, reported_at and the coverage of the last report
  • For assets without an agent the response is agent_id null, reported_at null and an empty coverage list
Asset detail of a Linux server: details, ownership, health checks and security findings

Limits

A report can carry at most 2000 coverage entries; the agent keeps the first 2000 and adds an error, and the backend rejects larger lists with 400. Malformed entries (unknown status, missing collector or scope, negative counters, text too long) are discarded without failing the report, and the report errors show server: coverage: N malformed entries discarded.