Skip to content

Canary backup#4266

Open
SeanAkin wants to merge 5 commits intoDokploy:canaryfrom
SeanAkin:canary-backup
Open

Canary backup#4266
SeanAkin wants to merge 5 commits intoDokploy:canaryfrom
SeanAkin:canary-backup

Conversation

@SeanAkin
Copy link
Copy Markdown

@SeanAkin SeanAkin commented Apr 20, 2026

Synk fork with Project

Greptile Summary

This PR adds registry-aware Docker provider configuration: users can now select a configured registry and browse its images and tags via searchable comboboxes, instead of typing image references manually. It also introduces safeDockerLoginCommand to prevent shell injection during docker login and wires up rollback-registry push support in the cluster upload path.

  • P1 – command injection in upload.ts: getRegistryCommands still uses the old unsafe echo \"${registry.password}\" | docker login … pattern. safeDockerLoginCommand was introduced in this PR and applied to docker.ts but not to upload.ts; a registry password with \" or $(…) can execute arbitrary shell code on the host.

Confidence Score: 4/5

Do not merge until the command injection in getRegistryCommands is fixed; all other changes look solid.

One P1 security finding blocks merge: the registry password is interpolated unescaped into a shell command in upload.ts, enabling command injection for any registry whose password contains shell metacharacters. The fix is straightforward — use the safeDockerLoginCommand helper already introduced in this PR. All other changes look correct and safe.

packages/server/src/utils/cluster/upload.ts — getRegistryCommands needs to use safeDockerLoginCommand.

Security Review

  • Command injection (packages/server/src/utils/cluster/upload.ts, getRegistryCommands): registry.password is interpolated unescaped into a double-quoted shell string. A password containing ", `, or $(…) can break out of the quoted context. safeDockerLoginCommand was introduced in this same PR and correctly applied in docker.ts, but was not applied to upload.ts.

Comments Outside Diff (1)

  1. packages/server/src/utils/cluster/upload.ts, line 119-136 (link)

    P1 security Unescaped registry password in shell command — command injection

    registry.password is interpolated inside a double-quoted shell string. A password containing ", `, or $(…) can break out of the string and execute arbitrary commands on the host. This PR introduced safeDockerLoginCommand in registry.ts and correctly applied it in docker.ts, but the same fix was not applied here.

    You also need to add the import at the top of the file:

    import { safeDockerLoginCommand } from "../../services/registry";

Reviews (1): Last reviewed commit: "Merge branch 'Dokploy:canary' into canar..." | Re-trigger Greptile

Greptile also left 1 inline comment on this PR.

@SeanAkin SeanAkin requested a review from Siumauricio as a code owner April 20, 2026 12:13
@dosubot dosubot bot added the size:XL This PR changes 500-999 lines, ignoring generated files. label Apr 20, 2026
Comment on lines +281 to +286
onSelect={(val) => {
setSelectedImage(val);
setSelectedTag("latest");
setTagSearchInput("");
setImagePopoverOpen(false);
}}
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Image search input not cleared on selection

When a user selects an image from the combobox, imageSearchInput is left with the previous search term. The next time the popover is opened, it shows a stale query rather than an empty search box. Consider resetting it alongside the tag state by adding setImageSearchInput("") in the onSelect handler.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size:XL This PR changes 500-999 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant