Home / Docs / Diagnostics

U7010: A package, archive, statement, root, checkpoint or log proof that fails verification

Release v0.4.0

A package, an archive or a registry document fails verification. U7010 reports what failed and where it came from.

Why Una rejects it

A package of edition 0.4 is pinned by ita.lock to the content digest of each package it uses (ADR 0122, spec/30).

Every command that loads the package verifies, offline, each locked registry package it reads from the vendor directory or from Itaoca:

una ita lock, update, add and fetch verify what they read from a registry the same way, from a mirror as from the source itself. A mirror that serves a copy that does not verify is skipped and named. This release has no https transport, so a registry is read only from a mirror directory that Itaoca's mirrors.una lists as a file:// URL. They verify:

U7010 reports what failed and where it came from:

A vendored package that fails is not replaced by the copy in Itaoca.

una ita audit also reports evidence against a registry, at the source's registry section of ita.lock:

An owner's chain that is contested, where a claim of compromise that counts is void under the chain's compromises (spec/30 §14 rule 5, "Which claims count"), also refuses the owner's packages, while it stays contested. It is not evidence against the registry, and a later claim of compromise by the owner can resolve it.

How to fix it

There is no mechanical repair: a failure is evidence that the files were changed, or of an attack. Find out why, then remove the copy and vendor or fetch it again.

When una ita audit reports evidence against a registry, keep the registry's checkpoint and that chain's entries, and publish them. After such an entry the owner registers under a new owner name, with new keys, since a key that another owner's chain named is refused.

In the failing example, a file of the vendored release was edited after it was vendored. The fixed example shows the package once the dependency is no longer needed, since a self-contained example cannot carry a registry's signed files.

Failing example

ita.unauna
ita demo
  version 0.1.0
  edition 0.4

sources
  acme "https://ita.acme.example"
    root "sha256:5e0d1b7a5e0d1b7a5e0d1b7a5e0d1b7a5e0d1b7a5e0d1b7a5e0d1b7a5e0d1b7a"

needs
  ledger 0.3 from acme
ita.lockuna
-- Written by `una ita`; do not edit.
lock 1

solver
  encoding "una-smt-1"
  name "z3"
  version "5.1.0"
  logic "QF_UFLIA"
  steps 5000000
  seed 0

registry acme
  root "sha256:5e0d1b7a5e0d1b7a5e0d1b7a5e0d1b7a5e0d1b7a5e0d1b7a5e0d1b7a5e0d1b7a"
  checkpoint 2 "sha256:0b7e3c110b7e3c110b7e3c110b7e3c110b7e3c110b7e3c110b7e3c110b7e3c11"
  last root 1 "sha256:5e0d1b7a5e0d1b7a5e0d1b7a5e0d1b7a5e0d1b7a5e0d1b7a5e0d1b7a5e0d1b7a"

package ledger 0.3.1
  from acme
  digest "sha256:3b1f8e0c3b1f8e0c3b1f8e0c3b1f8e0c3b1f8e0c3b1f8e0c3b1f8e0c3b1f8e0c"
  signed "ed25519:itauna:7c0a91d27c0a91d27c0a91d27c0a91d27c0a91d27c0a91d27c0a91d27c0a91d2"
  logged 1
vendor/ita/acme/ledger-0.3.1/ita.unauna
ita ledger
  version 0.3.1
  edition 0.4
vendor/ita/acme/ledger-0.3.1/src/ledger.unauna
module ledger

pub total() -> Int = 4
src/demo.unauna
module demo

pub one() -> Int = 1

Fixed example

ita.unauna
ita demo
  version 0.1.0
  edition 0.4
ita.lockuna
-- Written by `una ita`; do not edit.
lock 1

solver
  encoding "una-smt-1"
  name "z3"
  version "5.1.0"
  logic "QF_UFLIA"
  steps 5000000
  seed 0
src/demo.unauna
module demo

pub one() -> Int = 1