-
Notifications
You must be signed in to change notification settings - Fork 178
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Inform user of outdated Docker Desktop Version #693
Comments
As I understand it, the goal here is to have a way to prompt the user that their installed Docker Desktop version is outdated, when it's the case. My understanding is that it should only be checked on Windows and macOS machines, as Linux doesn't rely on Docker Desktop. How Docker desktop checks for the latest release.As Docker Desktop is closed-source, I did some reverse engineering (using mitm-proxy) to find how Docker Desktop itself is looking for updates. I found this URL is used on my Apple Silicon machine:
It's returning Here is the generic version:
Where:
In fact, this Changes to the current code baseThe current code base already has a way to do some checks, which is documented here, and I plan on doing the following changes:
Here are command lines for this. (Tested on macOS and windows) : docker version --format '{{.Server.Platform.Name}}'
"Docker Desktop 4.19.0 (106363)" Security considerationsParsing a remotely loaded XML file can be an attack vector, as there are multiple XML vulnerabilities out there. To circumvent this, relying on defusedxml might help. That would also be good to have another non-xml way to get the latest version, but that would diverge from the official way, as far as I'm aware. |
Very cool Alexis, thanks a lot for the dig! Diving into your comments right now: It seems that the only way to check if there's a new Docker Desktop version out is to:
What I'm concerned about is that we need to handle the following cases:
From a UX perspective, based on your suggestions, I understand that we also need to:
The security audit that spawned this issue says the following:
It assumed that a mechanism existed locally where you could check for the latest version of Docker. It would be great if So, ultimately I think we should think this through before going forward. Maybe there's another way with less corner cases that can work here, at least for a subset of the affected users. |
Thanks for the feedback. I agree that redoing a sparkle client seems superfluous, and I share your concerns about the restrictions present in the You comment made me look for alternate ways to know the latest available version of Docker Desktop. Maybe Docker Desktop is storing the data somewhere we can reuse ? 🤔 That would mean the checks are done out of band for us, and that we can reuse their code by just looking at the results. But… I'm not even sure that's possible. I'll have a closer look. |
After some tinkering on my system, I'm unable to find this information. I'm putting here my findings, but I'm not sure they're relevant. I've been looking at the following locations:
cat unleash-repo-schema-v1-Docker\ Desktop.json | jq ".SidebarLayout"
{
"name": "SidebarLayout",
"description": "Enables new Sidebar Layout for Docker Desktop",
"enabled": true,
"strategies": [
{
"id": 0,
"name": "flexibleRollout",
"constraints": [
{
"contextName": "version",
"operator": "SEMVER_LT",
"values": [],
"value": "4.31.0",
"caseInsensitive": false,
"inverted": true
}
],
"parameters": {
"groupId": "SidebarLayout",
"rollout": "100",
"stickiness": "default"
},
"segments": null
}
],
"createdAt": "0001-01-01T00:00:00Z",
"strategy": "",
"parameters": null,
"variants": []
} There is a cat settings.json | jq | grep -i Update
"updateAvailableTime": 1692453100698,
"updateInstallTime": 0,
"disableUpdate": false,
"acceptCanaryUpdates": false,
"useNightlyBuildUpdates": false,
"autoDownloadUpdates": false,
"updateHostsFile": false, |
FYI, I'm not pursuing the effort on this pull request because the path forward is not clear. I've pushed the changes (related to renaming the settings) to the |
Thanks for documenting your findings Alexis. They will be really useful once we decide to work again on this issue. For the record, I was thinking that we could at least notify the user that their Docker Desktop installation is outdated if, e.g., it's been 6 months since the last release ( This is one possible metric we can use that does not rely on external sources. It doesn't cover every use case, sure, but it will help the vast majority of our users, who have installed Docker Desktop at some point and then forgot about it. One other thing I was considering is if Docker Desktop already has such a mechanism. My thinking was that:
So, if Docker Desktop informs users about important upgrades on startup, we're good. |
Pretty awesome dig, and thanks a lot for the image. So, it seems that Docker does not urge the users to update, but it does inform them about it (kind of like our own update notifications).
That's actually a really good idea! Are you thinking of showing a warning notification to our users, or something more visible, like a pop-up? Note that for Dangerzone updates, we show just a notification bubble for the time being. |
That's a good question, and the answer depends on how we want this to be annoying for our users. If we don't want to be too annoying, reusing the notification bubble might be enough. |
This only happens on Windows and macOS. Fixes #693
This only happens on Windows and macOS. Fixes #693
This only happens on Windows and macOS. Fixes #693
Even though we are shipping updates when critical vulnerabilities are found in the container image, the user may be running an outdated Docker Desktop version, which in the worst-case scenario is a container escape vulnerability, which completely undermines the security of the system.
We should add to the updater a way of notifying the user of Docker Desktop updates.
The text was updated successfully, but these errors were encountered: