Skip to content

Conversation

@TomerFi
Copy link
Owner

@TomerFi TomerFi commented Jan 26, 2026

Summary

  • Use github-actions[bot] identity for release commits instead of github.actor
  • Add SSH commit signing using SIGNING_KEY secret

Changes

  • Updated git config to use bot identity (ID 41898282)
  • Added SSH signing setup step

Prerequisites

Ensure SIGNING_KEY secret is configured in the deployment environment.

Summary by Sourcery

Configure release workflow to use the GitHub Actions bot identity with SSH-signed release commits.

CI:

  • Update release workflow to commit using the github-actions[bot] account instead of the triggering actor.
  • Add SSH-based commit signing in the release workflow using a signing key secret.

Summary by CodeRabbit

  • Chores
    • Updated release workflow: changed commit attribution identity.
    • Added SSH-based commit signing setup and a cleanup step to remove signing keys after runs.
    • Cleaned CI/configuration: removed several review-related settings and an external tools block, relying on remaining defaults.

✏️ Tip: You can customize this high-level summary in your review settings.

@pull-request-size pull-request-size bot added the size: s Pull request has 10 to 30 lines label Jan 26, 2026
@sourcery-ai
Copy link
Contributor

sourcery-ai bot commented Jan 26, 2026

Reviewer's guide (collapsed on small PRs)

Reviewer's Guide

Configures the release workflow to use the dedicated github-actions[bot] identity for release commits and enables SSH-based commit signing using a stored signing key secret.

Flow diagram for updated release workflow git configuration and SSH signing

flowchart TD
  Start[Start release job]
  Checkout[Checkout repository]
  ConfigureGitIdentity["Configure git to use github-actions[bot] identity"]
  SetupSSHSigning[Setup SSH signing using SIGNING_KEY]
  CreateSignedCommits[Create signed release commits]
  End[End job]

  Start --> Checkout --> ConfigureGitIdentity --> SetupSSHSigning --> CreateSignedCommits --> End

  subgraph ConfigureGitIdentityStep
    A1["Set git config user.name to github-actions[bot]"]
    A2["Set git config user.email to 41898282+github-actions[bot]@users.noreply.github.com"]
    A1 --> A2
  end

  ConfigureGitIdentity --> ConfigureGitIdentityStep --> SetupSSHSigning

  subgraph SetupSSHSigningStep
    B1[Create ~/.ssh directory]
    B2[Write SIGNING_KEY secret to ~/.ssh/signing_key]
    B3[Set chmod 600 on signing_key]
    B4[git config gpg.format ssh]
    B5[git config user.signingkey ~/.ssh/signing_key]
    B6[git config commit.gpgsign true]
    B1 --> B2 --> B3 --> B4 --> B5 --> B6
  end

  SetupSSHSigning --> SetupSSHSigningStep --> CreateSignedCommits
Loading

File-Level Changes

Change Details Files
Standardize release commit author to the github-actions[bot] service account.
  • Set git user.name to the literal github-actions[bot] value in the release workflow.
  • Set git user.email to the noreply address associated with the github-actions[bot] account ID 41898282.
.github/workflows/release.yml
Enable SSH-based commit signing for automated release commits.
  • Create an ~/.ssh directory in the workflow runner and write the SIGNING_KEY secret to an SSH private key file.
  • Lock down permissions on the SSH key file to be readable only by the current user.
  • Configure git to use SSH as the GPG format and set the user.signingkey to the generated SSH key path.
  • Enable commit signing by default via commit.gpgsign in the workflow.
.github/workflows/release.yml

Tips and commands

Interacting with Sourcery

  • Trigger a new review: Comment @sourcery-ai review on the pull request.
  • Continue discussions: Reply directly to Sourcery's review comments.
  • Generate a GitHub issue from a review comment: Ask Sourcery to create an
    issue from a review comment by replying to it. You can also reply to a
    review comment with @sourcery-ai issue to create an issue from it.
  • Generate a pull request title: Write @sourcery-ai anywhere in the pull
    request title to generate a title at any time. You can also comment
    @sourcery-ai title on the pull request to (re-)generate the title at any time.
  • Generate a pull request summary: Write @sourcery-ai summary anywhere in
    the pull request body to generate a PR summary at any time exactly where you
    want it. You can also comment @sourcery-ai summary on the pull request to
    (re-)generate the summary at any time.
  • Generate reviewer's guide: Comment @sourcery-ai guide on the pull
    request to (re-)generate the reviewer's guide at any time.
  • Resolve all Sourcery comments: Comment @sourcery-ai resolve on the
    pull request to resolve all Sourcery comments. Useful if you've already
    addressed all the comments and don't want to see them anymore.
  • Dismiss all Sourcery reviews: Comment @sourcery-ai dismiss on the pull
    request to dismiss all existing Sourcery reviews. Especially useful if you
    want to start fresh with a new review - don't forget to comment
    @sourcery-ai review to trigger a new review!

Customizing Your Experience

Access your dashboard to:

  • Enable or disable review features such as the Sourcery-generated pull request
    summary, the reviewer's guide, and others.
  • Change the review language.
  • Add, remove or edit custom review instructions.
  • Adjust other review settings.

Getting Help

@auto-me-bot auto-me-bot bot added the status: needs review Pull request needs a review label Jan 26, 2026
@coderabbitai
Copy link

coderabbitai bot commented Jan 26, 2026

📝 Walkthrough
🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The pull request title accurately and specifically summarizes the main changes: replacing the git identity with github-actions[bot] and implementing SSH commit signing.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.


Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link
Contributor

@sourcery-ai sourcery-ai bot left a comment

Choose a reason for hiding this comment

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

Hey - I've found 1 issue, and left some high level feedback:

  • When creating the SSH directory, consider also setting its permissions explicitly (e.g., chmod 700 ~/.ssh) to match typical SSH security expectations.
  • If SIGNING_KEY can contain newlines, you may want to use a here-doc (cat << 'EOF' > ~/.ssh/signing_key) instead of a simple echo to ensure the key is written exactly as stored in the secret.
Prompt for AI Agents
Please address the comments from this code review:

## Overall Comments
- When creating the SSH directory, consider also setting its permissions explicitly (e.g., `chmod 700 ~/.ssh`) to match typical SSH security expectations.
- If `SIGNING_KEY` can contain newlines, you may want to use a here-doc (`cat << 'EOF' > ~/.ssh/signing_key`) instead of a simple `echo` to ensure the key is written exactly as stored in the secret.

## Individual Comments

### Comment 1
<location> `.github/workflows/release.yml:60-62` </location>
<code_context>
+
+      - name: Setup SSH signing
+        run: |
+          mkdir -p ~/.ssh
+          echo "${{ secrets.SIGNING_KEY }}" > ~/.ssh/signing_key
+          chmod 600 ~/.ssh/signing_key
+          git config gpg.format ssh
+          git config user.signingkey ~/.ssh/signing_key
</code_context>

<issue_to_address>
**🚨 suggestion (security):** Tighten SSH directory permissions and consider cleaning up the signing key after use

The private key stays on disk for the whole job and `~/.ssh` may have default (overly permissive) permissions. I suggest:

1. Explicitly locking down the directory:
   ```yaml
   mkdir -p ~/.ssh
   chmod 700 ~/.ssh
   ```

2. Deleting the key once signing is done (e.g., a final step `rm -f ~/.ssh/signing_key`) to minimize its exposure during the job.

Suggested implementation:

```
      - name: Setup SSH signing
        run: |
          mkdir -p ~/.ssh
          chmod 700 ~/.ssh
          echo "${{ secrets.SIGNING_KEY }}" > ~/.ssh/signing_key
          chmod 600 ~/.ssh/signing_key
          git config gpg.format ssh
          git config user.signingkey ~/.ssh/signing_key
          git config commit.gpgsign true

      - name: Determine version and create changelog
        id: bumper

      - name: Cleanup SSH signing key
        if: always()
        run: |
          rm -f ~/.ssh/signing_key

```

To fully align with the intent ("final step"), the `Cleanup SSH signing key` step should be moved to the end of the job, after all steps that might require signed commits or tags. If there are additional git operations later in this job (e.g., pushing tags/releases), place the cleanup step after the last such step instead of immediately after `Determine version and create changelog`.
</issue_to_address>

Sourcery is free for open source - if you like our reviews please consider sharing them ✨
Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.

@auto-me-bot auto-me-bot bot added status: review started Pull review in progress and removed status: needs review Pull request needs a review labels Jan 26, 2026
@github-actions
Copy link
Contributor

github-actions bot commented Jan 26, 2026

Test Results

294 tests   294 ✅  2s ⏱️
  1 suites    0 💤
  1 files      0 ❌

Results for commit 6b75b82.

♻️ This comment has been updated with latest results.

@codecov
Copy link

codecov bot commented Jan 26, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 98.99%. Comparing base (f5ade6d) to head (6b75b82).
⚠️ Report is 2 commits behind head on dev.

Additional details and impacted files
@@           Coverage Diff           @@
##              dev     #850   +/-   ##
=======================================
  Coverage   98.99%   98.99%           
=======================================
  Files          11       11           
  Lines        1292     1292           
=======================================
  Hits         1279     1279           
  Misses         13       13           
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@TomerFi TomerFi merged commit da655d9 into dev Jan 26, 2026
13 checks passed
@TomerFi TomerFi deleted the chore/bot-identity-and-ssh-signing branch January 26, 2026 22:53
@auto-me-bot auto-me-bot bot added status: merged Pull request merged and removed status: review started Pull review in progress labels Jan 26, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size: s Pull request has 10 to 30 lines status: merged Pull request merged

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant