Skip to content

pull from master - #25

Open
AtharvaGhongade wants to merge 13 commits into
LondheShubham153:masterfrom
AtharvaGhongade:master
Open

pull from master#25
AtharvaGhongade wants to merge 13 commits into
LondheShubham153:masterfrom
AtharvaGhongade:master

Conversation

@AtharvaGhongade

@AtharvaGhongade AtharvaGhongade commented Jun 24, 2026

Copy link
Copy Markdown

Summary by CodeRabbit

  • Chores
    • Streamlined the CI pipeline to run frontend linting and build/push a single Docker image.
    • Removed backend testing, formatting, and deployment steps from the workflow.
    • Updated the build process to use the frontend project as the sole deployment target.

@coderabbitai

coderabbitai Bot commented Jun 24, 2026

Copy link
Copy Markdown

Review Change Stack

📝 Walkthrough

Walkthrough

The CI workflow (ci.yml) is rewritten to contain only two jobs: code-lint (Node 24, npm ci, npm run lint) and build-and-push (depends on code-lint, builds and pushes the frontend Docker image). Frontend tests, all backend Go steps, the backend Docker build/push, and the deploy job invoking cd.yml are removed.

Changes

CI Workflow Simplification

Layer / File(s) Summary
Workflow trigger, lint job, and Docker build/push
.github/workflows/ci.yml
Trigger is narrowed to push on master; code-lint job switches to actions/setup-node@v4 with Node 24, npm ci, and only npm run lint (tests removed); build-and-push job adds needs: code-lint, builds from frontend/Dockerfile with context: frontend, and pushes a single frontend tag — backend Go steps, backend Docker build/push, and the deploy job are all removed.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~5 minutes

Poem

🐇 Hop hop, the pipeline's trimmed and neat,
No backend steps to slow the beat!
We lint the code, then build with care,
One Docker image floats in the air.
Less is more — the rabbit agrees! 🌟

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 inconclusive)

Check name Status Explanation Resolution
Title check ❓ Inconclusive The title is too generic and does not describe the actual workflow and CI changes. Rename it to reflect the main change, such as updating the CI workflow to lint the frontend and build the frontend 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

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: 2

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

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

Consider restoring frontend test execution in CI.

The frontend defines a test script, but this workflow now gates only on lint. Re-adding tests would catch regressions earlier.

🤖 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 24 - 26, The CI workflow currently
runs only the frontend lint step and no longer exercises the frontend test
suite. Update the workflow job that contains Run ESLint so it also invokes the
frontend test script from the frontend package, ensuring the CI gate includes
both lint and tests. Use the existing frontend workflow step names and npm
scripts to add the test execution alongside the current lint check.

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

Align Node versions between CI lint and Docker build.

Line 18 uses Node 24, while frontend/Dockerfile builds with Node 20. This mismatch can hide version-specific failures.

🤖 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 18, The Node runtime versions are
mismatched between the CI workflow and the frontend Docker build, which can mask
environment-specific issues. Update the workflow job that sets node-version in
the CI config to match the Node version used by frontend/Dockerfile, and keep
the version consistent anywhere else the Node setup is defined so linting and
build/test runs use the same runtime.

12-13: 🔒 Security & Privacy | 🔵 Trivial

Disable credential persistence on both checkout steps
actions/checkout keeps the Git token by default, but this workflow only builds and pushes Docker images, so persist-credentials: false can be set on both checkouts.

🤖 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 workflow’s
actions/checkout step is persisting Git credentials by default, which should be
disabled for the Docker build/push flow. Update both checkout uses in the CI
workflow to set persist-credentials to false so no Git token is stored after
checkout, and keep the change aligned with the existing Checkout code steps.

Source: Linters/SAST tools

🤖 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 8-9: Add an explicit workflow-level permissions block to the ci
workflow so the GitHub token uses least privilege by default. Update the
workflow definition around the top-level jobs section in ci.yml to set minimal
permissions for this workflow, typically using the default read-only contents
scope, and keep any job-specific overrides only if a job truly needs more
access.
- Line 13: The workflow actions are still using version tags instead of
immutable commit SHAs, so update each referenced action in ci.yml, matrix.yml,
and cd.yml to pin the exact SHA for actions/checkout, actions/setup-node,
actions/setup-go, docker/login-action, and docker/build-push-action. Make the
changes in the workflow definitions themselves so the jobs continue to use the
same actions but with SHA-pinned references only.

---

Nitpick comments:
In @.github/workflows/ci.yml:
- Around line 24-26: The CI workflow currently runs only the frontend lint step
and no longer exercises the frontend test suite. Update the workflow job that
contains Run ESLint so it also invokes the frontend test script from the
frontend package, ensuring the CI gate includes both lint and tests. Use the
existing frontend workflow step names and npm scripts to add the test execution
alongside the current lint check.
- Line 18: The Node runtime versions are mismatched between the CI workflow and
the frontend Docker build, which can mask environment-specific issues. Update
the workflow job that sets node-version in the CI config to match the Node
version used by frontend/Dockerfile, and keep the version consistent anywhere
else the Node setup is defined so linting and build/test runs use the same
runtime.
- Around line 12-13: The workflow’s actions/checkout step is persisting Git
credentials by default, which should be disabled for the Docker build/push flow.
Update both checkout uses in the CI workflow to set persist-credentials to false
so no Git token is stored after checkout, and keep the change aligned with the
existing Checkout code steps.
🪄 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: 6c307564-ed16-43fe-b786-725c4efbe5a2

📥 Commits

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

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

Comment thread .github/workflows/ci.yml
Comment on lines 8 to +9
jobs:
frontend:
# Github runner
runs-on: ubuntu-latest
steps:
- name: Checkout Code
uses: actions/checkout@v7
code-lint:

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

Add explicit least-privilege permissions at workflow level.

Relying on default token scopes is broader than needed; define minimal permissions (for this workflow, contents: read is typically sufficient).

Suggested patch
 on: 
   push: 
     branches: [master]
 
+permissions:
+  contents: read
+
 jobs:
📝 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
jobs:
frontend:
# Github runner
runs-on: ubuntu-latest
steps:
- name: Checkout Code
uses: actions/checkout@v7
code-lint:
permissions:
contents: read
jobs:
code-lint:
🤖 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 8 - 9, Add an explicit workflow-level
permissions block to the ci workflow so the GitHub token uses least privilege by
default. Update the workflow definition around the top-level jobs section in
ci.yml to set minimal permissions for this workflow, typically using the default
read-only contents scope, and keep any job-specific overrides only if a job
truly needs more access.

Source: Linters/SAST tools

Comment thread .github/workflows/ci.yml
runs-on: ubuntu-latest
steps:
- 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

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
set -euo pipefail

# Inspect the workflow and nearby lines with numbers.
git ls-files .github/workflows/ci.yml
wc -l .github/workflows/ci.yml
cat -n .github/workflows/ci.yml | sed -n '1,120p'

Repository: LondheShubham153/devboard

Length of output: 1682


🏁 Script executed:

#!/bin/bash
set -euo pipefail

# Map uses references in the workflow and search for policy mentions.
rg -n "uses:\s*(actions/checkout|actions/setup-node|docker/login-action|docker/build-push-action)@" .github/workflows/ci.yml
rg -n "immutable commit SHA|pin.*SHA|supply-chain|actions/" .github/workflows .github README.md docs 2>/dev/null || true

Repository: LondheShubham153/devboard

Length of output: 1161


🏁 Script executed:

#!/bin/bash
set -euo pipefail

# Also inspect any workflow comments or references that may justify the choice.
sed -n '1,140p' .github/workflows/ci.yml | nl -ba

Repository: LondheShubham153/devboard

Length of output: 203


🏁 Script executed:

#!/bin/bash
set -euo pipefail

# Search for the exact action references and version pins.
rg -n "uses:\s*(actions/checkout|actions/setup-node|docker/login-action|docker/build-push-action)@" .github/workflows/ci.yml

Repository: LondheShubham153/devboard

Length of output: 361


🏁 Script executed:

#!/bin/bash
set -euo pipefail

# Print the workflow with line numbers and extract all action refs.
echo '--- ci.yml ---'
cat -n .github/workflows/ci.yml | sed -n '1,120p'
echo '--- action refs ---'
python3 - <<'PY'
import re, pathlib
text = pathlib.Path('.github/workflows/ci.yml').read_text()
for i, line in enumerate(text.splitlines(), 1):
    m = re.search(r'uses:\s*([^\s]+)', line)
    if m:
        print(f"{i}: {m.group(1)}")
PY

Repository: LondheShubham153/devboard

Length of output: 1797


Pin all workflow Actions to immutable commit SHAs.

  • .github/workflows/ci.yml: actions/checkout@v7, actions/setup-node@v4, docker/login-action@v4, docker/build-push-action@v7
  • .github/workflows/matrix.yml: actions/checkout@v7, actions/setup-go@v6
  • .github/workflows/cd.yml: actions/checkout@v7
🧰 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 at line 13, The workflow actions are still using
version tags instead of immutable commit SHAs, so update each referenced action
in ci.yml, matrix.yml, and cd.yml to pin the exact SHA for actions/checkout,
actions/setup-node, actions/setup-go, docker/login-action, and
docker/build-push-action. Make the changes in the workflow definitions
themselves so the jobs continue to use the same actions but with SHA-pinned
references only.

Source: Linters/SAST tools

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