Skip to content

fix(security): exclude local secrets and drop root in dev image - #309

Open
jdotc1 wants to merge 3 commits into
TripSit:uatfrom
jdotc1:security/web-018-nonroot-no-env
Open

jdotc1 wants to merge 3 commits into
TripSit:uatfrom
jdotc1:security/web-018-nonroot-no-env

Conversation

@jdotc1

@jdotc1 jdotc1 commented Nov 9, 2026

Copy link
Copy Markdown

Closes #279 (WEB-018).

Security impact

Local .env and .env*.local files should not enter Docker build contexts, and the development image should not run application code as root.

Changes

  • Ignore local environment files in .dockerignore.
  • Give the development working directory to node and activate USER node after dependency installation.
  • Add focused Jest regression tests for both safeguards.

Verification

  • Baseline security checks failed before the fix and pass against the patch.
  • Source diff is limited to .dockerignore, Dockerfile, and the test file.
  • Full Docker/Jest CI execution is pending upstream checks.

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.

Dev image runs as root; .env isn't in .dockerignore (WEB-018)

1 participant