Skip to content
RED SAGSkills
hard20 pts · first answer countsdockercontainer-securitysecrets-management

Deleted secret still in the image

This Dockerfile copies an npm token, uses it, then deletes it. A scan still finds the token in the pushed image. What is the right fix?

FROM node:22-alpine
WORKDIR /app
COPY .npmrc package*.json ./
RUN npm ci
RUN rm .npmrc
COPY . .
Choose one answer

Discussion 0

Join free to post in the discussion.

Related questions