Skip to content

Commit 48688a2

Browse files
committed
Update workflows and documentation to closely track templig.
Signed-off-by: Alexander Adam <alphaone23@gmail.com>
1 parent 38f3d4b commit 48688a2

8 files changed

Lines changed: 106 additions & 31 deletions

File tree

.github/workflows/codeql.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -94,8 +94,8 @@ jobs:
9494
shell: bash
9595
run: |
9696
echo 'If you are using a "manual" build mode for one or more of the' \
97-
'languages you are analyzing, replace this with the commands to build' \
98-
'your code, for example:'
97+
'languages you are analyzing, replace this with the commands to build' \
98+
'your code, for example:'
9999
echo ' make bootstrap'
100100
echo ' make release'
101101
exit 1

.github/workflows/compliance.yml

Lines changed: 16 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -57,13 +57,13 @@ jobs:
5757

5858
- name: Determine pushed commits
5959
id: range
60+
env:
61+
# Use GitHub-provided SHAs to build the range for this push
62+
BEFORE: ${{ github.event.before }}
63+
AFTER: ${{ github.sha }}
6064
run: |
6165
set -euo pipefail
6266
63-
# Use GitHub-provided SHAs to build the range for this push
64-
BEFORE="${{ github.event.before }}"
65-
AFTER="${{ github.sha }}"
66-
6767
if [ "$BEFORE" = "0000000000000000000000000000000000000000" ]
6868
then
6969
# New branch or force push without previous SHA
@@ -73,6 +73,9 @@ jobs:
7373
fi
7474
7575
- name: Check for Signed-off-by
76+
env:
77+
GH_ACTOR: ${{ github.actor }}
78+
GH_NAME: ${{ github.event.pusher.name }}
7679
run: |
7780
set -euo pipefail
7881
missing=""
@@ -101,8 +104,8 @@ jobs:
101104
102105
echo "Committer name: $committer_name"
103106
echo "Committer email: $committer_email"
104-
echo "github.actor: ${{ github.actor }}"
105-
echo "github.event.pusher.name: ${{ github.event.pusher.name }}"
107+
echo "github.actor: $GH_ACTOR"
108+
echo "github.event.pusher.name: $GH_NAME"
106109
fi
107110
done < shas.txt
108111
@@ -145,6 +148,9 @@ jobs:
145148
| jq -r '.[].sha' > shas.txt
146149
147150
- name: Check for Signed-off-by
151+
env:
152+
GH_ACTOR: ${{ github.actor }}
153+
GH_NAME: ${{ github.event.pull_request.user.login}}
148154
run: |
149155
set -euo pipefail
150156
missing=""
@@ -171,10 +177,10 @@ jobs:
171177
echo "Commit $sha missing Signed-off-by"
172178
missing="true"
173179
174-
echo "Committer name: $committer_name"
175-
echo "Committer email: $committer_email"
176-
echo "github.actor: ${{ github.actor }}"
177-
echo "github.event.pusher.name: ${{ github.event.pusher.name }}"
180+
echo "Committer name: $committer_name"
181+
echo "Committer email: $committer_email"
182+
echo "github.actor: $GH_ACTOR"
183+
echo "github.event.pull_request.user.login: $GH_NAME"
178184
fi
179185
done < shas.txt
180186

.github/workflows/dependency-review.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,5 +27,6 @@ jobs:
2727

2828
- name: 'Checkout Repository'
2929
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
30+
3031
- name: 'Dependency Review'
3132
uses: actions/dependency-review-action@2031cfc080254a8a887f58cffee85186f0e49e48 # v4.9.0

.github/workflows/release.yml

Lines changed: 14 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -33,23 +33,29 @@ jobs:
3333

3434
- name: Generate source archive
3535
shell: bash
36+
env:
37+
TAG_NAME: ${{ github.event.release.tag_name }}
3638
run: |
3739
set -euo pipefail
3840
39-
TAG=`echo "${{ github.event.release.tag_name }}" | sed 's/\//-/g'`
41+
PROJECT_NAME=`go list -m | sed -r 's/(.*\/)*(.+)/\2/'`
42+
TAG=`echo "$TAG_NAME" | sed 's/\//-/g'`
4043
git archive \
41-
--format=tar.gz \
42-
--prefix="dmorph-src-${TAG}/" \
43-
--output="dmorph-src-${TAG}.tar.gz" \
44-
"${{ github.event.release.tag_name }}"
44+
--format=tar.gz \
45+
--prefix="${PROJECT_NAME}-src-${TAG}/" \
46+
--output="${PROJECT_NAME}-src-${TAG}.tar.gz" \
47+
"$TAG_NAME"
4548
4649
- name: Upload Release (via GitHub CLI)
4750
env:
4851
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
52+
TAG_NAME: ${{ github.event.release.tag_name }}
4953
shell: bash
5054
run: |
5155
set -euo pipefail
52-
gh release upload "${{ github.event.release.tag_name }}" dmorph-src-*.tar.gz --clobber
56+
57+
PROJECT_NAME=`go list -m | sed -r 's/(.*\/)*(.+)/\2/'`
58+
gh release upload "$TAG_NAME" ${PROJECT_NAME}-src-*.tar.gz --clobber
5359
5460
ChecksumReleaseAssets:
5561
needs: Build
@@ -71,13 +77,14 @@ jobs:
7177
- name: Download all release assets via GitHub CLI
7278
env:
7379
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
80+
TAG_NAME: ${{ github.event.release.tag_name }}
7481
run: |
7582
set -euo pipefail
7683
7784
mkdir -p release-assets
7885
cd release-assets
7986
# gets all assets of the release
80-
gh release download "${{ github.event.release.tag_name }}" --clobber
87+
gh release download "$TAG_NAME" --clobber
8188
echo "Downloaded assets:"
8289
ls -lah
8390

.github/workflows/security.yml

Lines changed: 12 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ jobs:
1818
GolangCI:
1919
runs-on: ubuntu-latest
2020
permissions:
21-
contents: read
21+
contents: read
2222
security-events: write
2323
steps:
2424
- name: Harden Runner
@@ -35,7 +35,7 @@ jobs:
3535
uses: golangci/golangci-lint-action@1e7e51e771db61008b38414a730f564565cf7c20 # v9.2.0
3636
with:
3737
version: latest
38-
args: --timeout=5m --output.sarif.path=golangci-lint-results.sarif --output.text.path=stdout
38+
args: --timeout=5m --output.sarif.path=golangci-lint-results.sarif --output.text.path=stdout
3939

4040
- name: Upload golangci-lint results to GitHub Security tab
4141
uses: github/codeql-action/upload-sarif@95e58e9a2cdfd71adc6e0353d5c52f41a045d225 # v4.35.2
@@ -45,7 +45,7 @@ jobs:
4545
TrivyCode:
4646
runs-on: ubuntu-latest
4747
permissions:
48-
contents: read
48+
contents: read
4949
security-events: write
5050
steps:
5151
- name: Harden Runner
@@ -59,11 +59,11 @@ jobs:
5959
- name: Run Trivy vulnerability scanner in fs mode
6060
uses: aquasecurity/trivy-action@57a97c7e7821a5776cebc9bb87c984fa69cba8f1 # 0.35.0
6161
with:
62-
scan-type: 'fs'
62+
scan-type: 'fs'
6363
ignore-unfixed: true
64-
format: 'sarif'
65-
output: 'trivy-results.sarif'
66-
severity: 'CRITICAL,HIGH'
64+
format: 'sarif'
65+
output: 'trivy-results.sarif'
66+
severity: 'CRITICAL,HIGH'
6767

6868
- name: Upload Trivy scan results to GitHub Security tab
6969
uses: github/codeql-action/upload-sarif@95e58e9a2cdfd71adc6e0353d5c52f41a045d225 # v4.35.2
@@ -77,7 +77,7 @@ jobs:
7777
- "stable"
7878
runs-on: ubuntu-latest
7979
permissions:
80-
contents: read
80+
contents: read
8181
security-events: write
8282
steps:
8383
- name: Harden Runner
@@ -89,13 +89,14 @@ jobs:
8989
uses: golang/govulncheck-action@b625fbe08f3bccbe446d94fbf87fcc875a4f50ee # v1.0.4
9090
with:
9191
go-version-input: ${{matrix.go-version}}
92-
output-format: sarif
93-
output-file: govulncheck-results.sarif
92+
output-format: sarif
93+
output-file: govulncheck-results.sarif
9494

9595
- name: Print Sarif
9696
id: printSarif
97-
run: |
97+
run: |
9898
cat govulncheck-results.sarif
99+
99100
if grep results govulncheck-results.sarif
100101
then
101102
echo "hasResults=true" >> $GITHUB_OUTPUT

.github/workflows/test.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -148,7 +148,7 @@ jobs:
148148
#
149149
# - name: Upload fuzz failure seed corpus as run artifact
150150
# if: failure()
151-
# uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2
151+
# uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
152152
# with:
153153
# name: testdata
154154
# path: testdata

GOVERNANCE.md

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,3 +58,34 @@ stated.
5858
The BDFL may alternatively decide to move to a Steering Committee governance
5959
model, in which case this document must be replaced with a new description of
6060
roles and responsibilities.
61+
62+
63+
Access to Sensitive Resources
64+
-----------------------------
65+
66+
The following project members have access to sensitive resources (GitHub
67+
Secrets, Repository Settings, Release Keys):
68+
69+
* Alexander Adam (@AlphaOne1) - BDFL / Primary Maintainer
70+
71+
Currently, no other contributors have administrative access to the
72+
build infrastructure or cryptographic keys.
73+
74+
75+
Project Continuity
76+
------------------
77+
78+
To ensure the project's continuity, the following measures are taken:
79+
80+
*GitHub Successor*: A designated successor has been appointed in the GitHub
81+
account settings to take over repository management if the primary maintainer is
82+
incapacitated.
83+
84+
<!-- Currently this is not implemented, uncomment, if is indeed enacted:
85+
*Access Recovery*: Recovery keys for the repository and build infrastructure are
86+
stored in a secure digital vault with emergency access enabled for a trusted
87+
party.
88+
-->
89+
90+
*Forking*: As a fallback, the MPL-2.0 license ensures that the community can
91+
fork and continue the project at any time.

README.md

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,18 @@
55
<!-- markdownlint-disable MD013 MD033 MD041 -->
66
<p align="center">
77
<img src="dmorph_logo.svg" width="40%" alt="Logo"><br>
8+
<a href="https://github.com/AlphaOne1/dmorph/blob/HEAD/go.mod"
9+
rel="external noopener noreferrer"
10+
target="_blank">
11+
<img src="https://img.shields.io/github/go-mod/go-version/AlphaOne1/dmorph"
12+
alt="Go Version">
13+
</a>
14+
<a href="https://github.com/AlphaOne1/dmorph/releases"
15+
rel="external noopener noreferrer"
16+
target="_blank">
17+
<img src="https://img.shields.io/github/v/release/AlphaOne1/dmorph"
18+
alt="Latest Release">
19+
</a>
820
<a href="https://github.com/AlphaOne1/dmorph/actions/workflows/test.yml"
921
rel="external noopener noreferrer"
1022
target="_blank">
@@ -59,6 +71,12 @@
5971
<img src="https://api.reuse.software/badge/github.com/AlphaOne1/dmorph"
6072
alt="REUSE compliance">
6173
</a>
74+
<!-- <a href="https://slsa.dev"
75+
rel="external noopener noreferrer"
76+
target="_blank">
77+
<img src="https://slsa.dev/images/gh-badge-level3.svg"
78+
alt="SLSA Level 3">
79+
</a> -->
6280
<a href="https://app.fossa.com/projects/git%2Bgithub.com%2FAlphaOne1%2Fdmorph?ref=badge_shield&issueType=license"
6381
rel="external noopener noreferrer"
6482
target="_blank">
@@ -113,6 +131,17 @@ To install *DMorph*, you can use the following command:
113131
$ go get github.com/AlphaOne1/dmorph
114132
```
115133

134+
<!--Builds are secured with SLSA Level 3 provenance via slsa-framework/slsa-github-generator.
135+
The downloaded source archive together with the provenance file `multiple.intoto.jsonl`
136+
can be verified using the [slsa-verifier](https://github.com/slsa-framework/slsa-verifier/)
137+
(replace the `<VERSION>` with the one you actually downloaded):
138+
139+
```bash
140+
$ slsa-verifier verify-artifact dmorph-src-v<VERSION>.tar.gz \
141+
--provenance-path multiple.intoto.jsonl \
142+
--source-uri github.com/AlphaOne1/dmorph \
143+
--source-tag v<VERSION>
144+
```-->
116145

117146
Getting Started
118147
---------------

0 commit comments

Comments
 (0)