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
Copy file name to clipboardExpand all lines: README.md
+22-23Lines changed: 22 additions & 23 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,6 +1,6 @@
1
1
# s3cme
2
2
3
-
Sample Go app repo with test (on push) and release (on tag) pipelines optimized for software supply chain security (S3C). Includes Terraform setup for [OpenID Connect](https://openid.net/connect/) (IODC) in GCP with Artifact Registry, and KMS service configuration.
3
+
Sample Go app repo with test and release pipelines optimized for software supply chain security (S3C). Includes Terraform setup for Artifact Registry and KMS on GCP with [OpenID Connect](https://openid.net/connect/) (IODC), so no need for service account keys or GitHub secrets.
4
4
5
5

6
6
@@ -11,46 +11,45 @@ Sample Go app repo with test (on push) and release (on tag) pipelines optimized
11
11
12
12
What's in the included workflow pipelines:
13
13
14
-
* PR qualification (`on-push`):
15
-
* Source vulnerability scan using Trivy
16
-
* Sarif-formatted report for repo alerts
17
-
* Release (`on-tag`):
18
-
* Same test as on push
19
-
* Image build and registry push using [ko](https://github.com/ko-build/ko) with with SBOM generation
20
-
* Image vulnerability scan using Trivy with max severity checks
21
-
* Image signing using KMS key and attestation using cosign
22
-
* SLSA provenance generation for GitHub workflow
23
-
* SLSA provenance verification using cosign and CUE policy
24
-
* On schedule
14
+
*`on-push` - PR qualification
15
+
* Static code vulnerability scan using [trivy](https://github.com/aquasecurity/trivy)
16
+
* Repo security alerts based on sarif reports CodeQL scans
17
+
*`on-tag` Release (container image build)
18
+
* Image build/push using [ko](https://github.com/ko-build/ko) (includes SBOM generation)
19
+
* Image vulnerability scan using [trivy](https://github.com/aquasecurity/trivy) with max severity checks parameter
20
+
* Image signing using [KMS key](https://cloud.google.com/security-key-management) and attestation using [cosign](https://github.com/sigstore/cosign)
21
+
* SLSA provenance generation using [slsa-github-generator](https://github.com/slsa-framework/slsa-github-generator)
22
+
* SLSA provenance verification using [cosign](https://github.com/sigstore/cosign) based on CUE policy
23
+
*`on-schedule` - Repo hygiene
25
24
* Semantic code analysis using CodeQL (every 4 hours)
26
25
27
26
## Repo Usage
28
27
29
-
Use this template to create a new repo (green button)
28
+
Use this template to create a new repo (click the green button and follow the wizard)
30
29
31
30

32
31
33
-
Clone the new repo locally and navigate into it
32
+
When done, clone your new repo locally, and navigate into it
Initialize your new repo. This will update all the references to your newly clone GitHub repository and initialize the Terraform setup
39
+
Initialize your new repo. This will update all the references to your newly clone GitHub repository and initialize the Terraform setup.
41
40
42
41
```shell
43
42
tools/init-repo
44
43
terraform -chdir=./setup init
45
44
```
46
45
47
-
Apply the Terraform configuration to create GCP resources (KMS ring/key, Artifact Registry repo, Workload Identity Pool and the Service Account)
46
+
Apply the Terraform configuration to create GCP resources (KMS ring/key, Artifact Registry repo, Workload Identity Pool and the Service Account).
48
47
49
48
```shell
50
49
terraform -chdir=./setup apply
51
50
```
52
51
53
-
When promoted, provide
52
+
When promoted, provide:
54
53
55
54
*`project_id` - GCP project ID
56
55
*`location` - GCP region (e.g. `us-west1`)
@@ -59,7 +58,7 @@ When promoted, provide
59
58
60
59
When completed, Terraform will output the configuration values.
61
60
62
-
Update `conf` job in `.github/workflows/on-tag.yaml` file to the values output by Terraform:
61
+
Update `env` portion of the `conf` job in `.github/workflows/on-tag.yaml` file to the values output by Terraform:
63
62
64
63
*`IMG_NAME`
65
64
*`KMS_KEY`
@@ -81,7 +80,7 @@ git push --all
81
80
82
81
### Trigger release pipeline
83
82
84
-
The canonical version is stored in [.version](.version) file. Feel free to edit it (by default: `v0.0.1`). When done, trigger the release pipeline:
83
+
The canonical version of the entire repo is stored in [.version](.version) file. Feel free to edit it (by default: `v0.0.1`). When done, trigger the release pipeline:
85
84
86
85
> If you did edit the version, make sure to commit and push that change to the repo first. You can also use `make tag` to automate the entire process.
87
86
@@ -93,7 +92,7 @@ git push origin $VERSION
93
92
94
93
### Monitor the pipeline
95
94
96
-
Navigate to `/actions` in your repo to see the status of that release pipeline. Wait until all steps (aka jobs) competed (green).
95
+
Navigate to `/actions` in your repo to see the status of that release pipeline. Wait until all steps (aka jobs) have completed (green).
97
96
98
97
> If any steps fail, click on them to see the cause. Fix it, commit/push changes to the repo, and tag a new release to re-trigger the pipeline again.
99
98
@@ -243,7 +242,7 @@ attestation keyless validation failed for authority authority-0 for us-west1-doc
243
242
no matching attestations:
244
243
```
245
244
246
-
This demonstrates how the policy-controller admission controller enforces SLSA provenance policy in your cluster based on verifiable supply-chain metadata from cosign.
245
+
This demonstrates how the policy-controller admission controller enforces [SLSA provenance](https://slsa.dev/provenance/v0.2) policy in your cluster based on verifiable supply-chain metadata from [cosign](https://github.com/sigstore/cosign).
0 commit comments