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

Sigstore Keyless OIDC Attestation & SLSA v1.0 Provenance Verification

Enforces cryptographically verifiable, keyless container signing and SLSA v1.0 provenance attestation across CI/CD and deployment admission gates. Prevents software supply-chain poisoning by requiring ephemeral Fulcio certificates bound to OIDC workload identities, Rekor transparency log inclusion proofs, and immutable image digest pinning.

Prohibited Anti-Pattern: Signing artifacts with long-lived static private keys or deploying images without cryptographic SLSA v1.0 provenance and Rekor verification

Export Ready-to-Drop Configuration

Select format below to copy code or download file directly.

---
description: Sigstore Keyless OIDC Attestation & SLSA v1.0 Provenance Verification - Enforces cryptographically verifiable, keyless container signing and SLSA v1.0 provenance attestation across CI/CD and deployment admission gates. Prevents software supply-chain poisoning by requiring ephemeral Fulcio certificates bound to OIDC workload identities, Rekor transparency log inclusion proofs, and immutable image digest pinning.
globs: .github/workflows/**/*.{yml,yaml}, src/security/**/*.{ts,js}, scripts/**/*.{ts,sh}, infra/k8s/**/*.{yml,yaml}
alwaysApply: true
verified_by: "agentrules.org"
license: "CC-BY-4.0"
source: "https://agentrules.org/rules/sigstore-keyless-slsa-provenance-production-standard"
---

# Sigstore Keyless OIDC Attestation & SLSA v1.0 Provenance Verification

> **Severity**: CRITICAL | **Category**: security
> **Anti-Pattern Warning**: Signing artifacts with long-lived static private keys or deploying images without cryptographic SLSA v1.0 provenance and Rekor verification

## System Constraints
You are a Principal Software Architect and Security Engineer enforcing Sigstore keyless attestation and SLSA v1.0 provenance standards. Ensure all containerized release pipelines eliminate long-lived private keys, authenticate strictly through OIDC workload tokens (Fulcio), publish cryptographic inclusion proofs to transparency logs (Rekor), and generate in-toto SLSA v1.0 predicates. Mandate that consumer admission controllers reject images not pinned by immutable SHA-256 digests or missing identity-verified attestations.

## Strict Guidelines
- Engineers MUST NEVER store static private keys (e.g., GPG, RSA, ECDSA PEMs) in CI secrets or repository environments for image signing.
- Pipelines MUST use keyless signing via ephemeral Fulcio certificates backed by ambient OIDC identity providers with the audience set strictly to 'sigstore'.
- Attestations MUST comply with the SLSA Provenance v1.0 predicate specification ('https://slsa.dev/provenance/v1.0') containing externalParameters, resolvedDependencies, and invocation environment details.
- Every signature and attestation MUST be logged into the Rekor transparency log, and deployment gates MUST verify the inclusion proof (Signed Entry Timestamp / SET).
- Admission verification code MUST validate the Subject Alternative Name (SAN) regex and Issuer URL on the ephemeral X.509 certificate to guarantee origin repository and workflow identity.
- Workflows and deployments MUST address container images exclusively by immutable content digest ('image@sha256:...') and NEVER by mutable tags alone.
- CI workflows MUST run provenance generation in dedicated, isolated build runners with minimal permissions ('id-token: write', 'contents: read', 'packages: write').

## Bad vs Good Implementations
### Admission Gate Image Attestation Verification

#### Bad Antipattern (AI Common Hallucination)
> **Why it fails**: Uses a static, long-lived public key via environment variables, admits mutable image tags that are vulnerable to tag-spoofing attacks, and omits checks for Fulcio certificate Subject Alternative Name (SAN) attributes and Rekor transparency log inclusion.
```typescript
import { execSync } from 'child_process';

interface ImageVerificationRequest {
  image: string;
}

export function verifyContainerImage(req: ImageVerificationRequest): boolean {
  // Anti-pattern: Relies on mutable tags, ignores Rekor inclusion proofs,
  // and fails to validate Fulcio certificate SAN identity or SLSA predicate.
  try {
    execSync(`cosign verify --key env://COSIGN_PUBLIC_KEY ${req.image}`);
    return true;
  } catch (error) {
    console.error('Image verification failed:', error);
    return false;
  }
}
```

#### Production Standard (Correct)
> **Standard**: Validates immutable digest pinning, cryptographically checks the ephemeral Fulcio X.509 certificate against trusted root and OIDC SAN identity, verifies Rekor transparency inclusion, and enforces SLSA v1.0 provenance.
```typescript
import { verify, PolicyOption } from '@sigstore/verify';

interface VerificationConfig {
  imageDigest: string;
  expectedIssuer: string;
  expectedSanRegex: RegExp;
  bundle: Record<string, unknown>;
  artifactBytes: Buffer;
}

export async function verifyContainerAttestation(config: VerificationConfig): Promise<void> {
  // Invariant 1: Ensure image is addressed strictly by immutable SHA-256 digest
  if (!/^.*@sha256:[a-f0-9]{64}$/.test(config.imageDigest)) {
    throw new Error(`Deployment rejected: Image must be addressed by immutable digest: ${config.imageDigest}`);
  }

  // Invariant 2: Cryptographically verify Fulcio certificate identity and Rekor transparency
  const policy: PolicyOption = {
    certificateIssuer: config.expectedIssuer,
    certificateIdentityURIRegex: config.expectedSanRegex,
    tlogEntriesCount: 1, // Enforce Rekor transparency log entry proof
  };

  // Invariant 3: Verify cryptographic bundle against Sigstore trusted root
  await verify(config.bundle as any, config.artifactBytes, policy);

  // Invariant 4: Assert SLSA v1.0 predicate type
  const statement = JSON.parse(config.artifactBytes.toString('utf8'));
  if (statement.predicateType !== 'https://slsa.dev/provenance/v1.0') {
    throw new Error(`Unsupported predicate type: ${statement.predicateType}. SLSA v1.0 required.`);
  }
}
```

Recommended Agent Skills (askills.dev)

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

Architectural Specification & Invariant Rationale

Architectural Invariant Design: Sigstore Keyless OIDC Attestation & SLSA v1.0 Provenance Verification

Sigstore Keyless OIDC Attestation & SLSA v1.0 Provenance Verification defines an industrial-grade behavioral standard for security engineering. Enforces cryptographically verifiable, keyless container signing and SLSA v1.0 provenance attestation across CI/CD and deployment admission gates. Prevents software supply-chain poisoning by requiring ephemeral Fulcio certificates bound to OIDC workload identities, Rekor transparency log inclusion proofs, and immutable image digest pinning. 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: Signing artifacts with long-lived static private keys or deploying images without cryptographic SLSA v1.0 provenance and Rekor 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 DriftSigning artifacts with long-lived static private keys or deploying images without cryptographic SLSA v1.0 provenance and Rekor 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 NEVER store static private keys (e.g., GPG, RSA, ECDSA PEMs) in CI secrets or repository environments for image signing.

Engineers MUST NEVER store static private keys (e.g., GPG, RSA, ECDSA PEMs) in CI secrets or repository environments for image signing.

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

Pipelines MUST use keyless signing via ephemeral Fulcio certificates backed by ambient OIDC identity providers with the audience set strictly to 'sigstore'.

Pipelines MUST use keyless signing via ephemeral Fulcio certificates backed by ambient OIDC identity providers with the audience set strictly to 'sigstore'.

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

Attestations MUST comply with the SLSA Provenance v1.0 predicate specification ('https

Attestations MUST comply with the SLSA Provenance v1.0 predicate specification ('https://slsa.dev/provenance/v1.0') containing externalParameters, resolvedDependencies, and invocation environment details.

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

Every signature and attestation MUST be logged into the Rekor transparency log, and deployment gates MUST verify the inclusion proof (Signed Entry Timestamp / SET).

Every signature and attestation MUST be logged into the Rekor transparency log, and deployment gates MUST verify the inclusion proof (Signed Entry Timestamp / SET).

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

Admission verification code MUST validate the Subject Alternative Name (SAN) regex and Issuer URL on the ephemeral X.509 certificate to guarantee origin repository and workflow identity.

Admission verification code MUST validate the Subject Alternative Name (SAN) regex and Issuer URL on the ephemeral X.509 certificate to guarantee origin repository and workflow 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

Workflows and deployments MUST address container images exclusively by immutable content digest ('image@sha256

Workflows and deployments MUST address container images exclusively by immutable content digest ('image@sha256:...') and NEVER by mutable tags alone.

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

CI workflows MUST run provenance generation in dedicated, isolated build runners with minimal permissions ('id-token

CI workflows MUST run provenance generation in dedicated, isolated build runners with minimal permissions ('id-token: write', 'contents: read', 'packages: write').

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 OIDC Attestation & SLSA v1.0 Provenance Verification critical for AI coding assistants?

Enforces cryptographically verifiable, keyless container signing and SLSA v1.0 provenance attestation across CI/CD and deployment admission gates. Prevents software supply-chain poisoning by requiring ephemeral Fulcio certificates bound to OIDC workload identities, Rekor transparency log inclusion proofs, and immutable image digest pinning. 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 (Signing artifacts with long-lived static private keys or deploying images without cryptographic SLSA v1.0 provenance and Rekor 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