-
Notifications
You must be signed in to change notification settings - Fork 1
feat: add cosign signing for docker images in release pipeline #89
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
Changes from 7 commits
510ead5
ec83387
631302b
29ee9e9
0396f0b
d404a48
dc0027c
751f365
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -31,6 +31,47 @@ sudo awf --help | |
|
|
||
| **Note:** Verify checksums after download by downloading `checksums.txt` from the release page. | ||
|
|
||
| ### Docker Image Verification | ||
|
|
||
| All published Docker images are signed with [cosign](https://github.com/sigstore/cosign) using keyless signing. You can verify the signatures to ensure image authenticity and integrity: | ||
|
|
||
| ```bash | ||
| # Install cosign (recommended: use package manager) | ||
| # See https://docs.sigstore.dev/cosign/installation/ for all installation options | ||
|
|
||
| # Homebrew (macOS/Linux) | ||
| # brew install cosign | ||
|
||
|
|
||
| # Debian/Ubuntu (via official package repository) | ||
| # sudo apt update && sudo apt install -y cosign | ||
|
|
||
| # Quick install for testing (verify checksums from GitHub release page for production) | ||
| curl -sSfL https://github.com/sigstore/cosign/releases/latest/download/cosign-linux-amd64 -o cosign | ||
| chmod +x cosign | ||
| sudo mv cosign /usr/local/bin/ | ||
|
|
||
| # Verify Squid image signature | ||
| cosign verify \ | ||
| --certificate-identity-regexp 'https://github.com/githubnext/gh-aw-firewall/.*' \ | ||
| --certificate-oidc-issuer 'https://token.actions.githubusercontent.com' \ | ||
| ghcr.io/githubnext/gh-aw-firewall/squid:latest | ||
|
|
||
| # Verify Agent image signature | ||
| cosign verify \ | ||
| --certificate-identity-regexp 'https://github.com/githubnext/gh-aw-firewall/.*' \ | ||
| --certificate-oidc-issuer 'https://token.actions.githubusercontent.com' \ | ||
| ghcr.io/githubnext/gh-aw-firewall/agent:latest | ||
|
|
||
| # Verify SBOM attestation | ||
| cosign verify-attestation \ | ||
| --certificate-identity-regexp 'https://github.com/githubnext/gh-aw-firewall/.*' \ | ||
| --certificate-oidc-issuer 'https://token.actions.githubusercontent.com' \ | ||
| --type spdxjson \ | ||
| ghcr.io/githubnext/gh-aw-firewall/squid:latest | ||
| ``` | ||
|
|
||
| The images are signed during the release process using GitHub Actions OIDC tokens, ensuring they come from the official repository. | ||
|
|
||
| ### Basic Usage | ||
|
|
||
| ```bash | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -83,3 +83,35 @@ Published to GitHub Container Registry: | |
| - `ghcr.io/{{REPOSITORY}}/agent:{{VERSION_NUMBER}}` | ||
| - `ghcr.io/{{REPOSITORY}}/squid:latest` | ||
| - `ghcr.io/{{REPOSITORY}}/agent:latest` | ||
|
|
||
| ### Image Verification | ||
|
|
||
| All container images are signed with [cosign](https://github.com/sigstore/cosign) for authenticity and integrity verification: | ||
|
|
||
| ```bash | ||
| # Install cosign (recommended: use package manager) | ||
| # See https://docs.sigstore.dev/cosign/installation/ | ||
|
|
||
| # Homebrew: brew install cosign | ||
| # Debian/Ubuntu: sudo apt install cosign | ||
| # For other options, see the official documentation | ||
|
|
||
| # Direct download (⚠️ Verify checksums from GitHub release page for production use) | ||
| curl -sSfL https://github.com/sigstore/cosign/releases/latest/download/cosign-linux-amd64 -o cosign | ||
| chmod +x cosign && sudo mv cosign /usr/local/bin/ | ||
|
|
||
|
||
| # Verify image signature (example for squid image) | ||
| cosign verify \ | ||
| --certificate-identity-regexp 'https://github.com/{{REPOSITORY}}/.*' \ | ||
| --certificate-oidc-issuer 'https://token.actions.githubusercontent.com' \ | ||
| ghcr.io/{{REPOSITORY}}/squid:{{VERSION_NUMBER}} | ||
|
|
||
| # Verify SBOM attestation | ||
| cosign verify-attestation \ | ||
| --certificate-identity-regexp 'https://github.com/{{REPOSITORY}}/.*' \ | ||
| --certificate-oidc-issuer 'https://token.actions.githubusercontent.com' \ | ||
| --type spdxjson \ | ||
| ghcr.io/{{REPOSITORY}}/squid:{{VERSION_NUMBER}} | ||
| ``` | ||
|
|
||
| Images are signed using keyless signing with GitHub Actions OIDC tokens, ensuring they come from the official repository. | ||
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.
The version comment indicates v3.5.0, but the PR description mentions v3.7.0 (visible in the firewall blocked URLs). Please verify that the commit hash
59acb6260d9c0ba8f4a2f9d9b48431a222b68e20corresponds to the intended version and update the comment accordingly to avoid confusion.