Artifact Attestations–now in public beta

https://github.blog/2024-05-02-introducing-artifact-attestations-now-in-public-beta/

Generate and verify signed attestations for anything you make with GitHub Actions.

May 2, 2024 | Updated June 26, 2024

June 25, 2024 update: Artifact Attestations is now generally available! Get started today.

There’s an increasing need across enterprises and the open source ecosystem to have a verifiable way to link software artifacts back to their source code and build instructions. And with more than 100M developers building on GitHub, we want to ensure developers have the tools needed to help protect the integrity of their software supply chain. Today, we’re proud to announce the public beta of Artifact Attestations, a new feature that will pave the way for a cultural shift toward expecting to know where software comes from.

Artifact Attestations allow project maintainers to effortlessly create a tamper-proof, unforgeable paper trail linking their software to the process which created it. Downstream consumers of that metadata can then use it as a foundation for new security and validity checks through policy evaluation via tools like Rego and Cue. We’re starting with verification support based on GitHub CLI, but will expand to bring these same controls to the Kubernetes ecosystem as well later this year.

Artifact Attestations is powered by Sigstore, an open source project for signing and verifying software artifacts. This means open source maintainers can reduce their project’s exposure to supply chain attacks and increase the security of the broader software ecosystem–no matter where maintainers host their code, or build their artifacts. Let’s jump in.

Flow chart demonstrating that if a customer Actions workflow is in a public repository, it can be attested with Public Good Sigstore, and stored in a public transparency log. If it is in a private repository, attestation happens with GitHub Sigstore, and the attestation is stored in a private transparency log.

An effortless user experience

Security features need to be more than just powerful—they have to be simple to adopt and easy to configure in order to be effective. Artifact Attestations couldn’t be easier to set up: all you need to do is add a bit of YAML to your GitHub Actions workflow to create an attestation and install the GitHub CLI tool to verify it.

  1. Enable your GitHub Actions workflow to write to the attestations store:
    permissions:
      id-token: write
      attestations: write
      contents: read
    
  2. Direct a workflow to create an attestation, making sure to place it after the artifact is generated:
        - name: Attest Build Provenance
            uses: actions/attest-build-provenance@897ed5eab6ed058a474202017ada7f40bfa52940 # v1.0.0
            with:
            subject-path: "bin/my-artifact.tar.gz"
    
  3. Once your build is finished and you have the artifact downloaded, use GitHub CLI (version 2.49.0 or greater) to verify it, providing the name of the organization that contains the repository where the action ran:
    gh attestation verify my-artifact.tar.gz -o my-organization
    

It’s also easy to download the attestation document itself for storage or offline verification (for example, in an air-gapped environment), quickly look at certificate details, or extract verified attestation contents in a JSON form so you can pipe it to a policy engine like OPA.

package attestation.slsa1
import future.keywords.if
approved_repos := [
    "https://github.com/sigstore/sigstore-js",
    "https://github.com/github/example",
]
# Fail closed
default allow := false
# Allow if the repository is in the approved_repos list and the predicateType matches
allow {
    some i
    # Check if the predicateType matches the required type
    input[i].verificationResult.statement.predicateType == "https://slsa.dev/provenance/v1"
    # Attempt to safely assign the repo variable
    repo := input[i].verificationResult.statement.predicate.buildDefinition.externalParameters.workflow.repository
    repo == approved_repos[_]
}

You can grab the attestation in JSON format and use the policy to verify myfile.zip came from an allowed repository in the policy like so:

$ gh attestation verify -R github/example --format json myfile.zip | \
opa eval  --stdin-input -f raw \
-d policy.rego "data.attestation.slsa1.allow == true"
true

Can I attest other things in my build, like SBOM?

If you have an SBOM that you’ve generated as part of your build, you can use the new attest-sbom action to associate it with a final artifact. You simply provide the path to that artifact and the action will take care of wrapping it in an in-toto attestation predicate, signing it with our internal Sigstore instance, and sending it to our attestation store. If you don’t already have an SBOM in your build and want a way to get started, the anchore/sbom-action offers support for container images and many language ecosystems.

To associate a build artifact with an attested SBOM, follow these steps:

  1. First (just like for provenance) you need to grant write permission for the attestation store to your workflow:
    permissions:
      id-token: write
      attestations: write
      contents: read
    
  2. Ensure that you actually have an SBOM that makes sense for your particular needs. Here’s an example of using Anchore’s Syft to scan a build directory:
    - uses: anchore/sbom-action@v0
      with:
        path: ./build/
        format: 'spdx-json'
        output-file: 'sbom.spdx.json'
    
  3. Finally, use the attest-sbom action to wrap the generated SBOM file contents in an in-toto SBOM predicate, sign it, associate it with your built artifact, and send it to the attestation store:
    - uses: actions/attest-sbom@v1
      with:
        subject-path: 'bin/my-artifact.tar.gz'
        sbom-path: 'sbom.spdx.json'
    

How it works

Artifact Attestations help reduce the complexity of deploying and managing public key infrastructure, instead placing trust in the security of your GitHub account. We accomplish this by signing a document with a temporary keypair. The public key is attached to a certificate associated with a build system’s workload identity, and the private key never leaves process memory and is discarded immediately after signing. This differs from other signing approaches that rely on human identities or long-lived keys. We believe that certificate revocation lists are too problematic to use effectively, and that the future of software provenance and signatures goes through workload identity. Here’s how:

  • When an attestation action executes, our Sigstore client requests the GitHub Actions OIDC token associated with that workflow run. It then creates a key pair and sends the public half to Fulcio, a certificate authority, along with the OIDC token. In the case of a public repository, Sigstore Public Good Instance’s Fulcio issues the cert. In the case of a private repository, the cert is issued by GitHub’s internal instance of Fulcio, ensuring that no customer information leaves GitHub.
  • When receiving the token, Fulcio validates the token’s signature and mints a new short-lived X.509 certificate binding the public key to the workflow’s OIDC identity.
  • Fulcio returns the certificate to the client running in GitHub Actions, which calculates a SHA-256 digest of the subject artifact, and writes out an in-toto statement which binds the subject to a predicate containing data from the OIDC token’s claims.
  • The client uses the private key to seal the in-toto statement in a DSSE signing envelope. Then, it throws the private key away. The envelope’s signature is sent to the TSA for a timestamp counter-signature, which proves that the signature was produced during the certificate’s 10-minute validity window.
  • Everything is wrapped up as a Sigstore bundle and persisted to GitHub’s attestation store. In the case of a private repository, that’s the end of the flow. In the case of a public repository, the attestation is additionally written to the Sigstore Public Good Instance and lands on Rekor, the project’s immutable ledger.

Artifact Attestations have been in an early access preview for the last several months, and we’re thrilled by the early feedback we’ve received.

GitHub is steadfast in its commitment to democratizing software attestations and artifact integrity. Leveraging just six lines of code in GitHub workflows marks a game-changer in build chain security—an initiative I've utilized, experienced, and enthusiastically embraced.

- Victor Martinez Rubio // Principal Engineer, Elastic

GitHub is now a root certificate authority

When we started designing the requirements for this feature, we realized quickly that we wanted users to be able to sign an artifact on GitHub Actions and then verify it anywhere, even offline. Public key infrastructure (PKI) is complex and high-stakes, and we heard from both customers and open source projects that they wanted a way to sign things without having to build out PKI or manage secrets which can be leaked or lost. To do this, we first needed to establish GitHub as a root certificate authority (CA) for signing software so that we could own the entire certificate chain.

In October 2023, we went live with an X.509 certificate authority and RFC 3161 timestamp server, with a trust root managed via a quorum of hardware tokens held by employees across a variety of geographies and roles. The trust root is managed with tooling from the TUF project (where we’re contributors), and the CA and timestamp services are instances of Sigstore applications. Intermediate certificates are housed in Azure KeyVault Managed HSMs, which are used to sign leaf certificates issued by Sigstore Fulcio and Sigstore Timestamp Authority. Signing certificates are valid for 10 minutes from the time of issuance, so there is no need to manage the complexities of Certificate Revocation Lists (CRLs).

Sigstore, in public and in private

In keeping with our commitment to offering cutting-edge features to both enterprise customers and the open source community, Artifact Attestations supports the same user experience offered in two basic modes depending on repository visibility. For public repositories, attestations generated on GitHub Actions will be written to the Sigstore Public Good Instance for verification in public on an immutable ledger. For private repositories on GitHub Enterprise plans, the attestations are written to an internal, completely private database and no information is written to public ledgers or logs.

A more secure future

It’s important to note that provenance by itself doesn’t make your artifact or your build process secure. What it does do is create a tamper-proof guarantee that the thing you’re executing is definitely the thing that you built, which can stop many attack vectors. It’s still vital to maintain strong application security processes like requiring code review for all patches, and applying dependency updates in a timely manner.

In other words: attestations provide you with a paper trail, which cannot be forged, tying a given artifact to a given GitHub Actions workflow run. We believe that this is a key piece of the modern trust model, and in addition we want to help effect a cultural shift toward folks knowing where their software components come from.

Artifact Attestations will allow customers unprecedented visibility into the composition and usage of their built software artifact, and this is just the beginning. We’ll be offering the ability to attest other kinds of artifacts associated with the build process, such as vulnerability reports and other pieces of metadata supported by the in-toto project’s defined predicate types. Look for exciting news around Kubernetes support, new guarantees for releases, and more later this year.

Want to learn more about how GitHub can take the stress out of shipping secure code?

At GitHub Universe 2024, we’ll explore cutting-edge research and best practices in developer-first security—so you can keep your code secure with tools you already know and love.

Our Super Early Bird sale ends soon! Buy your tickets now.

Written by

Trevor Rosen

Related posts

We do newsletters, too

Discover tips, technical guides, and best practices in our biweekly newsletter just for devs.

{
"by": "SEJeff",
"descendants": 0,
"id": 40244718,
"score": 3,
"time": 1714717358,
"title": "Artifact Attestations–now in public beta",
"type": "story",
"url": "https://github.blog/2024-05-02-introducing-artifact-attestations-now-in-public-beta/"
}
{
"author": "Trevor Rosen",
"date": "2024-06-26T13:36:14.000Z",
"description": "Generate and verify signed attestations for anything you make with GitHub Actions.",
"image": "https://github.blog/wp-content/uploads/2023/11/Security-LightMode-4.png?fit=1200%2C630",
"logo": "https://logo.clearbit.com/github.blog",
"publisher": "GitHub",
"title": "Introducing Artifact Attestations–now in public beta",
"url": "https://github.blog/news-insights/product-news/introducing-artifact-attestations-now-in-public-beta/"
}
{
"url": "https://github.blog/2024-05-02-introducing-artifact-attestations-now-in-public-beta/",
"title": "Introducing Artifact Attestations–now in public beta",
"description": "Generate and verify signed attestations for anything you make with GitHub Actions. \t\t\t \t\t\t\t \t\t \t\t\tMay 2, 2024\t\t \t\t\t\t\t| \t\t\t\tUpdated June 26,...",
"links": [
"https://github.blog/news-insights/product-news/introducing-artifact-attestations-now-in-public-beta/",
"https://wp.me/pamS32-kfk",
"https://github.blog/2024-05-02-introducing-artifact-attestations-now-in-public-beta/"
],
"image": "https://github.blog/wp-content/uploads/2023/11/Security-LightMode-4.png?fit=1200%2C630",
"content": "<div>\n\t\t\t\t\t\t\t\t\t\t\t\t<p>Generate and verify signed attestations for anything you make with GitHub Actions.</p>\n\t\t\t</div>\n<div>\n\t\t\t\t<div>\n\t\t<p>\n\t\t\tMay 2, 2024\t\t\n\t\t\t\t\t<span>|</span>\n\t\t\t\tUpdated June 26, 2024\t\t\t</p>\n\t\t\t</div>\n\t\t\t\t<ul>\n\t<li>\n\t\t<span>\n\t\t\tShare:\t\t</span>\n\t</li>\n\t<li>\n\t\t<a href=\"https://x.com/share?text=Introducing%20Artifact%20Attestations%E2%80%93now%20in%20public%20beta&amp;url=https%3A%2F%2Fgithub.blog%2Fnews-insights%2Fproduct-news%2Fintroducing-artifact-attestations-now-in-public-beta%2F\" target=\"_blank\">\n\t\t\t<svg width=\"10\" height=\"10\">\n\t\t\t</svg>\n\t\t</a>\n\t</li>\n\t<li>\n\t\t<a href=\"https://www.facebook.com/sharer/sharer.php?t=Introducing%20Artifact%20Attestations%E2%80%93now%20in%20public%20beta&amp;u=https%3A%2F%2Fgithub.blog%2Fnews-insights%2Fproduct-news%2Fintroducing-artifact-attestations-now-in-public-beta%2F\" target=\"_blank\">\n\t\t\t<svg width=\"10\" height=\"10\">\n\t\t\t</svg>\n\t\t</a>\n\t</li>\n\t<li>\n\t\t<a href=\"https://www.linkedin.com/shareArticle?title=Introducing%20Artifact%20Attestations%E2%80%93now%20in%20public%20beta&amp;url=https%3A%2F%2Fgithub.blog%2Fnews-insights%2Fproduct-news%2Fintroducing-artifact-attestations-now-in-public-beta%2F\" target=\"_blank\">\n\t\t\t<svg width=\"10\" height=\"10\">\n\t\t\t</svg>\n\t\t</a>\n\t</li>\n</ul>\n\t\t\t</div>\n\t<section>\n<blockquote><p>\n June 25, 2024 update: Artifact Attestations is now generally available! <a target=\"_blank\" href=\"https://github.blog/changelog/2024-06-25-artifact-attestations-is-generally-available/\">Get started today</a>.\n</p></blockquote>\n<p>There’s an increasing need across enterprises and the open source ecosystem to have a verifiable way to <a target=\"_blank\" href=\"https://github.blog/2024-04-30-where-does-your-software-really-come-from/\">link software artifacts back to their source code and build instructions</a>. And with more than 100M developers building on GitHub, we want to ensure developers have the tools needed to help protect the integrity of their software supply chain. Today, we’re proud to announce the public beta of Artifact Attestations, a new feature that will pave the way for a cultural shift toward expecting to <em>know</em> where software comes from.</p>\n<p>Artifact Attestations allow project maintainers to effortlessly create a tamper-proof, unforgeable paper trail linking their software to the process which created it. Downstream consumers of that metadata can then use it as a foundation for new security and validity checks through policy evaluation via tools like <a target=\"_blank\" href=\"https://www.openpolicyagent.org/docs/latest/policy-language/\">Rego</a> and <a target=\"_blank\" href=\"https://cuelang.org/docs/reference/spec/\">Cue</a>. We’re starting with verification support based on GitHub CLI, but will expand to bring these same controls to the Kubernetes ecosystem as well later this year.</p>\n<p>Artifact Attestations is powered by <a target=\"_blank\" href=\"https://github.blog/2022-10-25-why-were-excited-about-the-sigstore-general-availability/\">Sigstore</a>, an open source project for signing and verifying software artifacts. This means open source maintainers can reduce their project’s exposure to supply chain attacks and increase the security of the broader software ecosystem–no matter where maintainers host their code, or build their artifacts. Let’s jump in.</p>\n<p><img src=\"https://github.blog/wp-content/uploads/2024/05/attestations1.png?w=1024&amp;resize=1024%2C492\" alt=\"Flow chart demonstrating that if a customer Actions workflow is in a public repository, it can be attested with Public Good Sigstore, and stored in a public transparency log. If it is in a private repository, attestation happens with GitHub Sigstore, and the attestation is stored in a private transparency log.\" srcset=\"https://github.blog/wp-content/uploads/2024/05/attestations1.png?w=1600 1600w, https://github.blog/wp-content/uploads/2024/05/attestations1.png?w=300 300w, https://github.blog/wp-content/uploads/2024/05/attestations1.png?w=768 768w, https://github.blog/wp-content/uploads/2024/05/attestations1.png?w=1024 1024w, https://github.blog/wp-content/uploads/2024/05/attestations1.png?w=1536 1536w\" /></p>\n<h2 id=\"an-effortless-user-experience\">An effortless user experience<a target=\"_blank\" href=\"https://github.blog/2024-05-02-introducing-artifact-attestations-now-in-public-beta/#an-effortless-user-experience\"></a></h2>\n<p>Security features need to be more than just powerful—they have to be simple to adopt and easy to configure in order to be effective. Artifact Attestations couldn’t be easier to set up: all you need to do is add a bit of YAML to your GitHub Actions workflow to create an attestation and <a target=\"_blank\" href=\"https://cli.github.com/\">install the GitHub CLI tool</a> to <em>verify</em> it.</p>\n<ol>\n<li>Enable your GitHub Actions workflow to write to the attestations store:\n<pre><code>permissions:\n id-token: write\n attestations: write\n contents: read\n</code></pre>\n</li>\n<li>Direct a workflow to create an attestation, making sure to place it after the artifact is generated:\n<pre><code> - name: Attest Build Provenance\n uses: actions/attest-build-provenance@897ed5eab6ed058a474202017ada7f40bfa52940 # v1.0.0\n with:\n subject-path: \"bin/my-artifact.tar.gz\"\n</code></pre>\n</li>\n<li>Once your build is finished and you have the artifact downloaded, use GitHub CLI (<a target=\"_blank\" href=\"https://github.com/cli/cli/releases/tag/v2.49.0\">version 2.49.0 or greater</a>) to verify it, providing the name of the organization that contains the repository where the action ran:\n<pre><code>gh attestation verify my-artifact.tar.gz -o my-organization\n</code></pre>\n</li>\n</ol>\n<p>It’s also easy to download the attestation document itself for storage or offline verification (for example, in an air-gapped environment), quickly look at certificate details, or extract verified attestation contents in a JSON form so you can pipe it to a policy engine like <a target=\"_blank\" href=\"https://www.openpolicyagent.org/\">OPA</a>.</p>\n<pre><code>package attestation.slsa1\nimport future.keywords.if\napproved_repos := [\n \"https://github.com/sigstore/sigstore-js\",\n \"https://github.com/github/example\",\n]\n# Fail closed\ndefault allow := false\n# Allow if the repository is in the approved_repos list and the predicateType matches\nallow {\n some i\n # Check if the predicateType matches the required type\n input[i].verificationResult.statement.predicateType == \"https://slsa.dev/provenance/v1\"\n # Attempt to safely assign the repo variable\n repo := input[i].verificationResult.statement.predicate.buildDefinition.externalParameters.workflow.repository\n repo == approved_repos[_]\n}\n</code></pre>\n<p>You can grab the attestation in JSON format and use the policy to verify <code>myfile.zip</code> came from an allowed repository in the policy like so:</p>\n<pre><code>$ gh attestation verify -R github/example --format json myfile.zip | \\\nopa eval --stdin-input -f raw \\\n-d policy.rego \"data.attestation.slsa1.allow == true\"\ntrue\n</code></pre>\n<h2 id=\"can-i-attest-other-things-in-my-build-like-sbom\">Can I attest other things in my build, like SBOM?<a target=\"_blank\" href=\"https://github.blog/2024-05-02-introducing-artifact-attestations-now-in-public-beta/#can-i-attest-other-things-in-my-build-like-sbom\"></a></h2>\n<p>If you have an <a target=\"_blank\" href=\"https://www.cisa.gov/sbom#:~:text=A%20%E2%80%9Csoftware%20bill%20of%20materials,that%20make%20up%20software%20components.\">SBOM</a> that you’ve generated as part of your build, you can use the new <a target=\"_blank\" href=\"https://github.com/actions/attest-sbom\">attest-sbom action</a> to associate it with a final artifact. You simply provide the path to that artifact and the action will take care of wrapping it in an in-toto attestation predicate, signing it with our internal Sigstore instance, and sending it to our attestation store. If you <strong>don’t</strong> already have an SBOM in your build and want a way to get started, the <a target=\"_blank\" href=\"https://github.com/anchore/sbom-action\">anchore/sbom-action</a> offers support for container images and many language ecosystems.</p>\n<p>To associate a build artifact with an attested SBOM, follow these steps:</p>\n<ol>\n<li>First (just like for provenance) you need to grant write permission for the attestation store to your workflow:\n<pre><code>permissions:\n id-token: write\n attestations: write\n contents: read\n</code></pre>\n</li>\n<li>Ensure that you actually have an SBOM that makes sense for your particular needs. Here’s an example of using <a target=\"_blank\" href=\"https://github.com/anchore/sbom-action\">Anchore’s Syft</a> to scan a build directory:\n<pre><code>- uses: anchore/sbom-action@v0\n with:\n path: ./build/\n format: 'spdx-json'\n output-file: 'sbom.spdx.json'\n</code></pre>\n</li>\n<li>Finally, use the attest-sbom action to wrap the generated SBOM file contents in an in-toto SBOM predicate, sign it, associate it with your built artifact, and send it to the attestation store:\n<pre><code>- uses: actions/attest-sbom@v1\n with:\n subject-path: 'bin/my-artifact.tar.gz'\n sbom-path: 'sbom.spdx.json'\n</code></pre>\n</li>\n</ol>\n<h2 id=\"how-it-works\">How it works<a target=\"_blank\" href=\"https://github.blog/2024-05-02-introducing-artifact-attestations-now-in-public-beta/#how-it-works\"></a></h2>\n<p><img src=\"https://github.blog/wp-content/uploads/2024/05/attestations3.png?w=1024&amp;resize=1024%2C376\" srcset=\"https://github.blog/wp-content/uploads/2024/05/attestations3.png?w=1600 1600w, https://github.blog/wp-content/uploads/2024/05/attestations3.png?w=300 300w, https://github.blog/wp-content/uploads/2024/05/attestations3.png?w=768 768w, https://github.blog/wp-content/uploads/2024/05/attestations3.png?w=1024 1024w, https://github.blog/wp-content/uploads/2024/05/attestations3.png?w=1536 1536w\" /></p>\n<p>Artifact Attestations help reduce the complexity of deploying and managing public key infrastructure, instead placing trust in the security of your GitHub account. We accomplish this by signing a document with a <em>temporary</em> keypair. The public key is attached to a certificate associated with a build system’s <em>workload identity</em>, and the private key never leaves process memory and is discarded immediately after signing. This differs from other signing approaches that rely on human identities or long-lived keys. We believe that certificate revocation lists are too problematic to use effectively, and that the future of software provenance and signatures <a target=\"_blank\" href=\"https://www.youtube.com/watch?v=w1hgRapM-Q8&amp;t=1341s\">goes through workload identity</a>. Here’s how:</p>\n<ul>\n<li>When an attestation action executes, our Sigstore client requests the <a target=\"_blank\" href=\"https://docs.github.com/actions/deployment/security-hardening-your-deployments/about-security-hardening-with-openid-connect#understanding-the-oidc-token\">GitHub Actions OIDC token</a> associated with that workflow run. It then creates a key pair and sends the public half to <a target=\"_blank\" href=\"https://github.com/sigstore/fulcio\">Fulcio</a>, a certificate authority, along with the OIDC token. In the case of a <strong>public repository</strong>, Sigstore Public Good Instance’s Fulcio issues the cert. In the case of a <strong>private repository</strong>, the cert is issued by GitHub’s internal instance of Fulcio, ensuring that no customer information leaves GitHub.</li>\n<li>When receiving the token, Fulcio validates the token’s signature and mints a new short-lived X.509 certificate binding the public key to the workflow’s OIDC identity. </li>\n<li>Fulcio returns the certificate to the client running in GitHub Actions, which calculates a SHA-256 digest of the subject artifact, and writes out an <a target=\"_blank\" href=\"https://github.com/in-toto/attestation/blob/main/spec/v1/statement.md\">in-toto statement</a> which binds the subject to a <a target=\"_blank\" href=\"https://slsa.dev/spec/v1.0/provenance\">predicate</a> containing data from the OIDC token’s claims. </li>\n<li>The client uses the private key to seal the in-toto statement in a <a target=\"_blank\" href=\"https://github.com/secure-systems-lab/dsse\">DSSE signing envelope</a>. Then, it throws the private key away. The envelope’s signature is sent to the TSA for a timestamp counter-signature, which proves that the signature was produced during the certificate’s 10-minute validity window.</li>\n<li>Everything is wrapped up as a <a target=\"_blank\" href=\"https://github.com/sigstore/protobuf-specs/blob/main/protos/sigstore_bundle.proto\">Sigstore bundle</a> and persisted to GitHub’s attestation store. In the case of a <strong>private repository</strong>, that’s the end of the flow. In the case of a <strong>public repository</strong>, the attestation is additionally written to the Sigstore Public Good Instance and lands on <a target=\"_blank\" href=\"https://docs.sigstore.dev/logging/overview/\">Rekor</a>, the project’s immutable ledger.</li>\n</ul>\n<p>Artifact Attestations have been in an early access preview for the last several months, and we’re thrilled by the early feedback we’ve received.</p>\n<figure><blockquote><p>GitHub is steadfast in its commitment to democratizing software attestations and artifact integrity. Leveraging just six lines of code in GitHub workflows marks a game-changer in build chain security—an initiative I've utilized, experienced, and enthusiastically embraced.</p></blockquote><figcaption> - Victor Martinez Rubio // Principal Engineer, Elastic</figcaption></figure>\n<h3 id=\"github-is-now-a-root-certificate-authority\">GitHub is now a root certificate authority<a target=\"_blank\" href=\"https://github.blog/2024-05-02-introducing-artifact-attestations-now-in-public-beta/#github-is-now-a-root-certificate-authority\"></a></h3>\n<p>When we started designing the requirements for this feature, we realized quickly that we wanted users to be able to sign an artifact on GitHub Actions and then verify it <em>anywhere</em>, even offline. <a target=\"_blank\" href=\"https://en.wikipedia.org/wiki/Public_key_infrastructure\">Public key infrastructure (PKI)</a> is complex and high-stakes, and we heard from both customers and open source projects that they wanted a way to sign things <em>without</em> having to build out PKI or manage secrets which can be leaked or lost. To do this, we first needed to establish GitHub as a root certificate authority (CA) for signing software so that we could own the entire certificate chain.</p>\n<p>In October 2023, we went live with an <a target=\"_blank\" href=\"https://github.com/sigstore/fulcio\">X.509 certificate authority</a> and <a target=\"_blank\" href=\"https://github.com/sigstore/timestamp-authority\">RFC 3161 timestamp server</a>, with a trust root managed via a quorum of hardware tokens held by employees across a variety of geographies and roles. The trust root is managed with tooling from the <a target=\"_blank\" href=\"https://theupdateframework.org/\">TUF project</a> (where we’re contributors), and the CA and timestamp services are instances of Sigstore applications. Intermediate certificates are housed in <a target=\"_blank\" href=\"https://learn.microsoft.com/en-us/azure/key-vault/managed-hsm/overview\">Azure KeyVault Managed HSMs</a>, which are used to sign leaf certificates issued by Sigstore Fulcio and Sigstore Timestamp Authority. Signing certificates are valid for 10 minutes from the time of issuance, so there is no need to manage the <a target=\"_blank\" href=\"https://garantir.io/certificate-revocation-challenges-and-best-practices\">complexities of Certificate Revocation Lists</a> (CRLs).</p>\n<h3 id=\"sigstore-in-public-and-in-private\">Sigstore, in public and in private<a target=\"_blank\" href=\"https://github.blog/2024-05-02-introducing-artifact-attestations-now-in-public-beta/#sigstore-in-public-and-in-private\"></a></h3>\n<p>In keeping with our commitment to offering cutting-edge features to both enterprise customers and the open source community, Artifact Attestations supports the same user experience offered in two basic modes depending on repository visibility. For <strong>public repositories</strong>, attestations generated on GitHub Actions will be written to the Sigstore Public Good Instance for verification in public on an <a target=\"_blank\" href=\"https://github.com/sigstore/rekor\">immutable ledger</a>. For <strong>private repositories</strong> on <a target=\"_blank\" href=\"https://github.com/enterprise\">GitHub Enterprise</a> plans, the attestations are written to an internal, completely private database and no information is written to public ledgers or logs.</p>\n<h2 id=\"a-more-secure-future\">A more secure future<a target=\"_blank\" href=\"https://github.blog/2024-05-02-introducing-artifact-attestations-now-in-public-beta/#a-more-secure-future\"></a></h2>\n<p>It’s important to note that <strong>provenance by itself doesn’t make your artifact or your build process secure</strong>. What it <em>does</em> do is create a tamper-proof guarantee that the thing you’re <em>executing</em> is definitely the thing that you <em>built</em>, which can stop many attack vectors. It’s still vital to maintain strong application security processes like requiring code review for all patches, and applying dependency updates in a timely manner.</p>\n<p>In other words: attestations provide you with a paper trail, which cannot be forged, tying a given artifact to a given GitHub Actions workflow run. We believe that this is a key piece of the modern trust model, and in addition we want to help effect a cultural shift toward folks knowing <em>where their software components come from</em>.</p>\n<p>Artifact Attestations will allow customers unprecedented visibility into the composition and usage of their built software artifact, and this is just the beginning. We’ll be offering the ability to attest other kinds of artifacts associated with the build process, such as vulnerability reports and other pieces of metadata supported by the <a target=\"_blank\" href=\"https://in-toto.io/\">in-toto project</a>’s defined predicate types. Look for exciting news around Kubernetes support, new guarantees for releases, and more later this year.</p>\n<div><p><strong>Want to learn more about how GitHub can take the stress out of shipping secure code?</strong></p>\n<p>At <a target=\"_blank\" href=\"https://githubuniverse.com/?utm_source=Blog&amp;utm_medium=GitHub&amp;utm_campaign=sec-ref/\">GitHub Universe 2024</a>, we’ll explore cutting-edge research and best practices in developer-first security—so you can keep your code secure with tools you already know and love.</p>\n<p>Our Super Early Bird sale ends soon! <a target=\"_blank\" href=\"https://githubuniverse.com/?utm_source=Blog&amp;utm_medium=GitHub&amp;utm_campaign=sec-ref\">Buy your tickets now.</a></p>\n</div>\n\t<div>\n\t<h2>\n\t\tWritten by\t</h2>\n\t\t\t<article>\n\t<div>\n\t\t\t\t<picture>\n\t\t\t\t\t<source srcset=\"https://avatars.githubusercontent.com/u/1402?v=4&amp;s=200\" media=\"(min-width: 768px)\"></source>\n\t\t\t\t\t<img src=\"https://avatars.githubusercontent.com/u/1402?v=4&amp;s=200\" alt=\"Trevor Rosen\" />\n\t\t\t\t</picture>\n\t\t\t</div>\n</article>\n\t</div>\n</section>\n\t<section>\n\t<h2>\n\t\tRelated posts\t</h2>\n</section>\n<div>\n\t\t\t\t<h2> We do newsletters, too</h2>\n\t\t\t\t<p>Discover tips, technical guides, and best practices in our biweekly newsletter just for devs.</p>\n\t\t\t</div>",
"author": "Trevor Rosen",
"favicon": "https://github.blog/wp-content/uploads/2019/01/cropped-github-favicon-512.png?fit=192%2C192",
"source": "github.blog",
"published": "2024-06-26T13:36:14+00:00",
"ttr": 356,
"type": "article"
}