You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
intro: 'Understand the usage and security benefits of artifact attestations.'
4
+
shortTitle: Artifact attestations
5
+
topics:
6
+
- Actions
7
+
- Security
8
+
versions:
9
+
fpt: '*'
10
+
ghec: '*'
11
+
---
12
+
13
+
## Overview
14
+
15
+
{% data reusables.actions.about-artifact-attestations %}
16
+
17
+
## SLSA levels for artifact attestations
18
+
19
+
The SLSA framework is an industry standard used to evaluate supply chain security. It is organized into levels. Each level represents an increasing degree of security and trustworthiness for a software supply chain. Artifact attestations by itself provides SLSA v1.0 Build Level 2.
20
+
21
+
This provides a link between your artifact and its build instructions, but you can take this a step further by requiring builds make use of known, vetted build instructions. A great way to do this is to have your build take place in a reusable workflow that many repositories across your organization share. Reusable workflows can provide isolation between the build process and the calling workflow, to meet SLSA v1.0 Build Level 3. For more information, see [AUTOTITLE](/actions/security-guides/using-artifact-attestations-and-reusable-workflows-to-achieve-slsa-v1-build-level-3).
22
+
23
+
For more information on SLSA levels, see [SLSA Security Levels](https://slsa.dev/spec/v1.0/levels).
24
+
25
+
## How {% data variables.product.github %} generates artifact attestations
26
+
27
+
To generate artifact attestations, {% data variables.product.prodname_dotcom %} uses Sigstore, which is an open source project that offers a comprehensive solution for signing and verifying software artifacts via attestations.
28
+
29
+
**Public repositories** that generate artifact attestations use the [Sigstore Public Good Instance](https://openssf.org/blog/2023/10/03/running-sigstore-as-a-managed-service-a-tour-of-sigstores-public-good-instance/). A copy of the generated Sigstore bundle is stored with GitHub and is also written to an immutable transparency log that is publicly readable on the internet.
30
+
31
+
**Private repositories** that generate artifact attestations use GitHub's Sigstore instance. GitHub's Sigstore instance uses the same codebase as the Sigstore Public Good Instance, but it does not have a transparency log and only federates with {% data variables.product.prodname_actions %}.
32
+
33
+
## When to generate attestations
34
+
35
+
Generating attestations alone doesn't provide any security benefit, the attestations must be verified for the benefit to be realized. Here are some guidelines for how to think about what to sign and how often:
36
+
37
+
You should sign:
38
+
39
+
* Software you are releasing that you expect people to run `gh attestation verify ...` on.
40
+
* Binaries people will run, packages people will download, or manifests that include hashes of detailed contents.
41
+
42
+
You should **not** sign:
43
+
44
+
* Frequent builds that are just for automated testing.
45
+
* Individual files like source code, documentation files, or embedded images.
46
+
47
+
## Verifying artifact attestations
48
+
49
+
If you consume software that publishes artifact attestations, you can use the {% data variables.product.prodname_cli %} to verify those attestations. Because the attestations give you information about where and how software was built, you can use that information to create and enforce security policies that elevate your supply chain security.
50
+
51
+
>[!WARNING] It is important to remember that artifact attestations are _not_ a guarantee that an artifact is secure. Instead, artifact attestations link you to the source code and the build instructions that produced them. It is up to you to define your policy criteria, evaluate that policy by evaluating the content, and make an informed risk decision when you are consuming software.
52
+
53
+
## Next steps
54
+
55
+
To start generating and verifying artifact attestations for your builds, see [AUTOTITLE](/actions/how-tos/security-for-github-actions/using-artifact-attestations/using-artifact-attestations-to-establish-provenance-for-builds).
Copy file name to clipboardExpand all lines: content/actions/how-tos/security-for-github-actions/using-artifact-attestations/using-artifact-attestations-and-reusable-workflows-to-achieve-slsa-v1-build-level-3.md
+5-15Lines changed: 5 additions & 15 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,8 +1,7 @@
1
1
---
2
2
title: Using artifact attestations and reusable workflows to achieve SLSA v1 Build Level 3
3
-
shortTitle: Attest with reusable workflows
3
+
shortTitle: Increase security rating
4
4
intro: Building software with reusable workflows and artifact attestations can streamline your supply chain security and help you achieve SLSA v1.0 Build Level 3.
Artifact attestations are a great way to create unfalsifiable provenance and integrity guarantees for the software you build.
21
-
22
-
But remember that by itself, artifact attestations provides links, like the build instructions an artifact was built with, which meets SLSA v1.0 Build Level 2. To make an informed risk decision, it's up to you to follow those links and evaluate those build instructions.
23
-
24
-
You can take this a step further by requiring builds make use of known, vetted build instructions. A great way to do this is to have your build take place in a reusable workflow that many repositories across your organization share. Reusable workflows can provide isolation between the build process and the calling workflow, to meet SLSA v1.0 Build Level 3.
17
+
## Prerequisites
25
18
26
19
Before starting this guide, you should be familiar with:
20
+
* The usage and security benefits of artifact attestations. See [AUTOTITLE](/actions/concepts/security/artifact-attestations).
27
21
* Generating artifact attestations. See [AUTOTITLE](/actions/security-guides/using-artifact-attestations-to-establish-provenance-for-builds).
28
22
* Writing and using reusable workflows. See [AUTOTITLE](/actions/using-workflows/reusing-workflows).
29
23
@@ -33,11 +27,11 @@ First, we need to build with both artifact attestations and a reusable workflow.
33
27
34
28
### Building with a reusable workflow
35
29
36
-
If you aren't already using reusable workflows to build your software, you'll need to take your build steps and move them into a reusable workflow. For more information on how to write and call a reusable workflow, see [AUTOTITLE](/actions/using-workflows/reusing-workflows).
30
+
If you aren't already using reusable workflows to build your software, you'll need to take your build steps and move them into a reusable workflow.
37
31
38
32
### Building with artifact attestations
39
33
40
-
The reusable workflow you use to build your software must also generate artifact attestations to establish build provenance. For more information, see [AUTOTITLE](/actions/security-guides/using-artifact-attestations-to-establish-provenance-for-builds).
34
+
The reusable workflow you use to build your software must also generate artifact attestations to establish build provenance.
41
35
42
36
When you use a reusable workflow to generate artifact attestations, both the calling workflow and the reusable workflow need to have the following permissions.
43
37
@@ -75,7 +69,3 @@ Or if you want to specify the exact workflow:
You are now building and signing your artifacts in a reusable workflow, which can provide the isolation required by SLSA v1.0 Build Level 3. You can verify artifacts are built with known, vetted build instructions by requiring your artifact was built with a specific workflow, reusable or not.
Copy file name to clipboardExpand all lines: content/actions/how-tos/security-for-github-actions/using-artifact-attestations/using-artifact-attestations-to-establish-provenance-for-builds.md
+5-43Lines changed: 5 additions & 43 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -5,51 +5,15 @@ product: '{% data reusables.gated-features.attestations %}'
{% data reusables.actions.about-artifact-attestations %}
17
-
18
-
### About SLSA levels for artifact attestations
19
-
20
-
The SLSA framework is an industry standard used to evaluate supply chain security. It is organized into levels. Each level represents an increasing degree of security and trustworthiness for a software supply chain. Artifact attestations by itself provides SLSA v1.0 Build Level 2.
21
-
22
-
This provides a link between your artifact and its build instructions, but you can take this a step further by requiring builds make use of known, vetted build instructions. A great way to do this is to have your build take place in a reusable workflow that many repositories across your organization share. Reusable workflows can provide isolation between the build process and the calling workflow, to meet SLSA v1.0 Build Level 3. For more information, see [AUTOTITLE](/actions/security-guides/using-artifact-attestations-and-reusable-workflows-to-achieve-slsa-v1-build-level-3).
23
-
24
-
For more information on SLSA levels, see [SLSA Security Levels](https://slsa.dev/spec/v1.0/levels).
25
-
26
-
### About using Sigstore for artifact attestations
27
-
28
-
To generate artifact attestations, {% data variables.product.prodname_dotcom %} uses Sigstore, which is an open source project that offers a comprehensive solution for signing and verifying software artifacts via attestations.
29
-
30
-
**Public repositories** that generate artifact attestations use the [Sigstore Public Good Instance](https://openssf.org/blog/2023/10/03/running-sigstore-as-a-managed-service-a-tour-of-sigstores-public-good-instance/). A copy of the generated Sigstore bundle is stored with GitHub and is also written to an immutable transparency log that is publicly readable on the internet.
31
-
32
-
**Private repositories** that generate artifact attestations use GitHub's Sigstore instance. GitHub's Sigstore instance uses the same codebase as the Sigstore Public Good Instance, but it does not have a transparency log and only federates with {% data variables.product.prodname_actions %}.
33
-
34
-
### What to attest
35
-
36
-
Generating attestations alone doesn't provide any security benefit, the attestations must be verified for the benefit to be realized. Here are some guidelines for how to think about what to sign and how often:
37
-
38
-
You should sign:
39
-
40
-
* Software you are releasing that you expect people to run `gh attestation verify ...` on.
41
-
* Binaries people will run, packages people will download, or manifests that include hashes of detailed contents.
42
-
43
-
You should **not** sign:
44
-
45
-
* Frequent builds that are just for automated testing.
46
-
* Individual files like source code, documentation files, or embedded images.
47
-
48
-
### About verifying artifact attestations
49
-
50
-
If you consume software that publishes artifact attestations, you can use the {% data variables.product.prodname_cli %} to verify those attestations. Because the attestations give you information about where and how software was built, you can use that information to create and enforce security policies that elevate your supply chain security. For more information, see [Verifying artifact attestations with the {% data variables.product.prodname_cli %}](#verifying-artifact-attestations-with-the-github-cli).
51
-
52
-
>[!WARNING]It is important to remember that artifact attestations are _not_ a guarantee that an artifact is secure. Instead, artifact attestations link you to the source code and the build instructions that produced them. It is up to you to define your policy criteria, evaluate that policy by evaluating the content, and make an informed risk decision when you are consuming software.
16
+
Before you start generating artifact attestations, you need to understand what they are and when you should use them. See [AUTOTITLE](/actions/concepts/security/artifact-attestations).
53
17
54
18
## Generating artifact attestations for your builds
{% data reusables.actions.lifecycle-of-attestations %}
189
+
## Next steps
228
190
229
-
To find and delete attestations, see [AUTOTITLE](/actions/how-tos/security-for-github-actions/using-artifact-attestations/managing-the-lifecycle-of-artifact-attestations).
191
+
To keep your attestations relevant and manageable, you should delete attestations that are no longer needed. See [AUTOTITLE](/actions/how-tos/security-for-github-actions/using-artifact-attestations/managing-the-lifecycle-of-artifact-attestations).
Copy file name to clipboardExpand all lines: content/actions/how-tos/security-for-github-actions/using-artifact-attestations/verifying-attestations-offline.md
+3-14Lines changed: 3 additions & 14 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,8 +1,7 @@
1
1
---
2
2
title: Verifying attestations offline
3
-
shortTitle: Verifying attestations offline
3
+
shortTitle: Verify attestations offline
4
4
intro: Artifact attestations can be verified without an internet connection.
Artifact attestations are a great way to create unfalsifiable provenance and integrity guarantees for the software you build.
21
-
22
-
By default, attestations are stored in GitHub's attestation API, which `gh attestation verify` will query when you go to verify your attestation. That command will also contact GitHub's servers to check for updated key material to use to verify the attestation.
23
-
24
-
This command can work without internet connectivity, but you need to supply the attestation bundle and the key material in the trusted root manually.
25
-
26
-
Before starting this guide, you should be building with generating artifact attestations. See [AUTOTITLE](/actions/security-guides/using-artifact-attestations-to-establish-provenance-for-builds).
19
+
Before starting this guide, you should be generating artifact attestations for your builds. See [AUTOTITLE](/actions/security-guides/using-artifact-attestations-to-establish-provenance-for-builds).
27
20
28
21
## Step 1: Download attestation bundle
29
22
@@ -75,7 +68,3 @@ You can then perform offline verification with the following command:
You are now verifying artifact attestations in an offline environment. We recommend importing a new trusted root whenever you are introducing new signed artifacts to your offline environment.
Copy file name to clipboardExpand all lines: data/reusables/actions/about-artifact-attestations.md
+2-2Lines changed: 2 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -2,8 +2,8 @@ Artifact attestations enable you to create unfalsifiable provenance and integrit
2
2
3
3
When you generate artifact attestations with your software, you create cryptographically signed claims that establish your build's provenance and include the following information:
4
4
5
-
* A link to the workflow associated with the artifact.
6
-
* The repository, organization, environment, commit SHA, and triggering event for the artifact.
5
+
* A link to the workflow associated with the artifact
6
+
* The repository, organization, environment, commit SHA, and triggering event for the artifact
7
7
* Other information from the OIDC token used to establish provenance. For more information, see [AUTOTITLE](/actions/deployment/security-hardening-your-deployments/about-security-hardening-with-openid-connect).
8
8
9
9
You can also generate artifact attestations that include an associated software bill of materials (SBOM). Associating your builds with a list of the open source dependencies used in them provides transparency and enables consumers to comply with data protection standards.
0 commit comments