security: confirm backup destination and certificate path guards for current source
Summary
Could maintainers confirm whether the destination-organization and certificate-path guards from GHSA-56qv-89fq-3h2q and GHSA-q9qw-ch66-5hw3 should also be enforced on the current stable source? I reviewed the official v0.30.8 tag (187de463) because that is the version deployed in the Lauvas Data environment. The review was static; I did not probe a live instance.
The v0.30.8 source still appears to accept a client-supplied backup destination without checking its organization in backup.create, backup.update, and restoreBackupWithLogs. I found the same pattern in volume-backup create/update and scheduled execution paths. The certificate API schema also accepts certificatePath, which is used in filesystem operations; shell quoting alone does not constrain filesystem traversal.
Proposed follow-up
- Assert destination organization ownership at API boundaries and again in backup execution paths, before deployment records or cleanup side effects.
- Omit
certificatePathfrom client input and constrain the resolved certificate directory toCERTIFICATES_PATHfor create and delete. - Validate all five Compose provider branch fields with the existing branch validator as defense in depth.
- Add regression tests for the destination and path guards.
I have a locally verified patch on a branch based on canary, ready for review if this approach matches the intended ownership model. One question for maintainers: should service-less web-server backup schedules be considered organization-scoped, given that they back up the Dokploy instance as a whole?
Verification
- Server and app typechecks pass.
- Server bundle and Next production build pass. Next build logs expected database connection errors because no local
dokploy-postgresservice is available, then exits successfully. - Targeted regression checks pass (42 tests, including four new guard tests).
- The full app suite had four failures in
application.real.test.tsbecause the Docker socket and Nixpacks are unavailable in this environment; 1,014 passed and 5 were skipped.
Source: Dokploy/dokploy