Skip to content

Commit 45c42cf

Browse files
authored
EDI-ify artifact attestations content (#56801)
1 parent 39a2400 commit 45c42cf

File tree

6 files changed

+71
-75
lines changed

6 files changed

+71
-75
lines changed
Lines changed: 55 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,55 @@
1+
---
2+
title: Artifact attestations
3+
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).

content/actions/concepts/security/index.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,8 @@ children:
1010
- /secrets
1111
- /github_token
1212
- /openid-connect
13+
- /artifact-attestations
1314
- /script-injections
1415
- /compromised-runners
1516
- /kubernetes-admissions-controller
1617
---
17-

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

Lines changed: 5 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,7 @@
11
---
22
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
44
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.
5-
type: quick_start
65
topics:
76
- Actions
87
- Security
@@ -15,15 +14,10 @@ redirect_from:
1514
- /actions/security-for-github-actions/using-artifact-attestations/using-artifact-attestations-and-reusable-workflows-to-achieve-slsa-v1-build-level-3
1615
---
1716

18-
## Introduction
19-
20-
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
2518

2619
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).
2721
* Generating artifact attestations. See [AUTOTITLE](/actions/security-guides/using-artifact-attestations-to-establish-provenance-for-builds).
2822
* Writing and using reusable workflows. See [AUTOTITLE](/actions/using-workflows/reusing-workflows).
2923

@@ -33,11 +27,11 @@ First, we need to build with both artifact attestations and a reusable workflow.
3327

3428
### Building with a reusable workflow
3529

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

3832
### Building with artifact attestations
3933

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

4236
When you use a reusable workflow to generate artifact attestations, both the calling workflow and the reusable workflow need to have the following permissions.
4337

@@ -75,7 +69,3 @@ Or if you want to specify the exact workflow:
7569
```bash copy
7670
gh attestation verify -o ORGANIZATION_NAME --signer-workflow REUSABLE_ORGANIZATION_NAME/REUSABLE_REPOSITORY_NAME/.github/workflows/reusable.yml PATH/TO/YOUR/BUILD/ARTIFACT-BINARY
7771
```
78-
79-
## Conclusion
80-
81-
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.

content/actions/how-tos/security-for-github-actions/using-artifact-attestations/using-artifact-attestations-to-establish-provenance-for-builds.md

Lines changed: 5 additions & 43 deletions
Original file line numberDiff line numberDiff line change
@@ -5,51 +5,15 @@ product: '{% data reusables.gated-features.attestations %}'
55
versions:
66
fpt: '*'
77
ghec: '*'
8-
shortTitle: Artifact attestations
8+
shortTitle: Use artifact attestations
99
redirect_from:
1010
- /actions/security-guides/using-artifact-attestations-to-establish-provenance-for-builds
1111
- /actions/security-for-github-actions/using-artifact-attestations/using-artifact-attestations-to-establish-provenance-for-builds
1212
---
1313

14-
## About artifact attestations
14+
## Prerequisites
1515

16-
{% 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).
5317

5418
## Generating artifact attestations for your builds
5519

@@ -222,8 +186,6 @@ gh attestation verify PATH/TO/YOUR/BUILD/ARTIFACT-BINARY \
222186
--jq '.[].verificationResult.statement.predicate'
223187
```
224188

225-
## Managing the lifecycle of attestations
226-
227-
{% data reusables.actions.lifecycle-of-attestations %}
189+
## Next steps
228190

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

content/actions/how-tos/security-for-github-actions/using-artifact-attestations/verifying-attestations-offline.md

Lines changed: 3 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,7 @@
11
---
22
title: Verifying attestations offline
3-
shortTitle: Verifying attestations offline
3+
shortTitle: Verify attestations offline
44
intro: Artifact attestations can be verified without an internet connection.
5-
type: quick_start
65
topics:
76
- Actions
87
- Security
@@ -15,15 +14,9 @@ redirect_from:
1514
- /actions/security-for-github-actions/using-artifact-attestations/verifying-attestations-offline
1615
---
1716

18-
## Introduction
17+
## Prerequisites
1918

20-
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).
2720

2821
## Step 1: Download attestation bundle
2922

@@ -75,7 +68,3 @@ You can then perform offline verification with the following command:
7568
```bash copy
7669
gh attestation verify PATH/TO/YOUR/BUILD/ARTIFACT-BINARY -R ORGANIZATION_NAME/REPOSITORY_NAME --bundle sha256:ae57936def59bc4c75edd3a837d89bcefc6d3a5e31d55a6fa7a71624f92c3c3b.jsonl --custom-trusted-root trusted_root.jsonl
7770
```
78-
79-
## Conclusion
80-
81-
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.

data/reusables/actions/about-artifact-attestations.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@ Artifact attestations enable you to create unfalsifiable provenance and integrit
22

33
When you generate artifact attestations with your software, you create cryptographically signed claims that establish your build's provenance and include the following information:
44

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
77
* 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).
88

99
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

Comments
 (0)