-
Notifications
You must be signed in to change notification settings - Fork 1
ci: check last git commit signature against trusted keys #41
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ci: check last git commit signature against trusted keys #41
Conversation
|
Warning Rate limit exceeded@kristapsk has exceeded the limit for the number of commits or files that can be reviewed per hour. Please wait 16 minutes and 58 seconds before requesting another review. ⌛ How to resolve this issue?After the wait time has elapsed, a review can be triggered using the We recommend that you space out your commits to avoid hitting the rate limit. 🚦 How do rate limits work?CodeRabbit enforces hourly rate limits for each developer per organization. Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout. Please see our FAQ for further information. 📒 Files selected for processing (2)
Note Other AI code review bot(s) detectedCodeRabbit has detected other AI code review bot(s) in this pull request and will avoid duplicating their findings in the review comments. This may lead to a less comprehensive review. WalkthroughAdds a CI step and helper script that ensure the most recent git commit is signed and that the signing key matches one of the public keys stored in Changes
Sequence DiagramsequenceDiagram
participant CI as GitHub Actions
participant Repo as Repository
participant Script as check-last-commit-signature-key.sh
participant GPG as gpg
participant KeyDir as keys/ (public .asc files)
CI->>Repo: Checkout (fetch-depth: 0)
CI->>Script: Run signature check step
Script->>Repo: Read latest commit and signatures
alt Commit unsigned
Script->>CI: Exit 1 — "unsigned"
else Commit signed
Script->>Script: Extract signer key ID
Script->>KeyDir: Iterate known key files
loop For each key file
Script->>GPG: gpg --with-colons to extract key ID
alt Key ID matches
Script->>CI: Exit 0 — "known key"
end
end
alt No match found
Script->>CI: Exit 1 — "unknown key"
end
end
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes
Possibly related PRs
Poem
Pre-merge checks and finishing touches✅ Passed checks (5 passed)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
This PR adds a CI check to verify that the last git commit is signed with a key present in the trusted keys directory, addressing issue #10. This enhances security by ensuring only commits from authorized contributors are accepted.
- Adds a new shell script to validate commit signatures against trusted GPG keys
- Integrates the signature check into the GitHub Actions CI workflow
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 3 comments.
| File | Description |
|---|---|
| test/check-last-commit-signature-key.sh | New script that extracts the signing key from the last commit and verifies it against keys in the ../keys/ directory |
| .github/workflows/ci.yml | Adds a new CI step to run the commit signature verification script |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
77fc904 to
62ea520
Compare
a89fab7 to
264acc5
Compare
264acc5 to
5f2e8b7
Compare
Resolves #10.
Summary by CodeRabbit
✏️ Tip: You can customize this high-level summary in your review settings.