Unencrypted Secrets in config file

If someone gains access to Yardstick’s config.json, they will have access to the user’s unencrypted Yarbo.com credentials and tokens. Secrets should be stored as encrypted values.

Thanks for raising this. We take security very seriously, and it’s a fair question, so here is exactly how it works.

What config.json is. It’s Yardstick’s settings file. Alongside your preferences, it holds the sign-ins Yardstick needs to keep running on its own: your Yarbo account sign-in, which is how Yardstick talks to your robot, and, if you’ve set them up, the password for email alerts and the one for Home Assistant. Yardstick has to be able to use these unattended, at 3 AM with nobody at the keyboard, for example to reconnect to your Yarbo when a session expires.

Who can open it. Only the Yardstick application itself and the computer’s administrators. Yardstick locks its own data folder: on Windows to the system and Administrators accounts, with ordinary user accounts removed, and on Mac and Linux to Yardstick’s own account. Someone else using the same computer under their own account can’t open it.

It’s worth being clear about what “administrator” means here. On a home computer, the administrator is almost always the owner: the one person who set the computer up and holds its administrator password. In other words, the only person who can open that file is you, the same person who typed those sign-ins into Yardstick in the first place. Not other people in your house with their own accounts, not other programs running without your permission, and not anyone on your network.

It stays on your computer. These passwords and tokens are only ever used to sign in to the service they belong to. They are never sent to us. When you make a backup, every password and token is stripped out by default, and when you send diagnostics to support, they’re removed before anything is uploaded.

What it would take. To read that file, someone would first have to break into your computer and get administrator access to it. At that point the problem is far bigger than one settings file: with that level of access they can already reach your browser’s saved passwords, your email and everything else on the machine. Encrypting the file wouldn’t change that, because Yardstick has to unlock it by itself on the same computer, so the key would be sitting right beside it.

Where we’re going with it. You raise a good point, and it’s one we’ve already considered. The step that does add protection is keeping these sign-ins in the secure vault built into Windows and macOS instead of in the file, which also covers a copy of the drive taken off the machine. T

Thanks again for flagging it and I hope this addresses your flag.

4 Likes

Moving the credentials into the credential store is a good option but makes cross-platform support harder. My suggestion would be to use a secure key that is machine & core specific. For example, the core’s s/n + machine fingerprint data like CPU type & BIOS details (not too dissimilar from the Windows activation fingerprint). If you are using key data that can be pulled directly from the hardware, it doesn’t need to be stored in a file and if the way that key is constructed is opaque to the world, then you achieve the same thing without having to hook into OS specific mechanisms allowing easier cross-platform maintainability.