Home / Docs / Specification / 30. Packages and dependencies

30.13 Trust a dependency adds

Release v0.4.0
  1. A dependency's trusted modules (its trusted section and trusted module headers) are trusted in the program only if a trust line of the root names the package and each of them by its module path in the package (U7012 at the need otherwise). A trust line names a package the root needs directly by its name alone, its major line and source being the need's; a path package has no source, so a trust line with from names a registry package, never a path one.
  2. Consent is pinned to the whole package. The lock records, for the package, consented "<digest>" with its content digest, and trusted modules .... Loading compares the recorded digest with the package's content as it is now, and every trusted module with those recorded; any difference, a change of any file of the package included, is U7012 until una ita lock --accept-trust <package>@<digest> records it again, with the digest of the content reviewed. The digest is computed from the bytes the package was loaded from, the same ones checked, and never from its files read again. A policy's via may call any function of its package, so pinning the trusted module's file alone would not pin the code it runs.
  3. An extent of its own (rule 53.1). A consented trusted module m of the dependency <local> is the program's trusted module <local>.m, and an extent of its own inside its package's: calls into it from outside it, the package's other modules included, are crossings, granted with with (U3020). A release whose policy it declares is not a release into a boundary, whoever reaches it (no U3024); every other release stays U3024.
  4. One ceiling, for now. Until a crossing's ceiling depends on its direction, the package's extent and its trusted extents share one ceiling: the intersection of the root's may lines for the package and those under its trust line. It is never wider than either, so a program this accepts is one rule 53.1 accepts.
  5. The report lists each dependency's consented trusted modules under its trust, and tcb.dependency_trust gives them by package, with their line counts; tcb.trusted_modules keeps the root's own.