Skip to content

Need to check advance branch also - #26

Open
UpgradSaurabh wants to merge 6 commits into
LondheShubham153:masterfrom
UpgradSaurabh:master
Open

Need to check advance branch also#26
UpgradSaurabh wants to merge 6 commits into
LondheShubham153:masterfrom
UpgradSaurabh:master

Conversation

@UpgradSaurabh

@UpgradSaurabh UpgradSaurabh commented Jun 25, 2026

Copy link
Copy Markdown

Summary by CodeRabbit

  • Chores
    • Added an automated CI workflow for pushes to the main branch.
    • The workflow now builds the app into a Docker image and publishes the latest image to Docker Hub.

Add CI workflow for building and pushing Docker image
Add Docker build and push step to CI workflow
@coderabbitai

coderabbitai Bot commented Jun 25, 2026

Copy link
Copy Markdown

Review Change Stack

📝 Walkthrough

Walkthrough

A new GitHub Actions workflow is added for pushes to master. It checks out the repository, logs into Docker Hub, builds a Docker image, and pushes it with a latest tag.

Changes

CI Docker publish workflow

Layer / File(s) Summary
Workflow trigger and image publish
.github/workflows/ci.yml
Defines a CI job for master pushes that checks out code, authenticates to Docker Hub, builds the repository image, and pushes devboard-fe-master:latest.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~3 minutes

Poem

🐰 I hopped through CI with a cheerful thump,
Built a Docker image, gave latest a jump.
On master it runs with a whisker-wiggle grin,
Now the build can land where the pushes begin.

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 inconclusive)

Check name Status Explanation Resolution
Title check ❓ Inconclusive The title is vague and doesn't clearly describe the CI workflow and Docker image push changes. Rename it to a concise summary of the main change, such as adding a CI workflow to build and push the Docker image.
✅ Passed checks (4 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

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

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
⚔️ Resolve merge conflicts
  • Resolve merge conflict in branch master

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

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

Warning

⚠️ This pull request shows signs of AI-generated slop (description_diff_mismatch). It has been flagged by CodeRabbit slop detection and should be reviewed carefully.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Actionable comments posted: 3

🧹 Nitpick comments (1)
.github/workflows/ci.yml (1)

26-26: 🩺 Stability & Availability | 🔵 Trivial | ⚡ Quick win

Avoid latest-only image tagging.

Use an immutable tag (for example ${{ github.sha }}) in addition to latest for traceability and rollback safety.

Suggested tagging update
-          tags: ${{ vars.DOCKERHUB_USERNAME }}/devboard-fe-master:latest
+          tags: |
+            ${{ vars.DOCKERHUB_USERNAME }}/devboard-fe-master:latest
+            ${{ vars.DOCKERHUB_USERNAME }}/devboard-fe-master:${{ github.sha }}
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In @.github/workflows/ci.yml at line 26, The Docker image tagging in the CI
workflow only publishes a mutable latest tag, which makes builds hard to trace
and roll back. Update the image tagging in the workflow’s tags setting to
include an immutable identifier such as github.sha alongside latest, so each
build has a unique reference. Keep the existing DockerHub username/image naming
pattern, but ensure the publish step emits both the stable and immutable tags.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In @.github/workflows/ci.yml:
- Around line 5-6: The CI workflow trigger is missing the advance branch, so
update the push branch list in the workflow configuration to include both master
and advance. Locate the workflow trigger section in the CI config and add
advance alongside the existing branch entry so the checks/publish job runs for
both branches.
- Around line 12-13: The checkout step currently uses actions/checkout without
disabling persisted Git credentials, which can leave credentials available to
later steps; update the Checkout code job entry to set persist-credentials to
false on the actions/checkout invocation so the workflow does not retain Git
auth beyond the checkout step.
- Around line 13-22: Pin the GitHub Actions used in the workflow to immutable
commit SHAs instead of version tags. Update the action references in the CI
workflow for actions/checkout, docker/login-action in Docker Setup [Login], and
docker/build-push-action in Docker build and push to use their latest approved
commit hashes so the workflow is reproducible and not vulnerable to tag
retargeting.

---

Nitpick comments:
In @.github/workflows/ci.yml:
- Line 26: The Docker image tagging in the CI workflow only publishes a mutable
latest tag, which makes builds hard to trace and roll back. Update the image
tagging in the workflow’s tags setting to include an immutable identifier such
as github.sha alongside latest, so each build has a unique reference. Keep the
existing DockerHub username/image naming pattern, but ensure the publish step
emits both the stable and immutable tags.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 5bc6e76f-5d19-47dd-b0ea-049dd948c35a

📥 Commits

Reviewing files that changed from the base of the PR and between fac8884 and d0d1798.

📒 Files selected for processing (1)
  • .github/workflows/ci.yml

Comment thread .github/workflows/ci.yml Outdated
Comment on lines +5 to +6
push:
branches: [master]

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🎯 Functional Correctness | 🟠 Major | ⚡ Quick win

Trigger does not match the PR objective.

Line 6 only includes master, but the objective explicitly says this should check/publish for the advance branch too. Please add that branch to the trigger list.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In @.github/workflows/ci.yml around lines 5 - 6, The CI workflow trigger is
missing the advance branch, so update the push branch list in the workflow
configuration to include both master and advance. Locate the workflow trigger
section in the CI config and add advance alongside the existing branch entry so
the checks/publish job runs for both branches.

Comment thread .github/workflows/ci.yml Outdated
Comment on lines +12 to +13
- name: Checkout code
uses: actions/checkout@v7

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🔒 Security & Privacy | 🟠 Major | ⚡ Quick win

Disable persisted Git credentials in checkout.

Set persist-credentials: false to reduce credential exposure risk across later steps/artifacts.

Suggested fix
       - name: Checkout code
         uses: actions/checkout@v7
+        with:
+          persist-credentials: false
📝 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
- name: Checkout code
uses: actions/checkout@v7
- name: Checkout code
uses: actions/checkout@v7
with:
persist-credentials: false
🧰 Tools
🪛 zizmor (1.26.1)

[warning] 12-13: credential persistence through GitHub Actions artifacts (artipacked): does not set persist-credentials: false

(artipacked)


[error] 13-13: unpinned action reference (unpinned-uses): action is not pinned to a hash (required by blanket policy)

(unpinned-uses)

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In @.github/workflows/ci.yml around lines 12 - 13, The checkout step currently
uses actions/checkout without disabling persisted Git credentials, which can
leave credentials available to later steps; update the Checkout code job entry
to set persist-credentials to false on the actions/checkout invocation so the
workflow does not retain Git auth beyond the checkout step.

Source: Linters/SAST tools

Comment thread .github/workflows/ci.yml Outdated
Comment on lines +13 to +22
uses: actions/checkout@v7

- name: Docker Setup [Login]
uses: docker/login-action@v4
with:
username: ${{ vars.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}

- name: Docker build and push
uses: docker/build-push-action@v6

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🔒 Security & Privacy | 🟠 Major

🧩 Analysis chain

🌐 Web query:

actions/checkout latest version tags github releases

💡 Result:

As of June 25, 2026, the latest version of the actions/checkout action is v7.0.0, released on June 18, 2026 [1][2][3]. You can track the most current version and view release notes directly on the GitHub repository's release page [2][4][5]: https://github.com/actions/checkout/releases To use the latest version in your GitHub Actions workflow, specify the version in the uses statement [6][5]: - uses: actions/checkout@v7 It is a common best practice to pin your action versions to a specific tag (e.g., @v7.0.0) or a commit SHA to ensure build consistency and prevent unexpected changes if the major version (e.g., @v7) is updated [7]. You can find the full list of tags and their respective changelogs on the official releases page [2][8].

Citations:


Pin GitHub Actions to specific commit SHAs instead of tags.

Using actions/checkout@v7 (which exists) and other actions with mutable tags like @v4 or @v6 weakens supply-chain security. Tags can be updated or repointed unexpectedly, potentially introducing supply chain attacks. Pin these actions directly to their latest specific commit SHAs to ensure build reproducibility and security.

Suggested hardening patch
-      - name: Checkout code
-        uses: actions/checkout@v7
+      - name: Checkout code
+        uses: actions/checkout@558c3aa1c5e0d849085662d45933738558e12186

       - name: Docker Setup [Login]
-        uses: docker/login-action@v4
+        uses: docker/login-action@162b0b1c... (latest v4 SHA)

       - name: Docker build and push
-        uses: docker/build-push-action@v6
+        uses: docker/build-push-action@... (latest v6 SHA)
🧰 Tools
🪛 zizmor (1.26.1)

[error] 13-13: unpinned action reference (unpinned-uses): action is not pinned to a hash (required by blanket policy)

(unpinned-uses)


[error] 16-16: unpinned action reference (unpinned-uses): action is not pinned to a hash (required by blanket policy)

(unpinned-uses)


[error] 22-22: unpinned action reference (unpinned-uses): action is not pinned to a hash (required by blanket policy)

(unpinned-uses)

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In @.github/workflows/ci.yml around lines 13 - 22, Pin the GitHub Actions used
in the workflow to immutable commit SHAs instead of version tags. Update the
action references in the CI workflow for actions/checkout, docker/login-action
in Docker Setup [Login], and docker/build-push-action in Docker build and push
to use their latest approved commit hashes so the workflow is reproducible and
not vulnerable to tag retargeting.

Source: Linters/SAST tools

@sonarqubecloud

Copy link
Copy Markdown

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.

1 participant