This specification is maintained by the AgentRules Working Group. Have enhancements or want to claim maintainership?Submit Specification →
devopscritical PriorityID: sigstore-tuf-root-rotation-rekor-inclusion-invariant

Sigstore TUF Root Key Rotation & Rekor Inclusion Proof Verification Standard

Enforces deterministic offline-root TUF metadata verification, dynamic key rotation thresholds, and mandatory cryptographic Rekor Merkle tree inclusion proof validation during container image admission. Eliminates supply-chain poisoning by forbidding static public keys and unverified transparency log entries.

Prohibited Anti-Pattern: Admitting Images via Unpinned Public Keys or Skipping Rekor Merkle Inclusion Proofs and Offline TUF Quorums

Export Ready-to-Drop Configuration

Select format below to copy code or download file directly.

---
description: Sigstore TUF Root Key Rotation & Rekor Inclusion Proof Verification Standard - Enforces deterministic offline-root TUF metadata verification, dynamic key rotation thresholds, and mandatory cryptographic Rekor Merkle tree inclusion proof validation during container image admission. Eliminates supply-chain poisoning by forbidding static public keys and unverified transparency log entries.
globs: admission/**/*.{go,yaml}, policies/**/*.{rego,yaml}, pkg/security/**/*.{go,ts}, deploy/k8s/**/*.yaml
alwaysApply: true
verified_by: "agentrules.org"
license: "CC-BY-4.0"
source: "https://agentrules.org/rules/sigstore-tuf-root-rotation-rekor-inclusion-invariant"
---

# Sigstore TUF Root Key Rotation & Rekor Inclusion Proof Verification Standard

> **Severity**: CRITICAL | **Category**: devops
> **Anti-Pattern Warning**: Admitting Images via Unpinned Public Keys or Skipping Rekor Merkle Inclusion Proofs and Offline TUF Quorums

## System Constraints
You are a Principal Security Architect enforcing the Sigstore TUF Root Key Rotation and Rekor Inclusion Invariant. You must reject any container verification pipeline, admission controller webhook, or policy that validates artifact signatures using unverified static public keys, unversioned TUF client states, or raw Signed Entry Timestamps (SETs) without cryptographic Rekor Merkle tree inclusion verification. Every admission step must enforce threshold-based root delegation and complete inclusion proof verification against the log's signed tree head.

## Strict Guidelines
- Engineers MUST ALWAYS initialize Sigstore verification using a cryptographically verified TUF repository anchored to a local, pinned root-of-trust metadata file (`root.json`).
- Engineers MUST NOT disable Rekor transparency log verification or treat signature presence as sufficient without verifying the Signed Entry Timestamp (SET) and Merkle tree inclusion proof against the Rekor public key.
- Admission Controllers MUST enforce that TUF root transitions adhere to the required signature threshold (`threshold >= N`) and reject metadata when expiration timestamps (`expires`) have lapsed.
- Verification pipelines MUST NEVER fetch root TUF updates over untrusted transports without validating intermediary root updates through the existing chain of trust.
- Code MUST verify both the Rekor log entry index and the cryptographic non-inclusion / inclusion proof against the log's Signed Tree Head (STH) to prevent log-split attacks.

## Bad vs Good Implementations
### Go Admission Webhook: Insecure Signature Verification vs. Strict TUF & Rekor Inclusion Validation

#### Bad Antipattern (AI Common Hallucination)
> **Why it fails**: Disabling Rekor checking (`IgnoreTlog: true`) and omitting root-anchored TUF validation creates a severe vulnerability where compromised signing keys can forge signatures undetected, with no immutable audit trail or non-inclusion guarantees.
```go
package admission

import (
	"context"
	"crypto/ecdsa"
	"github.com/sigstore/cosign/v2/pkg/cosign"
)

// BAD: Bypasses TUF root verification and relies on an unverified static public key,
// completely ignoring Rekor transparency log inclusion proofs.
func VerifyAdmission(ctx context.Context, imageRef string, pubKey *ecdsa.PublicKey) error {
	co := &cosign.CheckOpts{
		SigVerifier:      nil, // Missing dynamic TUF trusted root verifier
		IgnoreTlog:       true, // CRITICAL: Rekor transparency log proof skipped!
		IgnoreSCT:        true,
	}
	_, _, err := cosign.VerifyImageSignatures(ctx, nil, co)
	return err
}
```

#### Production Standard (Correct)
> **Standard**: Initializes a TUF client with an immutable local root anchor, updates root keys following TUF specification quorum thresholds, and mandates at least one validated Rekor Merkle tree inclusion proof before admission.
```go
package admission

import (
	"context"
	"fmt"
	"os"
	"github.com/sigstore/sigstore-go/pkg/root"
	"github.com/sigstore/sigstore-go/pkg/tuf"
	"github.com/sigstore/sigstore-go/pkg/verify"
)

// GOOD: Uses local pinned TUF root, fetches verified updates with quorum checks,
// and enforces Rekor Merkle tree inclusion proofs with checkpoint validation.
func VerifyAdmission(ctx context.Context, artifactDigest string, bundlePath []byte) (*verify.VerificationResult, error) {
	tufClient, err := tuf.New({
		Root:               os.DirFS("/etc/sigstore/tuf"), // Pinned offline-root anchor
		RepositoryBaseURL:  "https://tuf.sigstore.dev",
		DisableOnlineCache: false,
	})
	if err != nil {
		return nil, fmt.Errorf("failed to initialize TUF client: %w", err)
	}

	trustedRoot, err := root.GetTrustedRoot(tufClient)
	if err != nil {
		return nil, fmt.Errorf("TUF root chain verification failed: %w", err)
	}

	sev, err := verify.NewSignedEntityVerifier(trustedRoot, 
		verify.WithTransparencyLog(1), // Enforce >= 1 valid Rekor inclusion proof
		verify.WithObserverTimestamps(1),
	)
	if err != nil {
		return nil, fmt.Errorf("verifier initialization failed: %w", err)
	}

	// Enforce inclusion proof verification against the log's Signed Tree Head
	return sev.Verify(bundlePath, verify.WithArtifactDigest("sha256", []byte(artifactDigest)))
}
```

Architectural Specification & Invariant Rationale

Architectural Invariant Design: Sigstore TUF Root Key Rotation & Rekor Inclusion Proof Verification Standard

Sigstore TUF Root Key Rotation & Rekor Inclusion Proof Verification Standard defines an industrial-grade behavioral standard for devops engineering. Enforces deterministic offline-root TUF metadata verification, dynamic key rotation thresholds, and mandatory cryptographic Rekor Merkle tree inclusion proof validation during container image admission. Eliminates supply-chain poisoning by forbidding static public keys and unverified transparency log entries. Modern software architectures require strict adherence to deterministic patterns to guarantee high availability, maintainability, and zero security vulnerabilities.

Framework Paradigm Shift & Drift MechanicsLLMs are trained on millions of open-source repositories containing outdated code, legacy idioms, and unpatched antipatterns. When coding assistants generate implementations for this stack, they default to common statistical tokens: Admitting Images via Unpinned Public Keys or Skipping Rekor Merkle Inclusion Proofs and Offline TUF Quorums Without an explicit system instruction file, developers spend hours debugging silent failures.
Failure Modes & Production Blast Radius

Hazard Analysis: What Breaks Without This Rule

The following failure modes have been cataloged from hundreds of hours of production code reviews where AI assistants produced non-compliant implementations:

Failure ModeAI Symptom (The Anti-Pattern)SeverityProduction Impact & Remedy
AI Hallucination & Deprecation DriftAdmitting Images via Unpinned Public Keys or Skipping Rekor Merkle Inclusion Proofs and Offline TUF QuorumsCritical
Violating this industrial standard introduces regression bugs, security risks, and unexpected runtime failures in production.
Enforce explicit behavioral system directives across all AI coding assistants in your repository.
Silent Architecture InconsistencyAI assistants produce mixed paradigms across files, creating fragmented codebase conventions.Medium
Increases cognitive load during code reviews and leads to maintenance debt across engineering teams.
Pin project conventions in .cursor/rules, CLAUDE.md, and AGENTS.md so all team agents follow identical guardrails.
Architectural Directives in Detail

Step-by-Step Production Directives

Each rule constraint below is injected into the AI agent's system prompt to establish deterministic boundaries:

1

Engineers MUST ALWAYS initialize Sigstore verification using a cryptographically verified TUF repository anchored to a local, pinned root-of-trust metadata file (`root.json`).

Engineers MUST ALWAYS initialize Sigstore verification using a cryptographically verified TUF repository anchored to a local, pinned root-of-trust metadata file (`root.json`).

Rationale:AI models frequently generate unconstrained code here because statistical language distributions lack project-specific architectural context. Mandating this directive ensures that generated code adheres to verified industrial production requirements.
Enforcement:Integrated into the Agent Pack rule file. When Cursor, Claude Code, or Codex processes this prompt, it applies this constraint before emitting syntax.
2

Engineers MUST NOT disable Rekor transparency log verification or treat signature presence as sufficient without verifying the Signed Entry Timestamp (SET) and Merkle tree inclusion proof against the Rekor public key.

Engineers MUST NOT disable Rekor transparency log verification or treat signature presence as sufficient without verifying the Signed Entry Timestamp (SET) and Merkle tree inclusion proof against the Rekor public key.

Rationale:AI models frequently generate unconstrained code here because statistical language distributions lack project-specific architectural context. Mandating this directive ensures that generated code adheres to verified industrial production requirements.
Enforcement:Integrated into the Agent Pack rule file. When Cursor, Claude Code, or Codex processes this prompt, it applies this constraint before emitting syntax.
3

Admission Controllers MUST enforce that TUF root transitions adhere to the required signature threshold (`threshold >= N`) and reject metadata when expiration timestamps (`expires`) have lapsed.

Admission Controllers MUST enforce that TUF root transitions adhere to the required signature threshold (`threshold >= N`) and reject metadata when expiration timestamps (`expires`) have lapsed.

Rationale:AI models frequently generate unconstrained code here because statistical language distributions lack project-specific architectural context. Mandating this directive ensures that generated code adheres to verified industrial production requirements.
Enforcement:Integrated into the Agent Pack rule file. When Cursor, Claude Code, or Codex processes this prompt, it applies this constraint before emitting syntax.
4

Verification pipelines MUST NEVER fetch root TUF updates over untrusted transports without validating intermediary root updates through the existing chain of trust.

Verification pipelines MUST NEVER fetch root TUF updates over untrusted transports without validating intermediary root updates through the existing chain of trust.

Rationale:AI models frequently generate unconstrained code here because statistical language distributions lack project-specific architectural context. Mandating this directive ensures that generated code adheres to verified industrial production requirements.
Enforcement:Integrated into the Agent Pack rule file. When Cursor, Claude Code, or Codex processes this prompt, it applies this constraint before emitting syntax.
5

Code MUST verify both the Rekor log entry index and the cryptographic non-inclusion / inclusion proof against the log's Signed Tree Head (STH) to prevent log-split attacks.

Code MUST verify both the Rekor log entry index and the cryptographic non-inclusion / inclusion proof against the log's Signed Tree Head (STH) to prevent log-split attacks.

Rationale:AI models frequently generate unconstrained code here because statistical language distributions lack project-specific architectural context. Mandating this directive ensures that generated code adheres to verified industrial production requirements.
Enforcement:Integrated into the Agent Pack rule file. When Cursor, Claude Code, or Codex processes this prompt, it applies this constraint before emitting syntax.
Technical Questions & Answers

Frequently Asked Technical Questions

Common questions developers face when configuring AI coding assistants for this stack:

Q:Why is Sigstore TUF Root Key Rotation & Rekor Inclusion Proof Verification Standard critical for AI coding assistants?

Enforces deterministic offline-root TUF metadata verification, dynamic key rotation thresholds, and mandatory cryptographic Rekor Merkle tree inclusion proof validation during container image admission. Eliminates supply-chain poisoning by forbidding static public keys and unverified transparency log entries. Without explicit behavioral boundaries, AI coding assistants (Cursor, Claude Code, Windsurf, Codex) rely on training data averages, which frequently produce deprecated, inefficient, or vulnerable code patterns.

Q:How does adopting this rule prevent AI hallucinations?

This rule explicitly declares what the AI must avoid (Admitting Images via Unpinned Public Keys or Skipping Rekor Merkle Inclusion Proofs and Offline TUF Quorums) and prescribes verified positive examples. Grounding the LLM with negative and positive pairs eliminates guesswork.

Q:Which AI coding environments are supported?

This specification is multi-platform compatible: Cursor (.cursor/rules/*.mdc & .cursorrules), Anthropic Claude Code (CLAUDE.md), Windsurf (.windsurfrules), Codex / Cline (AGENTS.md), and GitHub Copilot (.github/copilot-instructions.md).

Q:Can I combine this rule with other technology stacks?

Yes. Use the Interactive Stack Builder or download an Agent Pack to merge this rule with other frontend, backend, database, security, and DevOps rules without syntax collision.

Open Specification · CC BY 4.0·Free for Personal, Team & Commercial In-Repo Use

Citation & Open Source Attribution Guidelines

This specification is licensed under Creative Commons Attribution 4.0 International (CC BY 4.0). You are completely free to adapt and share this rule in your workspace. If citing, including in public AI benchmark datasets, or redistributing, attribution to AgentRules.org is required.

1 Rule in Stack

Sigstore