Skip to content

Conversation

@stefanbitcr
Copy link
Contributor

@stefanbitcr stefanbitcr commented Jun 12, 2025

Basic configuration changes for the first stable release 0.1.0

Fixes docker deployment

Afterward a version tag can be created

@cleot Are there any changes required for the current deployment configuration ?

@qodo-code-review
Copy link

PR Reviewer Guide 🔍

Here are some key observations to aid the review process:

⏱️ Estimated effort to review: 2 🔵🔵⚪⚪⚪
🧪 No relevant tests
🔒 Security concerns

Container security:
The Dockerfile removes SHA256 hash pinning from base images (node:24.2.0-slim and nginx:1.27.5-alpine), which was present in the original versions. This removes protection against supply chain attacks where malicious images could be substituted. The original implementation with hash pinning (e.g., node:22.11.0-slim@sha256:f035ba7ffee18f67200e2eb8018e0f13c954ec16338f264940f701997e3c12da) provided better security guarantees.

⚡ Recommended focus areas for review

Version Downgrade

Node.js version was downgraded from 22.11.0 to 24.2.0 and nginx from 1.27.4 to 1.27.5, but the change removes security-focused SHA256 pinning. This could introduce supply chain vulnerabilities and should be validated for compatibility and security implications.

FROM node:24.2.0-slim AS builder
ARG NODE_ENV
ARG VITE_MODE
ENV NODE_ENV=${NODE_ENV:-production}
ENV VITE_MODE=${VITE_MODE:-production}

WORKDIR /app

COPY package*.json ./

RUN npm install --no-fund --no-audit --include=dev

COPY . .

RUN npm run build -- --mode=${VITE_MODE}

FROM nginx:1.27.5-alpine
Health Check

The health check uses wget which may not be available in the nginx:alpine image by default. This could cause the health check to fail and should be verified or replaced with a more reliable method like curl or a simple HTTP request.

healthcheck:
  test: ["CMD", "wget", "--no-verbose", "--tries=1", "--spider", "http://localhost:80"]
  interval: 30s
  timeout: 10s
  retries: 3
  start_period: 40s

@qodo-code-review
Copy link

qodo-code-review bot commented Jun 12, 2025

PR Code Suggestions ✨

Explore these optional code suggestions:

CategorySuggestion                                                                                                                                    Impact
Security
Pin Docker image digest

Using a specific Node.js version without SHA hash verification poses security
risks. Consider pinning to a specific digest to ensure reproducible builds and
prevent supply chain attacks.

Dockerfile [4]

-FROM node:24.2.0-slim AS builder
+FROM node:24.2.0-slim@sha256:[specific-sha256-hash] AS builder

[Suggestion processed]

Suggestion importance[1-10]: 8

__

Why: The suggestion correctly points out a security and reproducibility best practice. The PR removed the SHA digest pinning from the base image, which is a regression. Re-instating the digest pin is important for preventing supply chain attacks and ensuring consistent builds.

Medium
  • Update

Dockerfile Outdated
ARG VITE_MODE

FROM node:22.11.0-slim@sha256:f035ba7ffee18f67200e2eb8018e0f13c954ec16338f264940f701997e3c12da AS builder
FROM node:24.2.0-slim AS builder

Choose a reason for hiding this comment

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

Suggestion: Pin Docker image digest

Suggested change
FROM node:24.2.0-slim AS builder
FROM node:24.2.0-slim@sha256:[specific-sha256-hash] AS builder

Copy link
Contributor

@cleot cleot left a comment

Choose a reason for hiding this comment

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

nice, lgtm!

For our current deployment we don't need docker but good for testing and development. And it will be very useful for kubernetes deployment later on.

@cloudflare-workers-and-pages
Copy link

cloudflare-workers-and-pages bot commented Jun 12, 2025

Deploying wildcat-dashboard with  Cloudflare Pages  Cloudflare Pages

Latest commit: d00f797
Status: ✅  Deploy successful!
Preview URL: https://163bd5c5.wildcat-dashboard.pages.dev
Branch Preview URL: https://stefan-initial-release2.wildcat-dashboard.pages.dev

View logs

@codecov
Copy link

codecov bot commented Jun 12, 2025

Codecov Report

Attention: Patch coverage is 0% with 1 line in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
src/pages/balances/BalancesPage.tsx 0.00% 1 Missing ⚠️

📢 Thoughts on this report? Let us know!

@stefanbitcr stefanbitcr merged commit 785e163 into master Jun 13, 2025
5 of 6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants