Skip to content

Commit 1fcfd66

Browse files
zachyonashdependabot[bot]kodiakhq[bot]bradbeckZYonash
authored
SLSA documentation (#397)
* Bump github/codeql-action from 2.1.38 to 2.1.39 (#392) Bumps [github/codeql-action](https://github.com/github/codeql-action) from 2.1.38 to 2.1.39. - [Release notes](https://github.com/github/codeql-action/releases) - [Changelog](https://github.com/github/codeql-action/blob/main/CHANGELOG.md) - [Commits](github/codeql-action@515828d...a34ca99) --- updated-dependencies: - dependency-name: github/codeql-action dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <[email protected]> Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com> Signed-off-by: ZYonash <[email protected]> * Update git-clone sha256 (#394) The git-clone task was updated in place. This PR updates the sha256 used by vendorme. Signed-off-by: Brad Beck <[email protected]> Signed-off-by: Brad Beck <[email protected]> Signed-off-by: ZYonash <[email protected]> * SLSA documentation This change adds documentation explaining how FRSCA is achieving various levels of SLSA compliance. Ref #231 Signed-off-by: ZYonash <[email protected]> * Workaround for git dubious ownership error (#398) * Workaround for git dubious ownership error Workaround for the following error in the docs workflow: ``` fatal: detected dubious ownership in repository at '/github/workspace' To add an exception for this directory, call: git config --global --add safe.directory /github/workspace ``` Signed-off-by: Brad Beck <[email protected]> * Try new version of shalzz/zola-deploy-action Signed-off-by: Brad Beck <[email protected]> --------- Signed-off-by: Brad Beck <[email protected]> Signed-off-by: ZYonash <[email protected]> * Bump github/codeql-action from 2.1.39 to 2.2.1 (#395) Bumps [github/codeql-action](https://github.com/github/codeql-action) from 2.1.39 to 2.2.1. - [Release notes](https://github.com/github/codeql-action/releases) - [Changelog](https://github.com/github/codeql-action/blob/main/CHANGELOG.md) - [Commits](github/codeql-action@a34ca99...3ebbd71) --- updated-dependencies: - dependency-name: github/codeql-action dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com> Signed-off-by: ZYonash <[email protected]> * This commit fixes some of the wording and styling of the docs, and should fix the build error. Signed-off-by: ZYonash <[email protected]> * Fixed some linting issues. Signed-off-by: ZYonash <[email protected]> * Revert "Fixed some linting issues." This reverts commit d286ca1. Signed-off-by: ZYonash <[email protected]> * Removed unwanted changes to this PR. Fixed linting issues. Signed-off-by: ZYonash <[email protected]> --------- Signed-off-by: dependabot[bot] <[email protected]> Signed-off-by: ZYonash <[email protected]> Signed-off-by: Brad Beck <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com> Co-authored-by: Brad Beck <[email protected]> Co-authored-by: ZYonash <[email protected]>
1 parent d1c7b6c commit 1fcfd66

File tree

2 files changed

+166
-0
lines changed

2 files changed

+166
-0
lines changed

docs/content/docs/slsa/_index.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
+++
2+
title = "SLSA"
3+
description = "Read how FRSCA is meeting various necessary requirements of SLSA levels 1 through 3."
4+
date = 2023-02-06T18:00:00+00:00
5+
updated = 2023-02-06T18:00:00+00:00
6+
template = "docs/section.html"
7+
sort_by = "weight"
8+
weight = 4
9+
draft = false
10+
+++

docs/content/docs/slsa/frsca-slsa.md

Lines changed: 156 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,156 @@
1+
+++
2+
title = "How FRSCA is meeting SLSA levels 1-3"
3+
description = "A document describing how FRSCA is meeting SLSA compliance, specifically levels 1-3"
4+
date = 2023-02-07T08:20:00+00:00
5+
updated = 2023-02-07T08:20:00+00:00
6+
draft = false
7+
weight = 20
8+
sort_by = "weight"
9+
template = "docs/page.html"
10+
11+
[extra]
12+
toc = true
13+
top = false
14+
+++
15+
16+
## Reminder on SLSA levels
17+
18+
SLSA levels at a high level are as follows (table from
19+
[https://slsa.dev/spec/v0.1/levels#summary-of-levels](https://slsa.dev/spec/v0.1/levels#summary-of-levels)):
20+
21+
| **Level** | **Description** | **Example** |
22+
| --------- | -------------------------------------- | ----------------------------------------------------- |
23+
| 1 | Documentation of the build process | Unsigned provenance |
24+
| 2 | Tamper resistance of the build service | Hosted source/build, signed provenance |
25+
| 3 | Extra resistance to specific threats | Security controls on host, non-falsifiable provenance |
26+
| 4 | Highest levels of confidence and trust | Two-party review + hermetic builds |
27+
28+
The full requirements table can be found here:
29+
30+
[Requirements](https://slsa.dev/spec/v0.1/requirements#summary-table)
31+
32+
## sample-pipeline
33+
34+
```other
35+
frsca/examples/sample-pipeline
36+
```
37+
38+
For the purposes of this document, we're going to be comparing SLSA requirements
39+
to what we are deploying via the sample-pipeline. Please read
40+
`frsca/examples/sample-pipeline/README.md` for information on setting up FRSCA
41+
and the sample pipeline.
42+
43+
# SLSA 1 Requirements
44+
45+
1. Build -
46+
[Scripted build](https://slsa.dev/spec/v0.1/requirements#scripted-build)
47+
****
48+
2. Provenance - [Available](https://slsa.dev/spec/v0.1/requirements#available)
49+
50+
51+
`sample-pipeline` meets both of these requirements. The build is scripted, which
52+
is evident in following individual steps from the `Makefile` down through the
53+
various shell scripts which setup the FRSCA environment and trigger the build
54+
via Tekton Pipelines.
55+
56+
Because we're using Tekton Chains in conjunction with Tekton Pipelines,
57+
provenance is created and available, satisfying the last requirement of SLSA 1.
58+
59+
To prove, once the pipeline completes:
60+
61+
```bash
62+
> crane ls "$(echo -n ${IMAGE_URL} | sed 's|:[^/]*$||')"
63+
64+
0066d00de427d12b9a14e56f02f302031d9c40f3
65+
sha256-e6dc8ea1ff666893462b64d997d496af8e69e905f2eeaf2ab7ec1fd565921d46.att
66+
sha256-e6dc8ea1ff666893462b64d997d496af8e69e905f2eeaf2ab7ec1fd565921d46.sbom
67+
sha256-e6dc8ea1ff666893462b64d997d496af8e69e905f2eeaf2ab7ec1fd565921d46.sig
68+
```
69+
70+
# SLSA 2 Requirements
71+
72+
1. Source -
73+
[Version controlled](https://slsa.dev/spec/v0.1/requirements#version-controlled)
74+
\*
75+
2. Build -
76+
[Build service](https://slsa.dev/spec/v0.1/requirements#build-service)
77+
3. Provenance -
78+
[Authenticated](https://slsa.dev/spec/v0.1/requirements#authenticated)
79+
4. Provenance -
80+
[Service generated](https://slsa.dev/spec/v0.1/requirements#service-generated)
81+
82+
83+
SLSA 2 introduces four new requirements in addition to the requirements of SLSA
84+
1, all of which are being met by this sample pipeline.
85+
86+
1. In this example, the original source code is version controlled.
87+
88+
- It is up to the consumer of FRSCA to ensure they are following proper
89+
source requirements.
90+
91+
1. The build is being performed within a TaskRun in a Tekton Pipelines
92+
PipelineRun.
93+
1. Provenance is not ony available, but it is authenticated.
94+
95+
```bash
96+
> cosign verify --key k8s://tekton-chains/signing-secrets "${IMAGE_URL}"
97+
98+
Verification for ttl.sh/6b1d3c200c0fe4005da60bddc63873ef/example-sample:919eef3dd425318e9a65cb79b00ee323210ef070 --
99+
The following checks were performed on each of these signatures:
100+
- The cosign claims were validated
101+
- The signatures were verified against the specified public key
102+
103+
> cosign verify-attestation --type slsaprovenance --key k8s://tekton-chains/signing-secrets "${IMAGE_URL}"
104+
105+
Verification for ttl.sh/6b1d3c200c0fe4005da60bddc63873ef/example-sample:919eef3dd425318e9a65cb79b00ee323210ef070 --
106+
The following checks were performed on each of these signatures:
107+
- The cosign claims were validated
108+
- The signatures were verified against the specified public key
109+
```
110+
111+
1. Tekton Chains observes Tekton Pipelines TaskRuns outputting an OCI image and
112+
generates provenance directly from the data it obtains, so we're satisfying
113+
service generated requirements.
114+
115+
# SLSA 3 Requirements
116+
117+
1. Source -
118+
[Verified history](https://slsa.dev/spec/v0.1/requirements#verified-history)
119+
✅\*
120+
2. Source -
121+
[Retained indefinitely](https://slsa.dev/spec/v0.1/requirements#retained-indefinitely)
122+
(18 mo. for SLSA 3) ✅\*
123+
3. Build -
124+
[Build as code](https://slsa.dev/spec/v0.1/requirements#build-as-code) ✅
125+
4. Build -
126+
[Ephemeral environment](https://slsa.dev/spec/v0.1/requirements#ephemeral-environment)
127+
128+
5. Build - [Isolated](https://slsa.dev/spec/v0.1/requirements#isolated) ✅
129+
6. Provenance -
130+
[Non-falsifiable](https://slsa.dev/spec/v0.1/requirements#non-falsifiable)
131+
(in progress)
132+
133+
Requirements 1 & 2 are asterisked due to the lack of control the FRSCA platform
134+
has around the source code management platforms leveraged by the end user.
135+
136+
1. See above.
137+
2. See above.
138+
3. Every step in the end-to-end build process via Tekton is described as code.
139+
4. Tasks are executed within a Pod that is specifically tied to that particular
140+
TaskRun, and when the TaskRun is complete, the Pod is not reused.
141+
142+
```bash
143+
example-sample-pipeline-7mvgr-clone-repo-pod 0/1 Completed 0 44h
144+
example-sample-pipeline-7mvgr-build-and-push-image-pod 0/2 Completed 0 44h
145+
example-sample-pipeline-7mvgr-vulnerability-scan-pod 0/1 Completed 0 44h
146+
example-sample-pipeline-7mvgr-generate-bom-pod 0/2 Completed 0 44h
147+
example-sample-pipeline-7mvgr-deploy-to-cluster-pod 0/2 Completed 0 44h
148+
```
149+
150+
5. In the same vein, the build process within a PipelineRun is completely
151+
isolated from other PipelineRuns, and TaskRuns within a PipelineRun also do
152+
not share data between each other unless explicitly defined.
153+
6. Non-falsifiable provenance support by means of SPIFFE/SPIRE is currently in
154+
development and awaiting approval. See
155+
[TEP-89](https://github.com/tektoncd/community/blob/main/teps/0089-nonfalsifiable-provenance-support.md)
156+
for more information.

0 commit comments

Comments
 (0)