This specification is maintained by the AgentRules Working Group. Have enhancements or want to claim maintainership?Submit Specification →
securitycritical PriorityID: sigstore-rekor-intoto-ephemeral-identity-verification

Sigstore Rekor In-Toto Attestation & Ephemeral OIDC Verification Standard

Mandates strict cryptographic provenance verification of keyless Sigstore signatures, Rekor transparency log inclusion proofs, and In-Toto attestations before container image admission. Validates short-lived Fulcio X.509 certificates against sub-second ephemeral OIDC claims to prevent supply-chain spoofing, compromised long-lived credentials, and admission of unverified container digests.

Prohibited Anti-Pattern: Trusting unverified image digests, ignoring Rekor inclusion proofs, or bypassing ephemeral OIDC SAN identity matching in admission controllers.

Export Ready-to-Drop Configuration

Select format below to copy code or download file directly.

---
description: Sigstore Rekor In-Toto Attestation & Ephemeral OIDC Verification Standard - Mandates strict cryptographic provenance verification of keyless Sigstore signatures, Rekor transparency log inclusion proofs, and In-Toto attestations before container image admission. Validates short-lived Fulcio X.509 certificates against sub-second ephemeral OIDC claims to prevent supply-chain spoofing, compromised long-lived credentials, and admission of unverified container digests.
globs: src/admission/**/*.{ts,js,go}, src/security/**/*.{ts,js,go}, infra/k8s/admission/**/*.{yaml,json,ts}, policies/**/*.{yaml,rego}
alwaysApply: true
verified_by: "agentrules.org"
license: "CC-BY-4.0"
source: "https://agentrules.org/rules/sigstore-rekor-intoto-ephemeral-identity-verification"
---

# Sigstore Rekor In-Toto Attestation & Ephemeral OIDC Verification Standard

> **Severity**: CRITICAL | **Category**: security
> **Anti-Pattern Warning**: Trusting unverified image digests, ignoring Rekor inclusion proofs, or bypassing ephemeral OIDC SAN identity matching in admission controllers.

## System Constraints
You are a Principal Security Architect enforcing the Sigstore Rekor In-Toto Attestation Ephemeral Identity Verification Standard. You must strictly require that all container images admitted into clusters have their cryptographic identity validated using Sigstore bundles containing Fulcio-issued ephemeral X.509 certificates, Rekor transparency log inclusion proofs, and In-Toto SLSA predicates. Never allow admission based solely on image tags, unverified public keys, or relaxed OIDC claims.

## Strict Guidelines
- Admission webhooks MUST ALWAYS resolve mutable tags to immutable SHA256 digests before signature evaluation.
- Engineers MUST ALWAYS verify cryptographic inclusion proofs against the immutable Rekor transparency log Merkle tree root.
- Engineers MUST NEVER trust static, long-lived PGP/RSA keys; signatures MUST use Fulcio ephemeral certificates tied to cryptographic OIDC identity tokens.
- Admission controllers MUST validate exact OIDC Subject Alternative Name (SAN) claims, including SAN URI, issuer, and repository workflow identity, rejecting wildcard identities.
- Services MUST verify the In-Toto attestation predicate payload (e.g., SLSA Provenance v1.0) and confirm that the builder identity matches the authenticated OIDC workload identity.
- Verification routines MUST assert that the signature timestamp falls precisely within the validity window of the short-lived Fulcio certificate before admission acceptance.

## Bad vs Good Implementations
### Enforcing Cryptographic Sigstore Bundle and Ephemeral OIDC Claims in Admission Logic

#### Bad Antipattern (AI Common Hallucination)
> **Why it fails**: The handler validates an image without resolving its immutable SHA256 digest, blindly accepts the presence of a signature bundle without verifying the Rekor inclusion proof or Signed Entry Timestamp (SET), and uses a dangerously permissive substring check (`includes('github.com')`) on the certificate SAN, allowing arbitrary attacker-controlled GitHub runners to satisfy admission criteria.
```typescript
import { Request, Response } from 'express';

interface AdmissionRequestBody {
  image: string;
  signatureBundle?: any;
}

// INSECURE: Bypasses Rekor transparency log proof and accepts wildcards/unverified OIDC identities
export async function handleAdmissionReview(req: Request, res: Response) {
  const { image, signatureBundle } = req.body as AdmissionRequestBody;

  // Flaw 1: Accepts mutable tags without resolving to immutable digest
  if (!image.startsWith('registry.internal.net/')) {
    return res.status(403).json({ allowed: false, message: 'Invalid registry' });
  }

  // Flaw 2: Trusts presence of a bundle without Rekor SET verification or Fulcio cert validation
  if (signatureBundle && signatureBundle.signedEntryTimestamp) {
    // Flaw 3: Insecure identity check with permissive matching
    const certSubject = signatureBundle.certificate?.subjectAltName || '';
    if (certSubject.includes('github.com')) {
      return res.status(200).json({ allowed: true });
    }
  }

  return res.status(403).json({ allowed: false, message: 'Signature missing' });
}
```

#### Production Standard (Correct)
> **Standard**: The invariant-compliant handler enforces immutable SHA256 image references, cryptographically verifies the Sigstore bundle against Rekor and Fulcio roots, enforces exact non-wildcard OIDC SAN and Issuer matching, and strictly confirms Rekor log inclusion before granting admission.
```typescript
import { Request, Response } from 'express';
import { verify, Bundle, VerifierOptions } from '@sigstore/verify';

interface ValidatedAdmissionPayload {
  imageDigest: string;
  bundle: Bundle;
}

const TRUSTED_OIDC_ISSUER = 'https://token.actions.githubusercontent.com';
const TRUSTED_SAN_URI = 'https://github.com/enterprise-org/secure-service/.github/workflows/build.yml@refs/heads/main';
const EXPECTED_DIGEST_REGEX = /^registry\.internal\.net\/[a-z0-9_-]+@sha256:[a-f0-9]{64}$/;

export async function handleAdmissionReview(req: Request, res: Response): Promise<Response> {
  const { imageDigest, bundle } = req.body as ValidatedAdmissionPayload;

  if (!imageDigest || !EXPECTED_DIGEST_REGEX.test(imageDigest)) {
    return res.status(400).json({ allowed: false, message: 'Image must be pinned to an immutable SHA256 digest' });
  }

  const verifierOptions: VerifierOptions = {
    rekorLogPublicKeys: [process.env.REKOR_PUBLIC_KEY!],
    fulcioCertificateChain: [process.env.FULCIO_ROOT_CA!],
    ctLogPublicKeys: [process.env.CTLOG_PUBLIC_KEY!],
    keyless: {
      identities: [
        {
          issuer: TRUSTED_OIDC_ISSUER,
          san: { type: 'URI', value: TRUSTED_SAN_URI }
        }
      ]
    }
  };

  try {
    const artifactDigestBytes = Buffer.from(imageDigest.split('@sha256:')[1], 'hex');
    const verificationResult = await verify(bundle, artifactDigestBytes, verifierOptions);

    const rekorEntry = verificationResult.tlogEntries?.[0];
    if (!rekorEntry || !rekorEntry.integratedTime) {
      return res.status(403).json({ allowed: false, message: 'Rekor inclusion proof verification missing or invalid' });
    }

    return res.status(200).json({ allowed: true, digest: imageDigest });
  } catch (error) {
    return res.status(403).json({
      allowed: false,
      message: `Sigstore attestation verification failed: ${(error as Error).message}`
    });
  }
}
```

Architectural Specification & Invariant Rationale

Architectural Invariant Design: Sigstore Rekor In-Toto Attestation & Ephemeral OIDC Verification Standard

Sigstore Rekor In-Toto Attestation & Ephemeral OIDC Verification Standard defines an industrial-grade behavioral standard for security engineering. Mandates strict cryptographic provenance verification of keyless Sigstore signatures, Rekor transparency log inclusion proofs, and In-Toto attestations before container image admission. Validates short-lived Fulcio X.509 certificates against sub-second ephemeral OIDC claims to prevent supply-chain spoofing, compromised long-lived credentials, and admission of unverified container digests. 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: Trusting unverified image digests, ignoring Rekor inclusion proofs, or bypassing ephemeral OIDC SAN identity matching in admission controllers. 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 DriftTrusting unverified image digests, ignoring Rekor inclusion proofs, or bypassing ephemeral OIDC SAN identity matching in admission controllers.Critical
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

Admission webhooks MUST ALWAYS resolve mutable tags to immutable SHA256 digests before signature evaluation.

Admission webhooks MUST ALWAYS resolve mutable tags to immutable SHA256 digests before signature evaluation.

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 ALWAYS verify cryptographic inclusion proofs against the immutable Rekor transparency log Merkle tree root.

Engineers MUST ALWAYS verify cryptographic inclusion proofs against the immutable Rekor transparency log Merkle tree root.

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

Engineers MUST NEVER trust static, long-lived PGP/RSA keys

Engineers MUST NEVER trust static, long-lived PGP/RSA keys; signatures MUST use Fulcio ephemeral certificates tied to cryptographic OIDC identity tokens.

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

Admission controllers MUST validate exact OIDC Subject Alternative Name (SAN) claims, including SAN URI, issuer, and repository workflow identity, rejecting wildcard identities.

Admission controllers MUST validate exact OIDC Subject Alternative Name (SAN) claims, including SAN URI, issuer, and repository workflow identity, rejecting wildcard identities.

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

Services MUST verify the In-Toto attestation predicate payload (e.g., SLSA Provenance v1.0) and confirm that the builder identity matches the authenticated OIDC workload identity.

Services MUST verify the In-Toto attestation predicate payload (e.g., SLSA Provenance v1.0) and confirm that the builder identity matches the authenticated OIDC workload identity.

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.
6

Verification routines MUST assert that the signature timestamp falls precisely within the validity window of the short-lived Fulcio certificate before admission acceptance.

Verification routines MUST assert that the signature timestamp falls precisely within the validity window of the short-lived Fulcio certificate before admission acceptance.

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 Rekor In-Toto Attestation & Ephemeral OIDC Verification Standard critical for AI coding assistants?

Mandates strict cryptographic provenance verification of keyless Sigstore signatures, Rekor transparency log inclusion proofs, and In-Toto attestations before container image admission. Validates short-lived Fulcio X.509 certificates against sub-second ephemeral OIDC claims to prevent supply-chain spoofing, compromised long-lived credentials, and admission of unverified container digests. 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 (Trusting unverified image digests, ignoring Rekor inclusion proofs, or bypassing ephemeral OIDC SAN identity matching in admission controllers.) 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