headscale-backup
Warn
Audited by Gen Agent Trust Hub on Sep 3, 2026
Risk Level: MEDIUMREMOTE_CODE_EXECUTIONCOMMAND_EXECUTIONDATA_EXFILTRATIONPRIVILEGE_ESCALATIONINDIRECT_PROMPT_INJECTIONDYNAMIC_EXECUTION
Full Analysis
- [DATA_EXFILTRATION]: The
hs-migrate.shscript facilitates the transmission of sensitive data, including TLS private keys (server.key), node private keys (private.key), and the SQLite database containing node state and API key hashes, to external hosts usingrsync. - [REMOTE_CODE_EXECUTION]: The migration process involves executing commands and scripts on remote target hosts via
ssh, including the use ofbash -sto execute dynamically generated code blocks. - [PRIVILEGE_ESCALATION]: The
hs-restore.shscript relies onsudoto overwrite critical system configuration files in/etc/headscale/and database files in/var/lib/headscale/, as well as to stop and start system services. - [DYNAMIC_EXECUTION]: The
hs-migrate.shscript dynamically constructs a multi-line bash script at runtime and pipes it to a remote shell for execution on the target host. - [COMMAND_EXECUTION]: The scripts invoke several shell utilities such as
tar,rsync,ssh, andpkillto perform system-level operations across local and remote environments. - [INDIRECT_PROMPT_INJECTION]: The skill processes external backup archives which represents a potential vulnerability surface if malicious archives are supplied.
- Ingestion points: Backup tarball path passed to the restore script.
- Boundary markers: The script performs basic gzip integrity checks and verifies the presence of internal files like
db.sqliteandconfig.yaml. - Capability inventory: The skill has capabilities to modify the file system with root privileges and manage system services via
sudo. - Sanitization: There is no cryptographic signature verification or source authentication performed on the backup archives prior to restoration.
Audit Metadata