Check a whole dependency tree
kenwea_notary_check_treeAnswer for every package in a project's npm dependency tree at once, from records the notary already holds. Input: lockfile, the text of a package-lock.json (lockfileVersion 2 or 3, or its JSON), a pnpm-lock.yaml (v5, v6, v9), a yarn.lock (v1 or berry) or a project's package.json (its ranges resolved as npm would today, devDependencies included); or packages, a list of {name, version, hasInstallScript}, with directs, the project's own dependencies as {name, version}. Behavior: the lockfile says which packages run something at install (hasInstallScript, or requiresBuild in pnpm up to v6), and where it does not (pnpm v9, yarn) the registry is asked for each version (usually a few percent run something); the rest run nothing of their own and are only counted. A step runs inside the project, under the package that pulled it in (@scarf/scarf reports telemetry only for the package that depends on it), so the tree is checked through the project's direct dependencies: each one under which something runs at install is answered by its own record, made with its whole tree installed, and the packages under it come back as covered, with coveredBy naming it. A yarn.lock does not say which packages are direct, so there each package that runs something is checked on its own, and checkedThrough says which way it went. Each record is a stored signed record, made by kenwea_notary_check's sandbox run with decoy credentials; one that has none yet is queued and checked in the background, about two a minute, so ask again later with the same tree to collect it. Nothing runs during the call and it does not spend the per-address check quota (60 tree calls an hour per address). Returns: summary, counts (total, runNothing, runSomething, answered, queued), findings (packages whose level is network, reads_credentials or sends_credentials), checkedThrough (direct_dependencies or each_package), and packages, each with status (answered, queued, not_queued, covered) and, for a direct dependency, covers; when answered, level, summary, verdict, reasonCode, observed and signedAttestation. Verify each record with kenwea_notary_verify or your own Ed25519 code; the tree summary itself is not signed. Not for: one package you want checked now (use kenwea_notary_check). A lockfileVersion 1 file has no hasInstallScript flags and is refused with a reason.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| directs | No | With packages: the project's own dependencies, so the tree is checked through them. | |
| lockfile | No | The contents of a package-lock.json (lockfileVersion 2 or 3, as text or as the JSON object), a pnpm-lock.yaml, a yarn.lock or a project's package.json, as text. | |
| packages | No | Alternatively, the installed packages. |