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

Sigstore Ephemeral OIDC Attestation and Keyless SLSA Provenance Verification

Enforces SLSA Level 3+ build provenance integrity by mandating keyless, short-lived OIDC attestation verification via Sigstore Fulcio and Rekor. Validates cryptographic identity bindings, immutable certificate Subject Alternative Name (SAN) claims, and transparency log inclusion proofs without relying on long-lived signing keys.

Prohibited Anti-Pattern: Accepting unverified OIDC tokens, bypassing Rekor log inclusion checks, or relying on ambient static private keys for build provenance.

Export Ready-to-Drop Configuration

Select format below to copy code or download file directly.

---
description: Sigstore Ephemeral OIDC Attestation and Keyless SLSA Provenance Verification - Enforces SLSA Level 3+ build provenance integrity by mandating keyless, short-lived OIDC attestation verification via Sigstore Fulcio and Rekor. Validates cryptographic identity bindings, immutable certificate Subject Alternative Name (SAN) claims, and transparency log inclusion proofs without relying on long-lived signing keys.
globs: scripts/**/*.{ts,js,mjs}, src/security/**/*.{ts,js}, .github/workflows/**/*.{yml,yaml}, infra/**/*.ts
alwaysApply: true
verified_by: "agentrules.org"
license: "CC-BY-4.0"
source: "https://agentrules.org/rules/sigstore-oidc-keyless-provenance-guardrail"
---

# Sigstore Ephemeral OIDC Attestation and Keyless SLSA Provenance Verification

> **Severity**: CRITICAL | **Category**: security
> **Anti-Pattern Warning**: Accepting unverified OIDC tokens, bypassing Rekor log inclusion checks, or relying on ambient static private keys for build provenance.

## System Constraints
You are a Principal Security Architect enforcing the Sigstore Ephemeral OIDC Attestation Keyless Provenance Invariant. You must guarantee immutable SLSA Level 3+ provenance verification by strictly validating short-lived X.509 certificates issued by Fulcio, ensuring Rekor transparency log inclusion proofs, and matching exact OIDC Subject Alternative Name (SAN) extensions against trusted workload identities.

## Strict Guidelines
- Engineers MUST ALWAYS verify the complete Sigstore cryptographic bundle, including the Fulcio leaf certificate, root CA chain, and Rekor transparency log inclusion proof (SET/integratedTime).
- Engineers MUST ALWAYS validate specific OIDC token claims in the Fulcio certificate SAN extensions (such as Issuer, Subject, and Job Workflow Ref) against an explicit allowlist rather than blindly trusting valid signatures.
- Engineers MUST NOT utilize static or long-lived asymmetric private keys (PGP, RSA, standalone ECDSA) for artifact release signing or SLSA provenance attestations.
- Services MUST verify artifact digests directly against in-toto attestation subject hashes to prevent payload substitution attacks.
- Verification routines MUST fetch trusted root metadata exclusively through TUF (The Update Framework) to prevent root-of-trust compromise and certificate pinning staleness.

## Bad vs Good Implementations
### Keyless Provenance Attestation Verification

#### Bad Antipattern (AI Common Hallucination)
> **Why it fails**: Relies on ambient, static public key infrastructure with no provenance attestations, missing OIDC claims validation, missing Fulcio certificate validity windows, and no Rekor transparency log verification.
```typescript
import * as crypto from 'crypto';

interface ArtifactBundle {
  artifactData: Buffer;
  signature: string;
  publicKeyPem: string;
}

// Anti-pattern: Relies on long-lived static public keys without transparency log verification
// or OIDC identity claims, susceptible to key compromise and unauthorized rebuilds.
export async function verifyArtifactProvenance(bundle: ArtifactBundle): Promise<boolean> {
  const verifier = crypto.createVerify('SHA256');
  verifier.update(bundle.artifactData);
  verifier.end();
  
  return verifier.verify(bundle.publicKeyPem, Buffer.from(bundle.signature, 'base64'));
}
```

#### Production Standard (Correct)
> **Standard**: Validates the cryptographic bundle through Sigstore's root of trust, confirms Rekor transparency log proof, and inspects non-forgeable Fulcio X.509 OIDC SAN extension claims against expected workflow identities.
```typescript
import { verify, SerializedBundle } from '@sigstore/verify';
import * as crypto from 'crypto';

interface KeylessVerificationOptions {
  expectedIssuer: string;
  expectedSanIdentity: string;
  trustedWorkflowRef: string;
}

export async function verifyArtifactProvenance(
  artifactBytes: Buffer,
  bundle: SerializedBundle,
  options: KeylessVerificationOptions
): Promise<void> {
  const artifactDigest = crypto.createHash('sha256').update(artifactBytes).digest('hex');

  // Cryptographically verifies Fulcio CA chain, Rekor log proof, and validity window via TUF
  const verificationResult = await verify(bundle, artifactBytes, {
    tlogOptions: { threshold: 1 },
    ctlogOptions: { threshold: 1 },
  });

  // Enforce invariant: SAN extension must match the isolated enclave runner identity
  const leafCert = verificationResult.signingCertificate;
  const issuerExtension = leafCert.extensions.find(
    (ext) => ext.oid === '1.3.6.1.4.1.57264.1.1' // Sigstore OIDC Issuer OID
  );
  const workflowRefExtension = leafCert.extensions.find(
    (ext) => ext.oid === '1.3.6.1.4.1.57264.1.20' // GitHub Actions Workflow Ref OID
  );

  if (issuerExtension?.value !== options.expectedIssuer) {
    throw new Error(`OIDC Issuer mismatch: expected ${options.expectedIssuer}, got ${issuerExtension?.value}`);
  }

  if (workflowRefExtension?.value !== options.trustedWorkflowRef) {
    throw new Error(`Untrusted workflow ref: ${workflowRefExtension?.value}`);
  }
}
```

Recommended MCP Servers (mcp-serverlist.com)

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

Recommended Agent Skills (askills.dev)

Ready-to-use executable skill functions tailored to this stack.

Architectural Specification & Invariant Rationale

Architectural Invariant Design: Sigstore Ephemeral OIDC Attestation and Keyless SLSA Provenance Verification

Sigstore Ephemeral OIDC Attestation and Keyless SLSA Provenance Verification defines an industrial-grade behavioral standard for security engineering. Enforces SLSA Level 3+ build provenance integrity by mandating keyless, short-lived OIDC attestation verification via Sigstore Fulcio and Rekor. Validates cryptographic identity bindings, immutable certificate Subject Alternative Name (SAN) claims, and transparency log inclusion proofs without relying on long-lived signing keys. 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: Accepting unverified OIDC tokens, bypassing Rekor log inclusion checks, or relying on ambient static private keys for build provenance. 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 DriftAccepting unverified OIDC tokens, bypassing Rekor log inclusion checks, or relying on ambient static private keys for build provenance.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

Engineers MUST ALWAYS verify the complete Sigstore cryptographic bundle, including the Fulcio leaf certificate, root CA chain, and Rekor transparency log inclusion proof (SET/integratedTime).

Engineers MUST ALWAYS verify the complete Sigstore cryptographic bundle, including the Fulcio leaf certificate, root CA chain, and Rekor transparency log inclusion proof (SET/integratedTime).

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 validate specific OIDC token claims in the Fulcio certificate SAN extensions (such as Issuer, Subject, and Job Workflow Ref) against an explicit allowlist rather than blindly trusting valid signatures.

Engineers MUST ALWAYS validate specific OIDC token claims in the Fulcio certificate SAN extensions (such as Issuer, Subject, and Job Workflow Ref) against an explicit allowlist rather than blindly trusting valid signatures.

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 NOT utilize static or long-lived asymmetric private keys (PGP, RSA, standalone ECDSA) for artifact release signing or SLSA provenance attestations.

Engineers MUST NOT utilize static or long-lived asymmetric private keys (PGP, RSA, standalone ECDSA) for artifact release signing or SLSA provenance attestations.

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

Services MUST verify artifact digests directly against in-toto attestation subject hashes to prevent payload substitution attacks.

Services MUST verify artifact digests directly against in-toto attestation subject hashes to prevent payload substitution 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

Verification routines MUST fetch trusted root metadata exclusively through TUF (The Update Framework) to prevent root-of-trust compromise and certificate pinning staleness.

Verification routines MUST fetch trusted root metadata exclusively through TUF (The Update Framework) to prevent root-of-trust compromise and certificate pinning staleness.

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 Ephemeral OIDC Attestation and Keyless SLSA Provenance Verification critical for AI coding assistants?

Enforces SLSA Level 3+ build provenance integrity by mandating keyless, short-lived OIDC attestation verification via Sigstore Fulcio and Rekor. Validates cryptographic identity bindings, immutable certificate Subject Alternative Name (SAN) claims, and transparency log inclusion proofs without relying on long-lived signing keys. 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 (Accepting unverified OIDC tokens, bypassing Rekor log inclusion checks, or relying on ambient static private keys for build provenance.) 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