BaryoVM drives other machines over SSH, so it's designed to hold as little sensitive material as possible and to keep what it does hold local and locked down.
-
SSH keys. BaryoVM stores only the path to your private key (
keyPath), never the key contents. Authentication uses your existing key files, exactly as your normalsshdoes. -
Keys in ssh-agent. If the file at
keyPathcannot be parsed as a private key, BaryoVM readskeyPath.pub, opens the unix socket named bySSH_AUTH_SOCK, lists the agent's keys, and uses the one whose public key matches. The agent signs, so for these keys the private key never enters BaryoVM. It still stores only the path, and the agent connection is closed once the SSH handshake is done. A key file that parses is used directly and the agent is not asked. IfSSH_AUTH_SOCKis unset, the.pubis missing, or the agent does not hold the key, the connection fails. It does not fall back to another key. -
Fleet state. VM and stack registrations live in
~/.baryovm/fleet.json(override withBARYOVM_HOME), written owner-only (0600). It contains hostnames, users, key paths and stack config, and no passwords, tokens, or key material. -
Host identity. Before running anything on a VM, BaryoVM checks the host's SSH key against
~/.baryovm/known_hosts(override withBARYOVM_HOME), written owner-only (0600). The first connection to a machine shows the fingerprint and asksTrust this host key? [y/N]on a terminal, and records the key only on a yes. With no terminal, or with-o json, an unknown host is refused. Every later connection must match. A key that has changed stops the command and prints both fingerprints, because a rebuilt VM and someone else answering on that address look identical from here.baryovm vm forget-key <name-or-host>drops one recorded key so the next connection asks about the new one. There is no flag that disables the check for every host;BARYOVM_STRICT_HOST_KEYS=0(or--strict-host-keys=false) goes back to learning an unknown host without asking. Your own~/.ssh/known_hostsis read as an additional source, never written. -
Host identity in CI. Trust on first use assumes there is a first use. A runner with no memory between runs would learn a key every run, which is not verification. A runner has no terminal, so BaryoVM refuses an unknown host by default and the job fails rather than trusting whatever answered. Setting
BARYOVM_STRICT_HOST_KEYS=1(or--strict-host-keys) says so explicitly, and also refuses on a terminal instead of asking. Record the key first, ideally from a committed file or a secret rather than anssh-keyscanat deploy time. -
App secrets. BaryoVM never reads or copies your apps' secrets. Backups may copy a stack's config file (e.g.
.env) into the remote backup directory on your VM; that file never leaves the machine through BaryoVM. -
Secret references. A secret reaches a deploy as a reference (
env:NAME,file:PATH, orcmd:<command>on the command line), resolved on your machine at use time and never stored. The value is sent over the SSH session's stdin, into an owner-only (0600) file fordocker run --env-fileor into the build's own shell, and is never on a local or remote command line. It is absent from errors,-o jsonoutput, the audit log and--dry-runoutput. Acmd:reference is run without a shell, with a timeout and with stderr discarded, and is refused when it comes from a committed file (a project file or release manifest). Any other reference from a committed file is confined, because that file may come from someone else's branch and its Dockerfile runs on your VM: anenv:name must start withBARYOVM_(map the secret to that name in CI), and afile:path must be relative, with no~or.., and resolve inside the committed file's own directory after symlinks. Anything else is refused with the reference and the rule, never a value. References typed on the command line are not confined. -
Release manifest paths. A manifest is a committed file and may come from someone else's branch, so its
localRootand everysyncentry must resolve, after symlinks, inside the manifest's own directory. Otherwise a manifest naming~and.sshwould copy a private key to the VM. The lexical check runs at load (so--dry-runrefuses) and the symlink check runs before rsync. The way out isbaryovm stack add --release-root <dir>, stored infleet.jsonon the operator's machine. A manifest or project file cannot set it, andproject exportomits it. -
Cloud APIs. Provider calls use the official Go SDKs, which read your standard
~/.aws/~/.ocicredentials directly. BaryoVM does not store cloud keys. -
Cloud CLIs. A stack can name an AWS profile or Azure subscription and a managed database (
stack set-managed). BaryoVM runs theawsorazalready on your machine and signed in, and the CLI's own sign-in is what authenticates.fleet.jsonholds the names (profile, region, subscription, resource group, database identifier) and nothing else. The calls are built as an argv and run without a shell, every name is checked against an allowed character set and may not start with-, and-o jsonrecords each call's argv, exit code and output (the CLIs print no credential for these calls). -
Publishing.
baryovm publish npmandbaryovm publish nugetscan every file a package would ship for keys and refuse a registry outsidebaryovm.allowedRegistries(git config) orBARYOVM_ALLOWED_REGISTRIES. The npm registry is read fromnpm config get, and NuGet needs an explicit--sourceand symbol handling while a list is set. With neither set any registry is allowed; a policy that cannot be read refuses. Oversized files are refused, not skipped. See USAGE.md. -
Remote commands. All values interpolated into remote shell commands are single-quote escaped (
internal/sshx.Quote, covered by tests) to prevent command injection. -
GitHub runner tokens.
vm runnerfetches a registration or removal token locally with yourghlogin, just before it is used, and sends it to the VM on stdin. It is read inside thegithub-runneruser's shell and exported there forconfig.sh. It is never on a command line, never written tofleet.jsonor anywhere else by BaryoVM, and is scrubbed from any error or JSON output before it leaves the process. -
Forced-command wrapper.
baryovm remote serve, when pinned as an SSH forced command, parsesSSH_ORIGINAL_COMMANDwith no shell and accepts onlybaryovm-remote v1 <op> <stack>forupdate,backup,statusandlogs. No byte of the request reaches a command line: the stack's directory, services, health URL and database settings come from/etc/baryovm/remote.json, and each is quoted withsshx.Quote. The wrapper refuses to run if that file or its directory is not owned by root, is writable by group or others, or is a symlink.execandreleaseare not offered. On other VMs baryovm echoes a random token first and refuses if a forced command swallowed it.
Each release after 0.6.0 carries a build provenance attestation for every archive in its
checksums.txt, signed by release.yml in this repository (keyless, GitHub OIDC). Check a
download with the GitHub CLI:
gh attestation verify baryovm_<version>_<os>_<arch>.tar.gz -R BaryoDev/BaryoVMReleases up to 0.6.0 have no attestation; checksums.txt is the only check for those. The
binaries are not code-signed or notarised for macOS.
-
vm runneris the one opt-in exception to the agentless design: it leaves GitHub's runner running on the VM, making outbound connections only. It refuses public repos, since a fork pull request could run its code on the VM. Thegithub-runneruser is in thedockergroup, which is root-equivalent on that VM, so treat anything that can push to the repo as able to run as root there. -
Protect your SSH private keys and
~/.baryovm/fleet.json. -
BaryoVM runs commands on hosts you register, so only add machines you control.
-
vm execruns arbitrary remote commands as the SSH user for that VM. That is the same authority as opening an interactive SSH session with the registered key; the CLI only shortens the path. -
stack backup --pullcopies a backup set to~/.baryovm/backups/<stack>/on your machine. The set includes the stack's config copy (.env, which holds secrets), so the directory is created0700, files are written0600likefleet.json, and an existing directory writable by group or others is refused. Nothing prunes pulled files. -
Restore is destructive (
stack restorereplaces a database) and requires--yes.
Please report security issues privately to arnelirobles@gmail.com rather
than opening a public issue. Include steps to reproduce and the version
(baryovm version). We'll acknowledge and work on a fix before any public
disclosure.
BaryoVM is early-stage. VM provisioning (Lightsail) is billable and prints a plan
only until --yes is passed; treat it as experimental. The SSH/compose/backup/release paths are
the tested, day-to-day surface.