Skip to content

Commit 5d41b8a

Browse files
Jontifieduser
authored and
user
committed
Create verification script and github action
Create a script which verifies that a set of "locked down" files are not changed in commits that have not been signed. Create a separate file that specifies which files are locked down and another file which specifies all of the public key that are considered trusted. Create a github workflow that runs the script in the CI.
1 parent e6714d1 commit 5d41b8a

4 files changed

+707
-0
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
name: Verify lockfile signatures
2+
on:
3+
pull_request:
4+
paths:
5+
- .github/workflows/verify-locked-down-signatures.yml
6+
- Cargo.lock
7+
- gui/package-lock.json
8+
workflow_dispatch:
9+
jobs:
10+
verify-signatures:
11+
runs-on: ubuntu-latest
12+
steps:
13+
- uses: actions/checkout@v3
14+
with:
15+
ref: ${{ github.event.pull_request.head.sha }}
16+
- name: Verify signatures
17+
run: |
18+
commits=${{ github.event.pull_request.commits }}
19+
if [[ -n "$commits" ]]; then
20+
# Prepare enough depth for diffs with master
21+
git fetch --depth="$(( commits + 1 ))" origin ${{ github.head_ref }} master
22+
fi
23+
ci/verify-locked-down-signatures.sh origin/master

ci/locked_down_files.txt

+6
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
Cargo.lock
2+
gui/package-lock.json
3+
ci/trusted_keys.pub
4+
ci/locked_down_files.txt
5+
ci/verify-locked-down-signatures.sh
6+
.github/workflows/verify-locked-down-signatures.yml

0 commit comments

Comments
 (0)