File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ name : Verify Signatures
2+
3+ on :
4+ push :
5+ branches : [ main ]
6+ pull_request :
7+ branches : [ main ]
8+
9+ jobs :
10+ verify :
11+ name : Verify Repository Integrity
12+ runs-on : ubuntu-latest
13+ steps :
14+ - name : Checkout repository
15+ uses : actions/checkout@v3
16+ with :
17+ fetch-depth : 0
18+
19+ - name : Set up ZSH
20+ run : |
21+ sudo apt-get update
22+ sudo apt-get install -y zsh
23+
24+ - name : Run Integrity Audit
25+ run : |
26+ zsh ./src/audit_inception_commit-POC.sh
27+
28+ - name : Get Repository DID
29+ run : |
30+ zsh ./src/get_repo_did.sh
31+
32+ - name : Verify Signatures
33+ run : |
34+ # Create temporary allowed signers file for verification
35+ mkdir -p /tmp/allowed_signers
36+ echo '@ChristopherA namespaces="git" ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIOiCXeyP5P/TEVi4U2KFXFi2zRIc9kwe+h1SQxIb1F8Z' > /tmp/allowed_signers/allowed
37+ git config --global gpg.ssh.allowedSignersFile /tmp/allowed_signers/allowed
38+
39+ # Verify signatures on all commits in main branch
40+ git log --show-signature origin/main
41+
42+ # Check for unsigned commits
43+ UNSIGNED_COMMITS=$(git log --pretty=format:%H origin/main | while read commit; do
44+ if ! git verify-commit $commit 2>/dev/null; then
45+ echo "- Unsigned commit: $commit ($(git log -1 --pretty=format:%s $commit))"
46+ fi
47+ done)
48+
49+ if [ -n "$UNSIGNED_COMMITS" ]; then
50+ echo "::warning ::The following commits are not properly signed:"
51+ echo "$UNSIGNED_COMMITS"
52+ echo "All commits should be signed according to Open Integrity requirements."
53+ else
54+ echo "✅ All commits are properly signed."
55+ fi
You can’t perform that action at this time.
0 commit comments