Repository navigation
Fixes #420: Harden Helm chart security defaults - #434
Conversation
|
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes using default effort and found 1 potential issue.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
Want higher recall? High effort reviews run extra passes and find more bugs. A team admin can switch effort levels in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit b58347d. Configure here.
| limits: | ||
| cpu: 200m | ||
| memory: 512Mi | ||
| ephemeral-storage: 512Mi |
There was a problem hiding this comment.
Default limits override custom requests
High Severity
Helm deep-merges these new default resources.limits into user values that only set resources.requests. If those requests exceed 200m CPU or 512Mi memory, the pod spec is invalid (request > limit) and the Deployment is rejected. That matches the previous “set CPU requests before HPA” path, so a typical requests-only override or chart upgrade can fail to roll out.
Reviewed by Cursor Bugbot for commit b58347d. Configure here.


Summary
Hardens the TrueForge Helm deployment so the server container no longer runs as root by default. The chart now renders restricted pod/container security contexts and mounts
/tmpas writable storage soreadOnlyRootFilesystem: trueworks.Closes #420
Changes
10001:10001inDockerfileandDockerfile.devpodSecurityContextand containersecurityContext/tmpemptyDirvolume mount for writable temp storageHow was this tested?
pnpm buildpnpm testpnpm typecheckpnpm lint:cipnpm chart:depspnpm chart:lintpnpm chart:templatepnpm test:chart-securityBefore

After

Checklist
pnpm build,pnpm test,pnpm typecheck,pnpm lint:ci, andpnpm format:checkpass locallypackages/trueforge-sdk,.github/fern/openapi/openapi.json,docs/openapi.json) — fork PRs omit SDK regen; maintainers regenerate after merge.env.exampleupdated if configuration or behavior changedNote
Medium Risk
Changes default pod runtime identity, filesystem writability, and resource limits for Helm installs; upgrades may need values overrides if workloads relied on root or empty resource defaults.
Overview
Hardens TrueForge Kubernetes deployments by aligning container images and the Helm chart with restricted security defaults (closes #420).
Docker images (
Dockerfile,Dockerfile.dev) now create user/group 10001 and run the server process as non-root instead of root.Helm chart defaults add pod-level
runAsNonRoot/ UID 10001, containerreadOnlyRootFilesystem, dropped capabilities, and concrete CPU/memory/ephemeral-storage requests and limits. The Deployment always mounts a writable/tmpemptyDir(optionally sized fromresources.limits.ephemeral-storage) so read-only root filesystem still works.CI path-filters chart-related changes and runs a gated
chart-checksjob (pnpm chart:deps,pnpm chart:lint); the aggregatecheckjob treats skipped/success chart checks like other optional suites. Chart README documents the new defaults and/tmpbehavior.Reviewed by Cursor Bugbot for commit b58347d. Bugbot is set up for automated code reviews on this repo. Configure here.