fix(ci): add non-root USER to cypress snapshot Dockerfile#41823
Conversation
Switch to the built-in `node` user (provided by cypress/factory base image) before the ENTRYPOINT to avoid running the container process as root. The factory image already sets chmod 777 on /root so the Cypress cache remains accessible to non-root users. Also clean up apt lists to reduce image size. Fixes https://linear.app/appsmith/issue/APP-15224/triage-semgrep-finding-781859531-missing-non-root-user-in
WalkthroughThe Cypress test Docker image consolidates Chromium package installation with apt cache cleanup into a single ChangesDockerfile Image Optimization
Estimated code review effort🎯 1 (Trivial) | ⏱️ ~3 minutes Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
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. Comment |
Description
Switch to the built-in
nodeuser (provided by thecypress/factorybase image) before the ENTRYPOINT to avoid running the container process as root.The
cypress/factoryimage already setschmod 777 /rootso the Cypress binary cache at/root/.cache/Cypressremains accessible to non-root users. This is the officially supported pattern from the Cypress Docker images project.Also cleans up
apt listsafter installing chromium to reduce image layer size.Fixes https://linear.app/appsmith/issue/APP-15224/triage-semgrep-finding-781859531-missing-non-root-user-in
Automation
/ok-to-test tags="@tag.Sanity"
🔍 Cypress test results
Communication
Should the DevRel and Marketing teams inform users about this change?
Summary by CodeRabbit
Release Notes
Tip
🟢 🟢 🟢 All cypress tests have passed! 🎉 🎉 🎉
Workflow run: https://github.com/appsmithorg/appsmith/actions/runs/26184866538
Commit: 8bf6885
Cypress dashboard.
Tags:
@tag.SanitySpec:
Wed, 20 May 2026 20:03:46 UTC