SKILLEMALL.ai

FD headscale-backup

Backup, restore, and migrate Headscale installations — SQLite database, configuration file, policy file, and TLS certificates. Use when backing up a headscale server before upgrades, migrating to new hardware, or restoring from a disaster.

Not recommendedcritical or high security findings · low grade F
magnus919/agent-skills Agent Skills author: magnus919 MIT 6 files · 3 scripts body ≈ 734 tokens Open the sourcegithub.com↗ analyzed 27 h ago

Backup, restore, and migrate Headscale installations — SQLite database, configuration file, policy file, and TLS certificates.

As a process D 47/100 · Unfinished process — weak spots: result and completion, inputs and preconditions, failures and branches

ProcedureInfrastructuretype and topics are labelled automatically from the skill text
JSON
Technical rating
F
51/100
safety, quality, tests
Safety 60%
31
Quality 40%
81
Run on models
none yet
Process rating
D
47/100
Unfinished process
Result and completion w 14
0
Inputs and preconditions w 11
0
Failures and branches w 10
0
the three weakest of ten parameters · all ten

What is at stake

The skill contains fragments that, in the wrong hands, cost money or data. Below: what the installer risks and what the author should do.

Dangerous commands
If you install

The skill contains commands that delete files, rewrite disks or execute code fetched from the network. The agent may run them without asking if it believes the instructions require it.

For the author

Replace destructive commands with safe equivalents that ask for confirmation, scope them to one folder, and stop piping curl into a shell: pin a version and a checksum.

How to improve

  1. Address the high-severity findings: each costs 18 safety points. If one is a false positive, add the rule id to guard.allow in spec.yaml.
For the model run — optional
  • A spec.yaml with trigger phrases and assertions — a behaviour contract for CI; `skilltest init` writes a template.

Guard findings · 12

  • high Dangerous commands cmd-persistence scripts/hs-restore.sh:290
    Persistence mechanism (cron / launchd / scheduled task / autorun registry)
    sudo launchctl bootstrap system "/Library/LaunchDaemons/${HEADSCALE_SERVICE}.plist" 2>/dev/null || \
Medium and low: 11
  • medium Dangerous commands cmd-privilege scripts/hs-migrate.sh:184
    Privilege escalation / world-writable permissions
    sudo cp /tmp/restore/\${RESTORE_DIR}/config.yaml /etc/headscale/config.yaml
  • medium Dangerous commands cmd-privilege scripts/hs-migrate.sh:185
    Privilege escalation / world-writable permissions
    sudo cp /tmp/restore/\${RESTORE_DIR}/db.sqlite /var/lib/headscale/db.sqlite
  • medium Dangerous commands cmd-privilege scripts/hs-migrate.sh:186
    Privilege escalation / world-writable permissions
    [ -f /tmp/restore/\${RESTORE_DIR}/policy.json ] && sudo cp /tmp/restore/\${RESTORE_DIR}/policy.json /etc/headscale/policy.json
  • medium Dangerous commands cmd-privilege scripts/hs-migrate.sh:187
    Privilege escalation / world-writable permissions
    [ -d /tmp/restore/\${RESTORE_DIR}/certs ] && sudo cp /tmp/restore/\${RESTORE_DIR}/certs/* /etc/headscale/ 2>/dev/null || true
  • medium Dangerous commands cmd-persistence scripts/hs-restore.sh:217
    Persistence mechanism (cron / launchd / scheduled task / autorun registry) (quoted — discussed, not commanded)
    sudo launchctl bootout system "/Library/LaunchDaemons/${HEADSCALE_SERVICE}.plist" 2>/dev/null || \
    quoted
  • medium Dangerous commands cmd-privilege scripts/hs-restore.sh:238
    Privilege escalation / world-writable permissions
    sudo cp "${RESTORE_DIR}/config.yaml" "$HEADSCALE_CONFIG"
  • medium Dangerous commands cmd-privilege scripts/hs-restore.sh:239
    Privilege escalation / world-writable permissions
    sudo chmod 644 "$HEADSCALE_CONFIG"
  • medium Dangerous commands cmd-privilege scripts/hs-restore.sh:246
    Privilege escalation / world-writable permissions
    sudo cp "${RESTORE_DIR}/db.sqlite" "${HEADSCALE_DATA_DIR}/db.sqlite"
  • medium Dangerous commands cmd-privilege scripts/hs-restore.sh:247
    Privilege escalation / world-writable permissions
    sudo chmod 600 "${HEADSCALE_DATA_DIR}/db.sqlite"
  • medium Dangerous commands cmd-privilege scripts/hs-restore.sh:254
    Privilege escalation / world-writable permissions
    sudo cp "${RESTORE_DIR}/policy.json" "$POLICY_TARGET"
  • low Dangerous commands cmd-background-process scripts/hs-restore.sh:295
    Starts a background / autostarted process
    nohup headscale serve &>/dev/null &

Files scanned: 5. Evidence is masked. Grey chips explain why severity was lowered.

Against the Agent Skills spec

✓ No remarks against the Agent Skills spec

Process rating: all ten parameters 47/100

  • 0Result and completion. Does not say what the result is
  • 0Inputs and preconditions. Does not say what the process needs to start
  • 0Failures and branches. Linear process with no failure handling
  • 0Progress reporting. Says nothing while it works
  • 30Running it twice. 3 mutating operations with no state check
  • 50When it triggers. No condition that starts the skill
  • 60Tools and files. Uses tools (node) that frontmatter does not declare
  • 100Steps. 28 steps
  • 100Consistency. Name and required fields are in place
  • 100Execution cost. Instruction body is 734 tokens
  • low 11 top-level sections: this looks like several domains in one skill
  • medium 6 test cases, all positive: not one "should refuse" or "should ask first"
  • low No test case covers injection arriving through data

Everything here is measured from the skill text rather than judged by a model, so the numbers are checkable. A parameter weighs more when it is a more common reason for the process to stall.

Quality signals

  • +5Description has no quoted example phrases that should trigger the skill
  • +4Description does not say when NOT to use the skill (false activations)
  • +3Output format is not stated: the model decides each time
  • -32 of 3 scripts are never mentioned in SKILL.md
  • +1No license
  • +2Single-language instructions
  • +3Description length 239: enough signal without eating the budget
  • +4Structure: 12 headings
  • +3Step-by-step instructions: 28 items
  • +4Has examples (1 code blocks)

Quality base 70; lint remarks subtract, signals add up to 100. Result: 81.