Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
# Build a hermetic quality-gate image so checks run with reproducible dependencies.
FROM node:20-bookworm-slim@sha256:2cf067cfed83d5ea958367df9f966191a942351a2df77d6f0193e162b5febfc0 AS build
FROM node:25-bookworm-slim@sha256:81db02c4b671288a03915da9534dbd54f96d0e7c24d80ccc54f5b36b2e684370 AS build

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

⚪ LOW RISK

Suggestion: The Node.js base image and SHA digest are duplicated on lines 2 and 9. This redundancy makes future updates error-prone and can lead to environment drift between the build and runtime stages. Try running the following prompt in your coding agent: > Refactor the Dockerfile to use a global ARG for the Node.js base image version and SHA digest, and reference this ARG in both FROM instructions.

WORKDIR /skill
COPY package.json package-lock.json tsconfig.json ./
RUN npm ci --ignore-scripts
COPY src/ src/
RUN ./node_modules/.bin/tsc

FROM node:20-bookworm-slim@sha256:2cf067cfed83d5ea958367df9f966191a942351a2df77d6f0193e162b5febfc0
FROM node:25-bookworm-slim@sha256:81db02c4b671288a03915da9534dbd54f96d0e7c24d80ccc54f5b36b2e684370
RUN groupadd -r skill && useradd -r -g skill skill
WORKDIR /workspace/quality-gate
COPY --from=build /workspace/_shared/dist/ /workspace/_shared/dist/
Expand Down
Loading