Skip to content
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

Upload release binaries #364

Merged
merged 2 commits into from
Jun 27, 2024
Merged

Upload release binaries #364

merged 2 commits into from
Jun 27, 2024

Conversation

sporkmonger
Copy link
Contributor

@sporkmonger sporkmonger commented Jun 27, 2024

Automatically upload release binaries anytime a release is created/published.

This workflow probably doesn't work yet, but it's hard to test locally. I'll use temporary releases off throw-away tags that won't trigger a crate publish to test it.

Summary by CodeRabbit

  • Chores
    • Introduced a GitHub Actions workflow to automate uploading Bulwark binaries for Linux, macOS x86-64, and macOS aarch64 to a GitHub Release.

@sporkmonger sporkmonger added github_actions Pull requests that update GitHub Actions code kind/testing Categorizes issue or PR as related to testing. labels Jun 27, 2024
@sporkmonger sporkmonger added this to the Release 0.6.0 milestone Jun 27, 2024
@sporkmonger sporkmonger self-assigned this Jun 27, 2024
Copy link
Contributor

coderabbitai bot commented Jun 27, 2024

Walkthrough

The new GitHub Actions workflow publish-release.yml enables automated uploading of Bulwark binaries to a GitHub release for different platforms (Linux, macOS x86-64, and macOS aarch64). This workflow is responsible for checking out the repository, setting up Rust and the protobuf compiler, building the release binaries, and uploading them as release artifacts. It leverages various GitHub Actions to achieve these tasks efficiently.

Changes

File/Directory Summary
.github/workflows/publish-release.yml Introduced a workflow for uploading Bulwark binaries to a GitHub release with jobs for Linux, macOS x86-64, and macOS aarch64. Each job includes steps for checking out the repository, installing tools, building, and uploading binaries as release artifacts.

Poem

🐇 In the land of code and byte,
Bulwark binaries take their flight,
With GitHub Actions, swift and free,
Platforms three, now in harmony.
Rust and protobuf in a dance so fine,
Releasing magic, one job at a time.
Watch them soar, binaries bright,
Into the GitHub release night! 🌙


Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>.
    • Generate unit testing code for this file.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai generate unit testing code for this file.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai generate interesting stats about this repository and render them as a table.
    • @coderabbitai show all the console.log statements in this repository.
    • @coderabbitai read src/utils.ts and generate unit testing code.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.

CodeRabbit Commands (invoked as PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Additionally, you can add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.

CodeRabbit Configration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

Copy link

dryrunsecurity bot commented Jun 27, 2024

Hi there 👋, @DryRunSecurity here, below is a summary of our analysis and findings.

DryRun Security Status Findings
Server-Side Request Forgery Analyzer 0 findings
Configured Codepaths Analyzer 0 findings
Secrets Analyzer 0 findings
SQL Injection Analyzer 0 findings
Sensitive Files Analyzer 0 findings
Authn/Authz Analyzer 0 findings
IDOR Analyzer 0 findings

Note

🟢 Risk threshold not exceeded.

Change Summary (click to expand)

The following is a summary of changes in this pull request made by me, your security buddy 🤖. Note that this summary is auto-generated and not meant to be a definitive list of security issues but rather a helpful summary from a security perspective.

Summary:

The provided code change is a GitHub Actions workflow that automates the process of uploading the Bulwark binaries to a GitHub release. This workflow is triggered when a new release is created or published in the 'bulwark-security/bulwark' repository. The workflow consists of three jobs that build the Bulwark binary for different platforms (Linux x86_64, macOS x86_64, and macOS ARM64) and upload them as release artifacts.

From an application security perspective, the workflow includes several security-focused features, such as a secure repository check, secure release trigger, secure artifact uploads, dependency management, and the installation of necessary compilers. These measures help ensure the integrity and security of the release process, mitigating potential risks and vulnerabilities.

Files Changed:

  • .github/workflows/publish-release.yml: This file contains the GitHub Actions workflow that automates the process of uploading the Bulwark binaries to a GitHub release. The workflow is triggered when a new release is created or published in the 'bulwark-security/bulwark' repository and consists of three jobs that build and upload the Bulwark binaries for different platforms.

Powered by DryRun Security

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 3

Review details

Configuration used: CodeRabbit UI
Review profile: CHILL

Commits

Files that changed from the base of the PR and between 35a6fec and 6dd554c.

Files selected for processing (1)
  • .github/workflows/publish-release.yml (1 hunks)
Additional comments not posted (2)
.github/workflows/publish-release.yml (2)

22-22: Clarify the choice of the Rust target architecture.

The target: wasm32-wasi seems unusual for building a Linux binary. Typically, you would expect a target like x86_64-unknown-linux-gnu for Linux.


84-84: Clarify the choice of the Rust target architecture for macOS aarch64.

The target: wasm32-wasi seems unusual for building a macOS aarch64 binary. Typically, you would expect a target like aarch64-apple-darwin for macOS.

Verification successful

Clarify the choice of the Rust target architecture for macOS aarch64.

The target: wasm32-wasi seems unusual for building a macOS aarch64 binary. However, the documentation indicates that wasm32-wasi is required to build plugins for Bulwark. This suggests that its usage is intentional and necessary for your build process.

  • crates/sdk/README.md
  • docs/README.md
Scripts executed

The following scripts were executed for the analysis:


Script:

#!/bin/bash
# Description: Verify if wasm32-wasi is a valid target for macOS binaries.

# Test: Search for wasm32-wasi usage in macOS context. Expect: Specific usage cases or none.
rg --type yaml --context 5 $'wasm32-wasi' .github/workflows/

Length of output: 4979



Script:

#!/bin/bash
# Description: Search for comments or documentation explaining the use of wasm32-wasi target.

# Test: Search for any documentation or comments mentioning wasm32-wasi in the repository.
rg --type md --type yaml --type toml --type rs --type txt 'wasm32-wasi' --context 5

Length of output: 110



Script:

#!/bin/bash
# Description: Search for comments or documentation explaining the use of wasm32-wasi target.

# Test: Search for any documentation or comments mentioning wasm32-wasi in the repository.
rg --type md --type yaml --type toml --type txt 'wasm32-wasi' --context 5

Length of output: 1278

.github/workflows/publish-release.yml Show resolved Hide resolved
.github/workflows/publish-release.yml Show resolved Hide resolved
.github/workflows/publish-release.yml Show resolved Hide resolved
Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 0

Review details

Configuration used: CodeRabbit UI
Review profile: CHILL

Commits

Files that changed from the base of the PR and between 6dd554c and f448a19.

Files selected for processing (1)
  • .github/workflows/publish-release.yml (1 hunks)
Files skipped from review as they are similar to previous changes (1)
  • .github/workflows/publish-release.yml

@sporkmonger sporkmonger merged commit 7173697 into main Jun 27, 2024
16 checks passed
@sporkmonger sporkmonger deleted the release-after-publish branch June 27, 2024 05:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
github_actions Pull requests that update GitHub Actions code kind/testing Categorizes issue or PR as related to testing.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant