Skip to content

Commit 643b8be

Browse files
committed
This adds SLSA build attestation to the DNSControl release workflow
* add SLSA generator call after release step * add SLSA info and verification doc * add SLSA badge to Readme * Fix attestation doc filename, limit digest generation to files below dist/
1 parent 97bbc80 commit 643b8be

File tree

3 files changed

+39
-0
lines changed

3 files changed

+39
-0
lines changed

.github/workflows/release_draft.yml

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,8 @@ on:
88

99
jobs:
1010
draft_release:
11+
outputs:
12+
hashes: ${{ steps.collect.outputs.hashes }}
1113
name: draft release
1214
runs-on: ubuntu-latest
1315
permissions:
@@ -61,3 +63,22 @@ jobs:
6163
args: release
6264
env:
6365
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
66+
67+
-
68+
name: Collect artifact digests
69+
id: collect
70+
run: |
71+
echo "generating digests for artifacts"
72+
echo "hashes=$(find dist -type f \( -name \*dnscontrol\* -o -name \*checksums.txt \) -exec sha256sum {} \; | base64 -w0)" >> "$GITHUB_OUTPUT"
73+
74+
slsa:
75+
needs: [draft_release]
76+
permissions:
77+
actions: read
78+
id-token: write
79+
contents: write
80+
uses: slsa-framework/slsa-github-generator/.github/workflows/[email protected]
81+
with:
82+
base64-subjects: ${{ needs.draft_release.outputs.hashes }}
83+
upload-assets: true
84+
draft-release: true

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
[![StackExchange/dnscontrol/build](https://github.com/StackExchange/dnscontrol/actions/workflows/pr_build.yml/badge.svg)](https://github.com/StackExchange/dnscontrol/actions/workflows/pr_build.yml)
44
[![Google Group](https://img.shields.io/badge/google%20group-chat-green.svg)](https://groups.google.com/forum/#!forum/dnscontrol-discuss)
55
[![PkgGoDev](https://pkg.go.dev/badge/github.com/StackExchange/dnscontrol)](https://pkg.go.dev/github.com/StackExchange/dnscontrol/v4)
6+
[![SLSA 3](https://slsa.dev/images/gh-badge-level3.svg)](https://slsa.dev)
67

78
[DNSControl](https://docs.dnscontrol.org/) is a system
89
for maintaining DNS zones. It has two parts:

SECURITY.md

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,3 +13,20 @@ When a major version is incremented, we'll support the previous major version fo
1313
To report a vulnerability please [create a new GitHub "issue"](https://github.com/StackExchange/dnscontrol/issues/new/choose).
1414

1515
We will respond in a best-effort manner, usually within 1 week. We will communciate via the GitHub issue unless we need to communicate privately, in which case we'll arrange a way to communicate directly.
16+
17+
## Build Attestation
18+
19+
DNSControl uses GitHub Actions and workflows from the SLSA Framework to produce verifiable builds.
20+
21+
<!-- FIXME: version reference below -->
22+
23+
The [releases page](https://github.com/StackExchange/dnscontrol/releases) includes an attestation document (`multiple.intoto.jsonl`) in the list of files associated with each release since vFIXME. This file contains the signed attestation that can be used to verify the provenance of the files associated with each release.
24+
25+
The [SLSA verifier](https://github.com/slsa-framework/slsa-verifier) tool can be used to confirm the authenticity of DNSControl releases. To manually verify a downloaded build artifact and the `multiple.intoto.jsonl` file, use the `slsa-verifier` utility to confirm the artifact was signed:
26+
27+
```shell
28+
slsa-verifier verify-artifact dnscontrol_4.19.0_darwin_all.tar.gz \
29+
--provenance-path multiple.intoto.jsonl \
30+
--source-uri github.com/StackExchange/dnscontrol \
31+
--source-tag v4.20.0
32+
```

0 commit comments

Comments
 (0)