Skip to content

Conversation

@Alexander-Cairns
Copy link
Contributor

@Alexander-Cairns Alexander-Cairns commented Jun 27, 2025

Summary by CodeRabbit

  • Chores
    • Updated workflow permissions to allow writing to GitHub Packages.
    • Upgraded referenced reusable workflows to the latest version in build processes.
    • Removed the changelog and version tracking files from the project.

adam-vessey and others added 2 commits June 27, 2025 11:05
* use dev branch

* push

* test

* test

* fix perms

* are perms needed?

* yes they are

* add perms to remaning workflows

* test

* test

* test

* test

* Update .github/workflows/build-image-from-tag-push.yml

* Also bump the version in the rebuild workflow.

---------

Co-authored-by: Alexander Cairns <[email protected]>
@Alexander-Cairns Alexander-Cairns added the patch Backwards compatible bug fixes. label Jun 27, 2025
@coderabbitai
Copy link

coderabbitai bot commented Jun 27, 2025

Walkthrough

Workflow configuration files were updated to grant packages: write permissions and upgrade reusable workflow references from version v1 to v2. The CHANGELOG.md and VERSION files were removed, eliminating project version history and version tag tracking from the repository.

Changes

File(s) Change Summary
.github/workflows/auto-semver.yml Updated workflow permissions to add packages: write.
.github/workflows/build-image-from-tag-push.yml Added packages: write permission; upgraded reusable workflow from v1 to v2.
.github/workflows/rebuild-image.yml Added packages: write permission; changed reusable workflow version from v1 to v2.
CHANGELOG.md, VERSION Removed files containing changelog and version information.

Sequence Diagram(s)

sequenceDiagram
    participant GitHub Actions
    participant Reusable Workflow (v2)
    participant GitHub Packages

    GitHub Actions->>Reusable Workflow (v2): Trigger build job
    Reusable Workflow (v2)->>GitHub Packages: Publish/modify package (with write permission)
Loading

Poem

A rabbit hopped through workflow fields,
Granting new permissions, wielding shields.
Old changelogs and versions, swept away,
New workflow versions lead the way.
With packages now set to write,
The CI hops on through the night!
🐇✨

Warning

Review ran into problems

🔥 Problems

Errors were encountered while retrieving linked issues.

Errors (1)
  • JIRA integration encountered authorization issues. Please disconnect and reconnect the integration in the CodeRabbit UI.

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.

❤️ Share
🪧 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>, please review it.
    • Explain this complex logic.
    • 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 explain this code block.
    • @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 gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read src/utils.ts and explain its main purpose.
    • @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.

Support

Need help? Create a ticket on our support page for assistance with any issues or questions.

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 using 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 generate docstrings to generate docstrings for this PR.
  • @coderabbitai generate sequence diagram to generate a sequence diagram of the changes in this 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.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

CodeRabbit Configuration 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

@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: 5

📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 82b23ec and f5f456c.

📒 Files selected for processing (5)
  • .github/workflows/auto-semver.yml (1 hunks)
  • .github/workflows/build-image-from-tag-push.yml (2 hunks)
  • .github/workflows/rebuild-image.yml (2 hunks)
  • CHANGELOG.md (0 hunks)
  • VERSION (0 hunks)
💤 Files with no reviewable changes (2)
  • CHANGELOG.md
  • VERSION

build:
if: github.event_name == 'push' || github.event_name == 'pull_request'
uses: discoverygarden/docker-image-reusable-workflows/.github/workflows/build-image.yml@v1
uses: discoverygarden/docker-image-reusable-workflows/.github/workflows/build-image.yml@v2
Copy link

Choose a reason for hiding this comment

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

🛠️ Refactor suggestion

Pin reusable workflow to a commit SHA for supply-chain safety

Tag v2 can be force-moved. Pinning to the immutable commit SHA mitigates the risk of a compromised upstream tag.

-    uses: discoverygarden/docker-image-reusable-workflows/.github/workflows/build-image.yml@v2
+    # Pinned to the current HEAD of v2 (replace with actual hash)
+    uses: discoverygarden/docker-image-reusable-workflows/.github/workflows/build-image.yml@a1b2c3d4e5f6g7h8i9j0
🤖 Prompt for AI Agents
In .github/workflows/build-image-from-tag-push.yml at line 25, the reusable
workflow is currently pinned to the tag 'v2', which can be force-updated and
poses a supply-chain risk. Replace the tag 'v2' with the specific immutable
commit SHA of that version to ensure supply-chain safety by preventing
unexpected changes from upstream.

permissions:
id-token: write
contents: read
packages: write
Copy link

Choose a reason for hiding this comment

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

🛠️ Refactor suggestion

Scope the new packages: write permission to the job, not the entire workflow

Granting packages: write at workflow-level means every job—present and future—runs with publish rights. Unless another job needs to push images, move this permission block under the build job to follow the principle of least privilege.

 permissions:
   id-token: write
   contents: read
-  packages: write
+  # keep workflow-level perms minimal; `packages: write` lives at job-level

Then inside jobs.build:

 jobs:
   build:
+    permissions:
+      packages: write
+      # inherits id-token/contents from workflow scope
🤖 Prompt for AI Agents
In .github/workflows/build-image-from-tag-push.yml at line 7, the `packages:
write` permission is currently set at the workflow level, granting all jobs
publish rights. To follow the principle of least privilege, move the `packages:
write` permission block from the workflow level into the specific `build` job's
permissions section so only that job has write access to packages.

permissions:
id-token: write
contents: read
packages: write
Copy link

Choose a reason for hiding this comment

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

🛠️ Refactor suggestion

Same permission concern—consider job-scoped packages: write

As with the other workflows, limit packages: write to the job that actually pushes the image.

🤖 Prompt for AI Agents
In .github/workflows/auto-semver.yml at line 26, the permission `packages:
write` is currently set globally but should be limited to only the job that
pushes the image. Move the `packages: write` permission from the global or
workflow level to the specific job that performs the image push to restrict
permission scope and improve security.

permissions:
id-token: write
contents: read
packages: write
Copy link

Choose a reason for hiding this comment

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

🛠️ Refactor suggestion

Restrict permission scope

Move packages: write under jobs.build.permissions to avoid over-privileging unrelated jobs that may be added later.

🤖 Prompt for AI Agents
In .github/workflows/rebuild-image.yml at line 7, the permission `packages:
write` is currently set at the top level, which grants it globally. To restrict
the permission scope, move `packages: write` under the `jobs.build.permissions`
section so that only the build job has this permission, preventing unrelated
jobs from being over-privileged.

jobs:
build:
uses: discoverygarden/docker-image-reusable-workflows/.github/workflows/build-image.yml@v1
uses: discoverygarden/docker-image-reusable-workflows/.github/workflows/build-image.yml@v2
Copy link

Choose a reason for hiding this comment

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

🛠️ Refactor suggestion

Supply-chain hardening: pin the reusable workflow

For the same reasons noted in the tag-push workflow, replace @v2 with the commit SHA of the desired revision.

-    uses: discoverygarden/docker-image-reusable-workflows/.github/workflows/build-image.yml@v2
+    uses: discoverygarden/docker-image-reusable-workflows/.github/workflows/build-image.yml@a1b2c3d4e5f6g7h8i9j0
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
uses: discoverygarden/docker-image-reusable-workflows/.github/workflows/build-image.yml@v2
uses: discoverygarden/docker-image-reusable-workflows/.github/workflows/build-image.yml@a1b2c3d4e5f6g7h8i9j0
🤖 Prompt for AI Agents
In .github/workflows/rebuild-image.yml at line 24, the reusable workflow
reference uses a floating tag '@v2', which is not secure for supply-chain
hardening. Replace '@v2' with the specific commit SHA of the desired revision to
pin the reusable workflow to an exact version, ensuring consistent and secure
builds.

@Alexander-Cairns Alexander-Cairns added no-update No tag/release needs to be created and removed patch Backwards compatible bug fixes. labels Jul 11, 2025
@Alexander-Cairns Alexander-Cairns merged commit 8773990 into main Jul 11, 2025
6 of 7 checks passed
@Alexander-Cairns Alexander-Cairns deleted the ISX-86 branch July 11, 2025 13:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

no-update No tag/release needs to be created

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants