Skip to content

chore(linux): add packaged releases#45

Merged
ashishkurmi merged 2 commits intostep-security:mainfrom
swarit-stepsecurity:swarit/chore/linux-bin-release
Apr 29, 2026
Merged

chore(linux): add packaged releases#45
ashishkurmi merged 2 commits intostep-security:mainfrom
swarit-stepsecurity:swarit/chore/linux-bin-release

Conversation

@swarit-stepsecurity
Copy link
Copy Markdown
Member

What does this PR do?

Type of change

  • Bug fix
  • Enhancement
  • Documentation

Testing

  • Tested on macOS (version: ___)
  • Binary runs without errors: ./stepsecurity-dev-machine-guard --verbose
  • JSON output is valid: ./stepsecurity-dev-machine-guard --json | python3 -m json.tool
  • No secrets or credentials included
  • Lint passes: make lint
  • Tests pass: make test

Related Issues

Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Expands the release pipeline to produce and publish Linux/Windows artifacts alongside macOS, including Linux .deb/.rpm packages, and documents the updated release/verification process.

Changes:

  • Extend GoReleaser configuration to build Linux targets and generate .deb/.rpm packages via nfpm.
  • Update the GitHub Actions release workflow to locate, sign (cosign), upload, and attest additional artifacts.
  • Update release process documentation and add a Makefile target for building Linux locally.

Reviewed changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated 4 comments.

File Description
docs/release-process.md Documents new Windows/Linux artifacts, package install steps, and Linux verification instructions.
Makefile Adds build-linux target for local Linux amd64 builds.
.goreleaser.yml Adds Linux to build matrix, adjusts archive naming, and introduces nfpm packaging for deb/rpm.
.github/workflows/release.yml Extends release workflow to find/sign/upload/attest Linux binaries and deb/rpm packages.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread docs/release-process.md Outdated
Comment on lines +91 to +99
| `stepsecurity-dev-machine-guard-VERSION-darwin_unnotarized.bundle` | Sigstore cosign bundle for the unnotarized binary |
| `stepsecurity-dev-machine-guard-VERSION-windows_amd64.exe` | Windows 64-bit binary |
| `stepsecurity-dev-machine-guard-VERSION-windows_amd64.exe.bundle` | Sigstore cosign bundle for the Windows amd64 binary |
| `stepsecurity-dev-machine-guard-VERSION-windows_arm64.exe` | Windows ARM64 binary |
| `stepsecurity-dev-machine-guard-VERSION-windows_arm64.exe.bundle` | Sigstore cosign bundle for the Windows arm64 binary |
| `stepsecurity-dev-machine-guard-VERSION-linux_amd64` | Linux 64-bit binary |
| `stepsecurity-dev-machine-guard-VERSION-linux_amd64.bundle` | Sigstore cosign bundle for the Linux amd64 binary |
| `stepsecurity-dev-machine-guard-VERSION-linux_arm64` | Linux ARM64 binary |
| `stepsecurity-dev-machine-guard-VERSION-linux_arm64.bundle` | Sigstore cosign bundle for the Linux arm64 binary |
Copy link

Copilot AI Apr 28, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The documented cosign bundle filenames include VERSION-... (e.g., ...-VERSION-darwin_unnotarized.bundle, ...-VERSION-windows_amd64.exe.bundle, ...-VERSION-linux_amd64.bundle), but the release workflow currently uploads unversioned bundles for the darwin/windows/linux binaries (only the deb/rpm bundles are versioned because they’re derived from the package filename). Please align the docs with what is actually uploaded, or update the workflow to generate/upload versioned bundle names so the verification commands here work as written.

Suggested change
| `stepsecurity-dev-machine-guard-VERSION-darwin_unnotarized.bundle` | Sigstore cosign bundle for the unnotarized binary |
| `stepsecurity-dev-machine-guard-VERSION-windows_amd64.exe` | Windows 64-bit binary |
| `stepsecurity-dev-machine-guard-VERSION-windows_amd64.exe.bundle` | Sigstore cosign bundle for the Windows amd64 binary |
| `stepsecurity-dev-machine-guard-VERSION-windows_arm64.exe` | Windows ARM64 binary |
| `stepsecurity-dev-machine-guard-VERSION-windows_arm64.exe.bundle` | Sigstore cosign bundle for the Windows arm64 binary |
| `stepsecurity-dev-machine-guard-VERSION-linux_amd64` | Linux 64-bit binary |
| `stepsecurity-dev-machine-guard-VERSION-linux_amd64.bundle` | Sigstore cosign bundle for the Linux amd64 binary |
| `stepsecurity-dev-machine-guard-VERSION-linux_arm64` | Linux ARM64 binary |
| `stepsecurity-dev-machine-guard-VERSION-linux_arm64.bundle` | Sigstore cosign bundle for the Linux arm64 binary |
| `stepsecurity-dev-machine-guard-darwin_unnotarized.bundle` | Sigstore cosign bundle for the unnotarized binary |
| `stepsecurity-dev-machine-guard-VERSION-windows_amd64.exe` | Windows 64-bit binary |
| `stepsecurity-dev-machine-guard-windows_amd64.exe.bundle` | Sigstore cosign bundle for the Windows amd64 binary |
| `stepsecurity-dev-machine-guard-VERSION-windows_arm64.exe` | Windows ARM64 binary |
| `stepsecurity-dev-machine-guard-windows_arm64.exe.bundle` | Sigstore cosign bundle for the Windows arm64 binary |
| `stepsecurity-dev-machine-guard-VERSION-linux_amd64` | Linux 64-bit binary |
| `stepsecurity-dev-machine-guard-linux_amd64.bundle` | Sigstore cosign bundle for the Linux amd64 binary |
| `stepsecurity-dev-machine-guard-VERSION-linux_arm64` | Linux ARM64 binary |
| `stepsecurity-dev-machine-guard-linux_arm64.bundle` | Sigstore cosign bundle for the Linux arm64 binary |

Copilot uses AI. Check for mistakes.
Comment thread docs/release-process.md Outdated
cosign verify-blob "stepsecurity-dev-machine-guard-${VERSION}-linux_${ARCH}" \
--bundle "stepsecurity-dev-machine-guard-${VERSION}-linux_${ARCH}.bundle" \
--certificate-oidc-issuer "https://token.actions.githubusercontent.com" \
--certificate-identity-regexp "github.com/.*/dev-machine-guard"
Copy link

Copilot AI Apr 28, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The --certificate-identity-regexp "github.com/.*/dev-machine-guard" pattern is overly broad for release verification: it would accept certificates from forks with the same repo name. Consider restricting the identity to the exact repo and workflow/ref (e.g., step-security/dev-machine-guard release workflow at the tag), so users can’t be tricked into trusting artifacts signed by a different repository.

Suggested change
--certificate-identity-regexp "github.com/.*/dev-machine-guard"
--certificate-identity-regexp "^https://github.com/step-security/dev-machine-guard/.github/workflows/[^@]+@refs/tags/v${VERSION}$"

Copilot uses AI. Check for mistakes.
Comment on lines +147 to +150
sign_with_retry "${{ steps.binaries.outputs.linux_amd64 }}" \
"dist/stepsecurity-dev-machine-guard-linux_amd64.bundle"
sign_with_retry "${{ steps.binaries.outputs.linux_arm64 }}" \
"dist/stepsecurity-dev-machine-guard-linux_arm64.bundle"
Copy link

Copilot AI Apr 28, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The newly added Linux cosign bundle outputs are written to fixed, unversioned filenames (e.g., dist/stepsecurity-dev-machine-guard-linux_amd64.bundle). This doesn’t match the release artifact naming documented in docs/release-process.md (which expects versioned bundle names) and makes it harder to correlate bundles to artifacts. Consider including ${{ steps.version.outputs.version }} in the bundle filenames (and updating the upload list accordingly) so bundle names are consistent with the signed artifact names.

Copilot uses AI. Check for mistakes.
Comment thread Makefile
Comment on lines +20 to +21
build-linux:
GOOS=linux GOARCH=amd64 go build -trimpath -ldflags "$(LDFLAGS)" -o $(BINARY)-linux ./cmd/stepsecurity-dev-machine-guard
Copy link

Copilot AI Apr 28, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

build-linux produces an additional output file ($(BINARY)-linux), but make clean currently only removes $(BINARY), so running clean will leave the Linux binary behind. Consider either outputting to a consistent filename pattern used elsewhere and/or extending the clean target to remove the Linux build artifact.

Copilot uses AI. Check for mistakes.
@shubham-stepsecurity
Copy link
Copy Markdown
Member

LGTM 🙌

Signed-off-by: Swarit Pandey <swarit@stepsecurity.io>
@swarit-stepsecurity swarit-stepsecurity force-pushed the swarit/chore/linux-bin-release branch from 510fb52 to 02186f4 Compare April 29, 2026 03:33
@ashishkurmi ashishkurmi merged commit cfe51c8 into step-security:main Apr 29, 2026
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants