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

Sigstore Keyless Ephemeral Provenance Verification Invariant

Enforces non-repudiable SLSA Level 3 build provenance attestation across container artifacts using ambient OIDC workload identity tokens instead of static credentials. Prohibits static cryptographic keys in CI/CD signing pipelines and enforces strict verification of Fulcio ephemeral X.509 certificates, Rekor transparency log inclusion proofs, and OIDC issuer/subject identity claims at admission and deployment boundaries.

Prohibited Anti-Pattern: Bypassing Keyless Identity Attestation via Static Private Keys or Missing Rekor Proof Verification

Export Ready-to-Drop Configuration

Select format below to copy code or download file directly.

---
description: Sigstore Keyless Ephemeral Provenance Verification Invariant - Enforces non-repudiable SLSA Level 3 build provenance attestation across container artifacts using ambient OIDC workload identity tokens instead of static credentials. Prohibits static cryptographic keys in CI/CD signing pipelines and enforces strict verification of Fulcio ephemeral X.509 certificates, Rekor transparency log inclusion proofs, and OIDC issuer/subject identity claims at admission and deployment boundaries.
globs: .github/workflows/**/*.{yml,yaml}, deploy/**/*.{yaml,yml}, infra/**/*.{ts,tf,json}, scripts/**/*.{sh,ts,py}, src/security/**/*.{ts,go,py}
alwaysApply: true
verified_by: "agentrules.org"
license: "CC-BY-4.0"
source: "https://agentrules.org/rules/sigstore-keyless-ephemeral-provenance-verification"
---

# Sigstore Keyless Ephemeral Provenance Verification Invariant

> **Severity**: CRITICAL | **Category**: security
> **Anti-Pattern Warning**: Bypassing Keyless Identity Attestation via Static Private Keys or Missing Rekor Proof Verification

## System Constraints
You are a Principal Security Architect enforcing the Sigstore Keyless Ephemeral Provenance Verification Invariant. Mandate cryptographic non-repudiation and SLSA Level 3 build provenance. Never generate code or workflows relying on static private keys (e.g., COSIGN_KEY, PGP, RSA pem files) for artifact signing. Always enforce keyless signing using ambient OIDC identity tokens issued to short-lived Fulcio X.509 certificates and logged to the Rekor transparency log. Ensure all verification paths explicitly validate the certificate Subject Alternative Name (SAN), the OIDC Issuer URL, and Rekor inclusion proofs before trusting any artifact payload or predicate.

## Strict Guidelines
- Engineers MUST ALWAYS sign artifacts using ambient OIDC identity tokens (keyless mode) with Fulcio-issued ephemeral certificates and Rekor transparency log integration.
- Engineers MUST NOT configure, generate, or accept static, long-lived asymmetric private keys (COSIGN_PRIVATE_KEY or secrets) in artifact signing pipelines.
- Verification routines MUST explicitly evaluate both `certificateIdentity` (or SAN regex) and `certificateIssuer` to guarantee the artifact was produced exclusively by the intended source repository and workflow.
- Verification routines MUST enforce Rekor transparency log inclusion proofs with valid signed log timestamps (SET/Signed Entry Timestamps) to prevent certificate backdating attacks.
- Deployment admission controllers and security clients MUST validate the SLSA Level 3 provenance predicate (`https://slsa.dev/provenance/v0.2` or `v1.0`), ensuring builder identity, source repository immutability, and commit SHA integrity before permitting workload scheduling.

## Bad vs Good Implementations
### Artifact Provenance Verification in Node.js / TypeScript

#### Bad Antipattern (AI Common Hallucination)
> **Why it fails**: The code omits mandatory certificate identity and issuer assertions, allowing any actor with a public identity on Fulcio to produce validly signed artifacts. It also disables transparency log verification (`ignoreTlog: true`), violating SLSA Level 3 requirements for cryptographic transparency and auditability.
```typescript
import { verify } from '@sigstore/verify';
import * as fs from 'fs';

interface VerifyParams {
  artifactDigest: string;
  bundlePath: string;
}

// ANTI-PATTERN: Verifying bundles without asserting Subject Alternative Name (SAN),
// OIDC Issuer, or verifying SLSA predicate integrity. Static keys or permissive checks
// allow arbitrary identities to pass supply-chain validation.
export async function verifyArtifactProvenance({ artifactDigest, bundlePath }: VerifyParams): Promise<boolean> {
  const bundle = JSON.parse(fs.readFileSync(bundlePath, 'utf8'));

  // Flaw: Omitting certificateIdentity and certificateIssuer allows any valid Fulcio cert to pass
  try {
    const options = {
      // Broken: No identity constraint; any public OIDC user can forge provenance
      keyless: true,
      ignoreTlog: true // Broken: Bypassing Rekor transparency log verification
    };
    
    const result = await (verify as any)(bundle, artifactDigest, options);
    return !!result;
  } catch (err) {
    return false;
  }
}
```

#### Production Standard (Correct)
> **Standard**: The production implementation strictly enforces keyless identity checks via `certificateIssuer` and `certificateIdentityURI`, ensuring only the authorized GitHub Actions workflow on the designated branch produced the artifact. It actively validates Rekor transparency logs online, ensuring tamper-proof non-repudiation and conformance with SLSA Level 3.
```typescript
import { verify, SerializedBundle } from '@sigstore/verify';
import * as fs from 'fs';

interface StrictVerifyParams {
  artifactDigest: Buffer;
  bundlePath: string;
  expectedRepo: string;
  expectedWorkflow: string;
}

// PRODUCTION INVARIANT: Keyless ephemeral verification enforcing exact OIDC Issuer,
// SAN identity match, Rekor transparency log validation, and SLSA v1.0 attestation constraints.
export async function verifyArtifactProvenance({
  artifactDigest,
  bundlePath,
  expectedRepo,
  expectedWorkflow
}: StrictVerifyParams): Promise<boolean> {
  const rawBundle = fs.readFileSync(bundlePath, 'utf8');
  const bundle = JSON.parse(rawBundle) as SerializedBundle;

  const expectedIssuer = 'https://token.actions.githubusercontent.com';
  const expectedSanIdentity = `https://github.com/${expectedRepo}/${expectedWorkflow}@refs/heads/main`;

  try {
    // Validates ephemeral Fulcio cert SAN, Rekor inclusion proof, and root trust
    const verifiedResult = await verify(bundle, artifactDigest, {
      certificateIssuer: expectedIssuer,
      certificateIdentityURI: expectedSanIdentity,
      tlogOptions: {
        threshold: 1,
        performOnlineVerification: true
      }
    });

    // Verify attestation payload contains SLSA provenance
    if (bundle.mediaType === 'application/vnd.dev.sigstore.bundle.v0.3+json' || 'dsseEnvelope' in bundle) {
      const envelope = (bundle as any).dsseEnvelope;
      if (envelope && envelope.payloadType !== 'application/vnd.in-toto+json') {
        throw new Error(`Invalid DSSE payload type: ${envelope.payloadType}`);
      }
    }

    return verifiedResult !== undefined;
  } catch (error) {
    throw new Error(`SLSA provenance verification failed: ${error instanceof Error ? error.message : String(error)}`);
  }
}
```

Recommended MCP Servers (mcp-serverlist.com)

Equip agent with system tools to verify code for this stack.

Architectural Specification & Invariant Rationale

Architectural Invariant Design: Sigstore Keyless Ephemeral Provenance Verification Invariant

Sigstore Keyless Ephemeral Provenance Verification Invariant defines an industrial-grade behavioral standard for security engineering. Enforces non-repudiable SLSA Level 3 build provenance attestation across container artifacts using ambient OIDC workload identity tokens instead of static credentials. Prohibits static cryptographic keys in CI/CD signing pipelines and enforces strict verification of Fulcio ephemeral X.509 certificates, Rekor transparency log inclusion proofs, and OIDC issuer/subject identity claims at admission and deployment boundaries. 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: Bypassing Keyless Identity Attestation via Static Private Keys or Missing Rekor Proof Verification 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 DriftBypassing Keyless Identity Attestation via Static Private Keys or Missing Rekor Proof VerificationCritical
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 sign artifacts using ambient OIDC identity tokens (keyless mode) with Fulcio-issued ephemeral certificates and Rekor transparency log integration.

Engineers MUST ALWAYS sign artifacts using ambient OIDC identity tokens (keyless mode) with Fulcio-issued ephemeral certificates and Rekor transparency log integration.

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 configure, generate, or accept static, long-lived asymmetric private keys (COSIGN_PRIVATE_KEY or secrets) in artifact signing pipelines.

Engineers MUST NOT configure, generate, or accept static, long-lived asymmetric private keys (COSIGN_PRIVATE_KEY or secrets) in artifact signing pipelines.

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

Verification routines MUST explicitly evaluate both `certificateIdentity` (or SAN regex) and `certificateIssuer` to guarantee the artifact was produced exclusively by the intended source repository and workflow.

Verification routines MUST explicitly evaluate both `certificateIdentity` (or SAN regex) and `certificateIssuer` to guarantee the artifact was produced exclusively by the intended source repository and workflow.

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 routines MUST enforce Rekor transparency log inclusion proofs with valid signed log timestamps (SET/Signed Entry Timestamps) to prevent certificate backdating attacks.

Verification routines MUST enforce Rekor transparency log inclusion proofs with valid signed log timestamps (SET/Signed Entry Timestamps) to prevent certificate backdating 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.
5

Deployment admission controllers and security clients MUST validate the SLSA Level 3 provenance predicate (`https

Deployment admission controllers and security clients MUST validate the SLSA Level 3 provenance predicate (`https://slsa.dev/provenance/v0.2` or `v1.0`), ensuring builder identity, source repository immutability, and commit SHA integrity before permitting workload scheduling.

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 Keyless Ephemeral Provenance Verification Invariant critical for AI coding assistants?

Enforces non-repudiable SLSA Level 3 build provenance attestation across container artifacts using ambient OIDC workload identity tokens instead of static credentials. Prohibits static cryptographic keys in CI/CD signing pipelines and enforces strict verification of Fulcio ephemeral X.509 certificates, Rekor transparency log inclusion proofs, and OIDC issuer/subject identity claims at admission and deployment boundaries. 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 (Bypassing Keyless Identity Attestation via Static Private Keys or Missing Rekor Proof Verification) 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