Skip to content
docsv0.13.1

ControlAttestation

Who takes responsibility for a classification, over which exact artifact, and until when. ── THREE SIGNATURES THAT ARE NOT THE SAME SIGNATURE ──────────────────────────────────────────── A marketplace asks three different questions, and conflating them is the vulnerability: publisher signature who published this? → provenance control attestation who answers for its class? → classification broker mediation what can it do while running? → enforcement **A malicious package can be perfectly signed by its author.** Provenance proves who, not what (GOV-17). ── WHY IT BINDS TO THE DIGEST AND NOT TO THE VERSION ─────────────────────────────────────────── `package@1.2.0 sha256:AAA` has an attestation. `package@1.2.1 sha256:BBB` **inherits nothing** — not partially, not provisionally. Binding to the version would let a publisher ship something else under a number that was already classified, the cheapest way to break the whole chain.

ControlAttestation::__construct()

public function __construct(string $package, string $digest, string $issuer, array $profile, string $signature, ?int $expiresAt = null):

Parameters

Parameters of __construct()
NameTypeDescription
$packagestringwhich package it refers to
$digeststringthe EXACT hash of the classified artifact
$issuerstringwho takes responsibility — an authority, not the package
$profilearray<string, mixed>the effect classification being attested
$signaturestringthe issuer's signature over the above
$expiresAt(int | null)when it stops holding, or `null` if it never expires

ControlAttestation::covers()

public function covers(string $package, string $digest): bool

Whether this attestation applies to the artifact actually in hand. It compares the digest, not the name or the version. A different artifact with the same name is not attested: it is unattested, which under GOV-05 is the worst case and not the best.

Parameters

Parameters of covers()
NameTypeDescription
$packagestring
$digeststring

ControlAttestation::isValidAt()

public function isValidAt(int $moment): bool

Whether it still holds at the given moment. The moment is passed in, not read from the clock: an attestation judged against `time()` gives a different verdict on every run and cannot be reproduced, which is the opposite of what an attestation exists to make possible.

Parameters

Parameters of isValidAt()
NameTypeDescription
$momentint