This specification is maintained by the AgentRules Working Group. Have enhancements or want to claim maintainership?Submit Specification →
securitycritical PriorityID: slsa-v1-1-ephemeral-oidc-sigstore-attestation

SLSA v1.1 Ephemeral OIDC Sigstore Attestation & Hermetic Provenance Guardrail

Mandates SLSA v1.1 Build L3 compliance via keyless cryptographic signing using ephemeral OIDC tokens through Sigstore Fulcio and Rekor. Prohibits static long-lived signing credentials, unverified build runners, and non-hermetic provenance generation across all CI/CD pipelines.

Prohibited Anti-Pattern: Static Secret Signing & Non-Hermetic In-Runner Artifact Attestation

Export Ready-to-Drop Configuration

Select format below to copy code or download file directly.

---
description: SLSA v1.1 Ephemeral OIDC Sigstore Attestation & Hermetic Provenance Guardrail - Mandates SLSA v1.1 Build L3 compliance via keyless cryptographic signing using ephemeral OIDC tokens through Sigstore Fulcio and Rekor. Prohibits static long-lived signing credentials, unverified build runners, and non-hermetic provenance generation across all CI/CD pipelines.
globs: .github/workflows/**/*.{yml,yaml}, .gitlab-ci.yml, cloudbuild.yaml, build/package/**/*.sh, scripts/release/**/*.ts
alwaysApply: true
verified_by: "agentrules.org"
license: "CC-BY-4.0"
source: "https://agentrules.org/rules/slsa-v1-1-ephemeral-oidc-sigstore-attestation"
---

# SLSA v1.1 Ephemeral OIDC Sigstore Attestation & Hermetic Provenance Guardrail

> **Severity**: CRITICAL | **Category**: security
> **Anti-Pattern Warning**: Static Secret Signing & Non-Hermetic In-Runner Artifact Attestation

## System Constraints
You are a Principal Security Architect enforcing SLSA v1.1 Ephemeral OIDC Sigstore Attestation & Build Provenance Invariants. You must ensure that all CI/CD release workflows eliminate long-lived private keys, mandate short-lived ambient OIDC workload identity federation to Fulcio, log all transparency events in Rekor, and record tamper-proof predicate schemas using trusted, isolated build runners.

## Strict Guidelines
- Pipelines MUST ALWAYS obtain short-lived cryptographic identity certificates via OIDC federation (Sigstore Fulcio) with ambient workload identity rather than referencing long-lived private keys.
- Workflows MUST generate SLSA v1.1 compliant build provenance predicates (https://slsa.dev/provenance/v1) capturing cryptographic digest hashes of all resolved source materials and dependencies.
- Build and sign steps MUST execute within isolated, hardened, hermetic environments where the builder identity is decoupled from artifact mutation access.
- Engineers MUST NOT store private GPG, PGP, or cosign keys inside CI/CD secrets (e.g., GITHUB_TOKEN or environment secrets).
- Attestations MUST record transparency log entries in Rekor and verify log inclusion proofs prior to pushing signed artifacts to registries.

## Bad vs Good Implementations
### Supply Chain Attestation: Static Cosign Keys vs Ephemeral Keyless OIDC Provenance

#### Bad Antipattern (AI Common Hallucination)
> **Why it fails**: Uses a long-lived private key stored in CI secrets, exposes sensitive keys on disk, lacks SLSA v1.1 provenance predicates, and has no transparency log (Rekor) verification or short-lived hardware-bound identity.
```yaml
# .github/workflows/release.yml
name: Release Artifacts
on: push

jobs:
  build-and-sign:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v4
      - name: Build binary
        run: make build
      - name: Sign artifact using static private key
        env:
          COSIGN_PASSWORD: ${{ secrets.COSIGN_PASSWORD }}
          COSIGN_KEY: ${{ secrets.COSIGN_KEY }}
        run: |
          echo "$COSIGN_KEY" > cosign.key
          cosign sign-blob --key cosign.key --output-signature bin.sig bin/release.tar.gz
```

#### Production Standard (Correct)
> **Standard**: Adheres to SLSA v1.1 Build L3 by segregating build from provenance generation, requesting ephemeral OIDC tokens through id-token: write, and generating non-falsifiable attestation via the trusted slsa-github-generator.
```yaml
# .github/workflows/release.yml
name: Release Artifacts (SLSA v1.1)
on:
  push:
    tags: ['v*.*.*']

permissions:
  id-token: write
  contents: read
  packages: write

jobs:
  build:
    runs-on: ubuntu-latest
    outputs:
      hash: ${{ steps.hash.outputs.sha256 }}
    steps:
      - uses: actions/checkout@v4
      - name: Build artifact
        run: make build
      - id: hash
        run: echo "sha256=$(sha256sum bin/release.tar.gz | awk '{print $1}')" >> "$GITHUB_OUTPUT"

  provenance:
    needs: [build]
    permissions:
      id-token: write
      contents: read
      actions: read
    uses: slsa-framework/slsa-github-generator/.github/workflows/[email protected]
    with:
      base64-subjects: "${{ needs.build.outputs.hash }}  bin/release.tar.gz"
      provenance-name: "release.tar.gz.intoto.jsonl"
```

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: SLSA v1.1 Ephemeral OIDC Sigstore Attestation & Hermetic Provenance Guardrail

SLSA v1.1 Ephemeral OIDC Sigstore Attestation & Hermetic Provenance Guardrail defines an industrial-grade behavioral standard for security engineering. Mandates SLSA v1.1 Build L3 compliance via keyless cryptographic signing using ephemeral OIDC tokens through Sigstore Fulcio and Rekor. Prohibits static long-lived signing credentials, unverified build runners, and non-hermetic provenance generation across all CI/CD pipelines. 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: Static Secret Signing & Non-Hermetic In-Runner Artifact Attestation 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 DriftStatic Secret Signing & Non-Hermetic In-Runner Artifact AttestationCritical
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

Pipelines MUST ALWAYS obtain short-lived cryptographic identity certificates via OIDC federation (Sigstore Fulcio) with ambient workload identity rather than referencing long-lived private keys.

Pipelines MUST ALWAYS obtain short-lived cryptographic identity certificates via OIDC federation (Sigstore Fulcio) with ambient workload identity rather than referencing long-lived private keys.

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

Workflows MUST generate SLSA v1.1 compliant build provenance predicates (https

Workflows MUST generate SLSA v1.1 compliant build provenance predicates (https://slsa.dev/provenance/v1) capturing cryptographic digest hashes of all resolved source materials and dependencies.

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

Build and sign steps MUST execute within isolated, hardened, hermetic environments where the builder identity is decoupled from artifact mutation access.

Build and sign steps MUST execute within isolated, hardened, hermetic environments where the builder identity is decoupled from artifact mutation access.

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

Engineers MUST NOT store private GPG, PGP, or cosign keys inside CI/CD secrets (e.g., GITHUB_TOKEN or environment secrets).

Engineers MUST NOT store private GPG, PGP, or cosign keys inside CI/CD secrets (e.g., GITHUB_TOKEN or environment secrets).

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

Attestations MUST record transparency log entries in Rekor and verify log inclusion proofs prior to pushing signed artifacts to registries.

Attestations MUST record transparency log entries in Rekor and verify log inclusion proofs prior to pushing signed artifacts to registries.

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 SLSA v1.1 Ephemeral OIDC Sigstore Attestation & Hermetic Provenance Guardrail critical for AI coding assistants?

Mandates SLSA v1.1 Build L3 compliance via keyless cryptographic signing using ephemeral OIDC tokens through Sigstore Fulcio and Rekor. Prohibits static long-lived signing credentials, unverified build runners, and non-hermetic provenance generation across all CI/CD pipelines. 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 (Static Secret Signing & Non-Hermetic In-Runner Artifact Attestation) 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

SLSA