DEV Community

kozhevniko
kozhevniko

Posted on

in-toto Verification Fails When the Layout Is Mutable

in-toto Verification Fails When the Layout Is Mutable

in-toto records evidence about who performed each step in a software supply chain and which artifacts moved between steps. A signed layout names the steps, the functionaries and the artifact rules. Each functionary produces link metadata that describes the materials consumed and the products created. The verifier checks the signed evidence against the layout before a build or release is accepted.

The result is useful only when the layout is a stable policy input. A deployment pipeline that downloads the layout from the same repository as the artifact may let an attacker change the policy and the evidence together. A verifier that accepts a newer layout without a trusted review process has turned a signed claim into a request from the artifact producer.

Thresholds need distinct identities

A layout can require more than one signature for a step or a sublayout. The verifier should count unique functionary identities, not repeated signatures from one key. It should also check that the key is authorized for the step and the role. A threshold of two that is satisfied by a master key and one of its subkeys may look cryptographically valid while representing one authority.

Artifact rules need the same specificity. A rule that permits any file matching a broad pattern can authorize more than the reviewer expects. The verifier should compare the actual digest, path and rule scope. A successful signature over a link that lists an unexpected material is still a supply-chain failure if the layout does not allow that material.

The layout's own signature should be verified against an owner key that is protected outside the build path. Rotation should preserve the old verification keys for historical evidence while preventing a build from choosing a new, unreviewed key. The policy should define who can approve a layout change and how that approval is recorded.

Treat metadata as evidence, not as an audit log

Link metadata can contain paths, commands, timestamps and artifact hashes. It can also contain environment details that reveal internal paths or credentials. Store the metadata with access controls and a retention policy. Do not copy full command lines into a public build dashboard. The verifier needs enough evidence to make a decision, while the organization still needs to limit unnecessary disclosure.

Replay is another operational risk. A valid piece of evidence from an earlier build should not be reused to authorize a new artifact. The layout and verifier should bind the evidence to the expected source revision, build identity and artifact digest. TUF integration is one way to protect metadata distribution, but it does not replace the policy decision inside the verifier.

Test the verifier with hostile layouts

Run negative tests with a missing functionary, a duplicate signer, a wrong artifact digest, an expired key, a revoked key and an extra material that the rule does not allow. Test a layout that points to a valid but unapproved trust root. Confirm that each case fails before the artifact reaches a release channel.

The same tests should run against the production verifier, not only a library example. A CI job that calls in-toto but does not fail the job on verification error provides evidence without enforcement. The layout, keys, artifact rules and failure behavior all belong to the release policy. in-toto records that policy; the operator must make the policy immutable at the moment of decision.

References

Top comments (0)