implementing-sigstore-for-software-signing
Implements Sigstore-based software signing and verification using Cosign keyless signing, Rekor transparency log verification, and Fulcio certificate authority integration to establish cryptographic provenance for container images, binaries, and software artifacts, including OIDC-based identity binding and CI/CD pipeline integration. Use when setting up keyless container/artifact signing, verifying signatures against the Rekor transparency log, or deploying Sigstore in a supply-chain security workflow.
- License 许可
- Apache-2.0
- 最近更新
- 2026-08-25
- Stars
- ★ 0
- Forks
- 0
01 前言 Front Matter
- name
- implementing-sigstore-for-software-signing
- tags
- [ "sigstore", "cosign", "rekor", "fulcio", "software-signing", "supply-chain", "keyless-signing", "OIDC", "transparency-log" ]
- author
- mukul975
- domain
- cybersecurity
- license
- Apache-2.0
- version
- 1.0.0
- mitre_f3
- { "tactics": [ "resource-development", "initial-access", "stealth" ], "version": "1.1", "techniques": [ { "id": "T1195", "name": "Supply Chain Compromise", "source": "attack", "tactic": "initial-access" }, { "id": "T1608", "name": "Stage Capabilities", "source": "attack", "tactic": "resource-development" }, { "id": "T1608.006", "name": "Stage Capabilities: SEO Poisoning", "source": "attack", "tactic": "resource-development" }, { "id": "T1586", "name": "Compromise Accounts", "source": "attack", "tactic": "resource-development" }, { "id": "T1070", "name": "Indicator Removal", "source": "attack", "tactic": "stealth" } ] }
- nist_csf
- [ "GV.SC-01", "GV.SC-03", "GV.SC-06", "GV.SC-07" ]
- subdomain
- supply-chain-security
- description
- Implements Sigstore-based software signing and verification using Cosign keyless signing, Rekor transparency log verification, and Fulcio certificate authority integration to establish cryptographic provenance for container images, binaries, and software artifacts, including OIDC-based identity binding and CI/CD pipeline integration. Use when setting up keyless container/artifact signing, verifying signatures against the Rekor transparency log, or deploying Sigstore in a supply-chain security workflow.
- mitre_attack
- [ "T1078", "T1190", "T1059", "T1610", "T1611" ]
02 资源文件 3
- 许可证LICENSE11.0 KB
- 参考文档references/api-reference.md5.1 KB
- 脚本scripts/agent.py17.7 KB
03 SKILL.md 正文
Implementing Sigstore for Software Signing
When to Use
- Signing container images and software artifacts without managing long-lived cryptographic keys
- Establishing verifiable provenance for build outputs in CI/CD pipelines using OIDC identity binding
- Querying the Rekor transparency log to audit when and by whom an artifact was signed
- Verifying that container images pulled from registries were signed by authorized identities and issuers
- Integrating Sigstore verification into Kubernetes admission controllers to enforce signed-image policies
Do not use for signing artifacts that require air-gapped or offline signing workflows where OIDC authentication is unavailable, for environments that cannot reach the public Sigstore infrastructure (Fulcio, Rekor) and have no private instance deployed, or as a replacement for traditional PGP/GPG signing where regulatory compliance mandates specific key management procedures.
Prerequisites
- Cosign CLI v2.4+ installed (
go install github.com/sigstore/cosign/v2/cmd/cosign@latestor binary release) - Access to an OIDC identity provider supported by Fulcio (Google, GitHub, Microsoft, or a custom OIDC issuer)
- Container registry credentials (for signing container images) with push access to store signature objects
- Python 3.9+ with
sigstore,requests, andcryptographypackages for the automation agent - Network access to
fulcio.sigstore.dev,rekor.sigstore.dev, andtuf-repo-cdn.sigstore.dev(or private Sigstore instance URLs)
Workflow
Step 1: Install and Configure Cosign
Install Cosign and verify it can reach the Sigstore infrastructure:
- Install from binary release: Download the appropriate binary from the Cosign GitHub releases page and verify its checksum. On Linux:
curl -LO https://github.com/sigstore/cosign/releases/latest/download/cosign-linux-amd64 && chmod +x cosign-linux-amd64 && sudo mv cosign-linux-amd64 /usr/local/bin/cosign - Verify installation: Run
cosign versionto confirm the version and check connectivity to Sigstore services withcosign initializewhich fetches the TUF root of trust - Configure custom infrastructure (optional): If running a private Sigstore stack, set
--fulcio-url,--rekor-url, and--oidc-issuerflags or use environment variablesCOSIGN_REKOR_URLandCOSIGN_FULCIO_URL
Step 2: Keyless Signing with Cosign and Fulcio
Perform identity-based signing where Fulcio issues a short-lived certificate bound to your OIDC identity:
- Sign a container image: Run
cosign sign <IMAGE_DIGEST>which triggers an OIDC authentication flow. Cosign generates an ephemeral key pair, obtains a short-lived certificate from Fulcio binding the public key to the OIDC identity, signs the image digest, and records the signing event in Rekor. The private key is destroyed immediately after signing. - Sign a blob (file): Run
cosign sign-blob <file> --bundle artifact.sigstore.jsonto sign arbitrary files. The bundle contains the signature, certificate, timestamp, and Rekor inclusion proof. - Non-interactive signing in CI: Set
SIGSTORE_ID_TOKENenvironment variable with a valid OIDC token (e.g., from GitHub Actions OIDC or GCP workload identity) to skip the browser-based authentication flow:export SIGSTORE_ID_TOKEN=$(curl -sH "Authorization: bearer $ACTIONS_ID_TOKEN_REQUEST_TOKEN" \ "$ACTIONS_ID_TOKEN_REQUEST_URL&audience=sigstore" | jq -r '.value') cosign sign $IMAGE_DIGEST - Supported OIDC providers: Google (
https://accounts.google.com), GitHub (https://github.com/login/oauth), Microsoft (https://login.microsoftonline.com), GitLab (https://gitlab.com), and custom providers registered with a private Fulcio instance
Step 3: Verify Signed Artifacts
Verify that artifacts were signed by expected identities from expected OIDC issuers:
- Verify a container image: Run
cosign verify <IMAGE_URI> --certificate-identity=name@example.com --certificate-oidc-issuer=https://accounts.google.comto confirm the image was signed by the specified identity. Cosign validates the certificate chain, checks the Rekor inclusion proof, and verifies the signature matches the current image digest. - Verify a signed blob: Run
cosign verify-blob <file> --bundle artifact.sigstore.json --certificate-identity=name@example.com --certificate-oidc-issuer=https://accounts.google.com - Regex matching for CI identities: Use
--certificate-identity-regexpto match CI workflow identities:cosign verify $IMAGE --certificate-identity-regexp="https://github.com/myorg/myrepo/.*" \ --certificate-oidc-issuer=https://token.actions.githubusercontent.com - Verification failure modes: Cosign returns a non-zero exit code on failure. Common failures include certificate identity mismatch, expired certificates without a valid Rekor timestamp, missing Rekor entry, and image digest mismatch (image was modified after signing).
Step 4: Query the Rekor Transparency Log
Search and verify entries in the Rekor transparency log to audit signing events:
- Search by email identity: Use
rekor-cli search --email user@example.comto find all signing events for an identity - Search by artifact hash: Use
rekor-cli search --sha sha256:<hash>to find signing events for a specific artifact - Retrieve and verify an entry: Use
rekor-cli get --uuid <entry_uuid>to retrieve full entry details including the certificate, signature, and artifact hash - Verify log inclusion: Use
rekor-cli verify --entry-uuid <uuid>to verify the entry's inclusion proof against the signed tree head, confirming the entry exists in the append-only log and has not been tampered with - REST API queries: Query
https://rekor.sigstore.dev/api/v1/index/retrievewith POST body{"hash": "sha256:<hash>"}to retrieve entry UUIDs, then fetch full entries from/api/v1/log/entries/<uuid> - Monitor for consistency: Use the rekor-monitor tool or Omniwitness to continuously verify the log remains append-only and entries are never mutated or removed
Step 5: Integrate into CI/CD Pipelines
Embed signing and verification into build and deployment pipelines:
- GitHub Actions: Use
sigstore/cosign-installeraction to install Cosign, then sign images using the GitHub OIDC token as the identity. The signing identity will be the workflow URL (e.g.,https://github.com/org/repo/.github/workflows/build.yml@refs/heads/main). - Kubernetes admission enforcement: Deploy Sigstore Policy Controller or Kyverno with Cosign verification policies to reject unsigned or incorrectly signed images at admission time
- Supply chain metadata: Use
cosign attestto attach in-toto attestations (SLSA provenance, SBOM, vulnerability scan results) to images, signed with the same keyless flow, enabling consumers to verify both the artifact and its build metadata
Key Concepts
| Term | Definition |
|---|---|
| Keyless Signing | Identity-based signing that uses short-lived certificates from Fulcio bound to OIDC identities instead of long-lived cryptographic keys, eliminating key management overhead |
| Fulcio | Sigstore's certificate authority that issues short-lived X.509 certificates after verifying OIDC tokens, binding an ephemeral public key to a verified identity |
| Rekor | Sigstore's immutable, append-only transparency log that records signing events with timestamps, enabling auditors to verify when and by whom an artifact was signed |
| Cosign | The primary CLI tool for signing and verifying container images and blobs using the Sigstore infrastructure (Fulcio + Rekor) |
| TUF Root of Trust | The Update Framework distribution mechanism for Sigstore's root CA certificate and Rekor public key, ensuring clients trust the correct Sigstore infrastructure |
| OIDC Identity Binding | The process where Fulcio verifies a user's identity through an OpenID Connect token and binds it to a short-lived signing certificate |
| Inclusion Proof | A cryptographic proof from Rekor demonstrating that a signing event entry exists within the transparency log's Merkle tree |
Tools & Systems
- Cosign: CLI tool for signing containers and blobs, verifying signatures, and attaching attestations using Sigstore keyless signing or traditional key-based signing
- Fulcio: Free root certificate authority for code signing certificates issued based on OIDC identity verification with a validity period of approximately 10 minutes
- Rekor: Transparency log server providing tamper-evident storage of signing metadata, searchable by identity, artifact hash, or public key
- Sigstore Policy Controller: Kubernetes admission webhook that enforces image signing policies by verifying Cosign signatures and attestations before allowing pod creation
- rekor-cli: Command-line client for querying, uploading, and verifying entries in the Rekor transparency log
Common Scenarios
Scenario: Securing a Container Image Build Pipeline with Keyless Signing
Context: A DevOps team builds container images in GitHub Actions and deploys to a Kubernetes cluster. They need to ensure only images built by their CI pipeline can be deployed, preventing supply chain attacks from compromised registries or unauthorized pushes.
Approach:
- Add
sigstore/cosign-installer@v3to the GitHub Actions workflow and enable OIDC token permissions withid-token: write - After building and pushing the image, sign it with
cosign sign $IMAGE_DIGESTusing the GitHub Actions OIDC identity automatically - Deploy Sigstore Policy Controller to the Kubernetes cluster with a ClusterImagePolicy requiring signatures from
--certificate-identity-regexp=https://github.com/myorg/myrepo/.*and--certificate-oidc-issuer=https://token.actions.githubusercontent.com - Verify the signing entry appears in Rekor by querying with the image digest hash to confirm the transparency log recorded the event
- Test the admission controller by attempting to deploy an unsigned image and confirming it is rejected with a policy violation error
Pitfalls:
- Signing the image tag instead of the digest (
cosign sign myimage:latestvscosign sign myimage@sha256:abc...) means verification breaks when the tag is updated to point to a different digest - Not pinning the
--certificate-oidc-issuerduring verification allows signatures from any OIDC provider to pass, defeating the purpose of identity binding - Forgetting to set
id-token: writepermission in GitHub Actions results in OIDC token retrieval failure and signing errors - Using
--certificate-identity-regexp=.*in production verification policies effectively disables identity verification
Output Format
## Sigstore Signing Verification Report
**Artifact**: ghcr.io/myorg/myapp@sha256:a1b2c3d4...
**Verification Status**: PASSED
**Certificate Details**:
Subject: https://github.com/myorg/myapp/.github/workflows/build.yml@refs/heads/main
Issuer: https://token.actions.githubusercontent.com
Valid From: 2026-03-19T10:00:00Z
Valid To: 2026-03-19T10:10:00Z
**Rekor Entry**:
UUID: 24296fb24b8ad77a8d52...
Log Index: 89234567
Integrated Time: 2026-03-19T10:00:05Z
Inclusion Proof: VERIFIED (tree size: 92000000, root hash: e4f5a6...)
**Policy Check**: Image signed by authorized CI workflow identity
04 同仓库更多 Skills
syllabus
Generates a curated supplementary reading list from any course syllabus using Consensus academic search. Grill-me intake (syllabus input format + course audience + year range) plus a grouping forcing-options checkpoint before any search runs — so the reading list matches the course's level and recency need. Parses the syllabus to extract topics and learning outcomes, searches Consensus for recent peer-reviewed papers per topic, and produces a professionally formatted .docx with clickable Consensus links, plain-language summaries calibrated to audience level, and Bloom-higher-order discussion questions tied to course learning goals. Use when the user uploads a syllabus, course outline, or curriculum document and wants supplementary readings (e.g., 'create a reading list from this syllabus', 'find recent papers for my course') — even casual mentions with a syllabus attached should trigger this skill.
pulse
Multi-source recency research skill that takes the pulse of any topic across Reddit, Hacker News, the open web, and optionally X/Twitter within a configurable recent window (default 30 days). Forcing intake clarifies topic specificity, angle (trend/sentiment/problems/opportunities/comparison), time window, and platform scope before searching. Returns a synthesized briefing with citations, engagement metrics, and cross-platform pattern analysis. Use when the user requests multi-source recency intelligence on a topic (e.g., 'pulse on [topic]', 'what's happening with [topic]', 'what are people saying about [topic]', 'current conversation about [topic]', 'take the pulse of [topic]', 'trending: [topic]', 'find me info on [topic]'), and for competitor research, trend discovery, tool comparisons, and audience sentiment analysis.
patent
Patent prior-art and landscape intelligence skill — not generic patent help. Commits to one of five sub-use-cases via forcing intake (novelty search / freedom-to-operate / competitive landscape / acquisition diligence / litigation prior-art) before any search runs. Searches Google Patents, Espacenet, USPTO, and optionally Lens.org for citation-graph signals. Output is an editable Word document (.docx) with verdict, ranked closest art (claim-text extracted), CPC-class-aware landscape, family-resolved hits, geographic coverage, FTO flags where applicable, strategy recommendations, and full audit log. Use when the user asks for patent searching or analysis (e.g., 'prior art search for [invention]', 'freedom to operate analysis for [product]'). Produces search signal, not legal advice — always recommends consulting a patent attorney before filing or licensing decisions. Trademark, copyright, and trade-secret questions are out of scope.
notebooklm
Browser automation skill for controlling Google's NotebookLM. Use when the user wants anything done in NotebookLM (e.g., 'open NotebookLM', 'check my [name] notebook', 'ask my notebook about X', 'add [source] to NotebookLM', 'generate a Video Overview from my notebook', 'use NotebookLM Studio'). Handles reading and querying notebooks, adding sources (URLs, text, files, YouTube links, synthesized content), generating Studio outputs (Audio/Video Overviews, Mind Maps, Reports incl. Briefing Doc/Study Guide/FAQ, Flashcards, Quiz, slide decks, infographics — discover the exact set from the live Studio panel; the UI evolves fast), and creating new notebooks. Requires browser automation environment — fails gracefully when unavailable.
litreview
Academic literature orientation skill that searches papers via free keyless APIs (PubMed E-utilities + OpenAlex) by default — with the Consensus MCP as an optional enhancement lane when connected — builds a strategic search plan using PICO (default) or SPIDER / Decomposition / hybrid as fallbacks, and synthesizes findings into a formatted Word (.docx) research guide. Grill-me intake (research question specificity + framework hint + tentative depth) before the recon search; a second forcing checkpoint after Phase 2 confirms framework + sub-areas + depth before searches consume budget. Configurable depth (5/10/20 queries) controls coverage vs. speed. Output is a 'launching pad' — an orientation guide that lets a researcher dive in confidently, not a finished review. Use when the user starts literature-oriented research (e.g., 'litreview on [topic]', 'literature review on [topic]', 'I'm starting a literature review on X', 'I'm writing a paper on X', 'help me research X', 'I'm doing research on X', 'can you help me research X'). Do NOT use for single one-off paper searches wanting a quick list — that's a plain PubMed/OpenAlex (or Consensus) query.
grants
NIH grant research skill for clinical researchers. Grill-me intake (research idea + career stage + preliminary data + environment + submission posture + known institute targets) locks down the funding strategy before any search runs. Runs a 5-facet Consensus positioning analysis (with draft Significance/Innovation language), maps the research to the right NIH institutes and study sections via RePORTER, finds NOSIs and funded overlap, and produces an editable Word document (.docx) with budget/scope-aware mechanism recommendations, submission timelines, and a mandatory program officer recommendation. Use when the user asks about research funding or makes any grant-related request (e.g., 'grants for [topic]', 'find grants for my research idea', 'what grants match my research', 'help me find NIH funding', 'grant opportunities for my research'). NIH-only scope — non-NIH funders (PCORI, DOD CDMRP, VA, foundations) are out of scope and flagged at intake.