Skip to main content

Command menu

Jump to a page or search the catalog

AI Tools & Scripts

Cloud-init User-data Check

Check cloud-init user-data before you launch servers: plain-text passwords, SSH password login, root login, private keys and tokens, curl | bash over http, unsigned repos, risky file modes and a header cloud-init ignores.

$5.00

What you get: 1 file · 52.27 KB · ZIP

See purchase options

Product description

chpasswd with ubuntu:changeme and ssh_pwauth: true gives every new server a login password that other users and processes on it can often read from the metadata service, and opens SSH to password guessing. And "# cloud-config" with one extra space makes cloud-init skip the whole file without an error, so none of your users, keys or security settings are applied. This skill finds those and the other cloud-init mistakes below before you launch, and tells you how to fix each one.

Your agent runs a scanner on #cloud-config files, cloud.cfg.d files, Ubuntu autoinstall files, files named like user-data, and cloud-config embedded in Terraform heredocs, CloudFormation UserData, KubeVirt, LXD profiles and Vagrantfiles. It knows cloud-init's defaults (passwords locked, root login off, chpasswd type hash), the hash formats the legacy chpasswd list accepts, the legacy hyphenated keys, and Terraform cloudinit_config parts that need no header; it decodes base64 and gzip write_files content and treats template placeholders as set but unknown. It never runs cloud-init or the commands. It returns BLOCK, REVIEW, or NOT FLAGGED, with the file, line, reason, and a safer approach. Secrets are never printed.

What it checks

BLOCK (fix before shipping)

  • C01: passwords in clear text (plain_text_passwd, chpasswd text or legacy list, password, a plain value where a hash belongs, the autoinstall identity password, and commands such as echo or printf into chpasswd or passwd, chpasswd <<< and openssl passwd with a literal)
  • C02: SSH password login turned on (ssh_pwauth, PasswordAuthentication yes) while an account gets a usable password (a root-only password counts only with PermitRootLogin yes, since OpenSSH defaults to prohibit-password)
  • C03: code run as root that is fetched over plain HTTP or with certificate checks off: curl or wget piped into a shell (also through tee) or saved and then run, made executable or installed with dpkg, rpm or apt, rpm or dnf installs from http URLs, apt trusted=yes or yum/zypper gpgcheck off over http, executable write_files sources, Ansible, Puppet and Chef installer URLs
  • C04: private keys and credentials in user-data: PEM keys (also in base64 or gzip content and ssh_keys), known token formats, passwords in URLs, Authorization headers, WireGuard keys, secret-named settings, and secrets on command lines (docker or az login -p, --token, htpasswd -b, rabbitmqctl add_user and others)

REVIEW (check before release)

  • C11: scripts or packages downloaded over https and run or installed with no checksum or signature check
  • C12: root login allowed (disable_root: false, root users entry or password, PermitRootLogin yes)
  • C13: NOPASSWD sudo for every user, a group, a system account or a user who also has a password, in users entries or sudoers files written by write_files or echo/tee (key-only admins are not reported)
  • C14: lock_passwd: false for a user who gets a password
  • C15: TLS or signature checks off over https (curl -k, apt trusted=yes, gpgcheck off, --allow-unauthenticated, snap --dangerous, pip --trusted-host and others)
  • C16: write_files modes that everyone can write, or an unquoted mode like 644 that YAML reads as decimal
  • C17: files cloud-init will not read as cloud-config (misspelled header, also inside a heredoc, a comment or --- before it, no header at all, a byte-order mark or UTF-16)

What's included

  • The scanner (Python 3.9+, standard library only)
  • A rules guide with the reason, safer approach and official documentation link for each rule
  • A risky and a safe example project (cloud-config, Terraform and a NoCloud seed), and the real report the scanner produces on the risky one

Limits

It reads each file as written. Values a template fills in (Terraform, Jinja, Helm) are unknown, MIME multi-part user-data, #include URLs, compressed user-data, user-data shell scripts and vendor-data are not read, and cloud-config stored as a JSON string is not found. Shell commands are matched by pattern, not parsed. Ubuntu Pro tokens and Red Hat activation keys are not reported. Some official cloud-init examples are reported on purpose because they show a plain password, an account password, a Basic auth header, a demonstration private key or a host private key in user-data. NOT FLAGGED is not a guarantee.

Contents

One ZIP file with 16 files: SKILL.md, the scanner in scripts/ (7 Python files), references/rules.md (every rule with its reason and safer approach), and examples/ (6 example files plus report.md, the real scanner output on the risky example).

How to use: This is an agent skill: a folder with a SKILL.md file and Python scripts that an AI coding agent such as Claude Code, Cursor, or Codex CLI can run. Unzip it into your agent's skills folder (for Claude Code: ~/.claude/skills/), then ask your agent to check your project. The scripts also run on their own with Python 3.9 or newer, with nothing to install. They read your files only: no network access, and nothing is sent anywhere.

What you get

1 file · 52.27 KB

  • cloud-init-userdata-check-1.0.0.zipZIP · 52.27 KB
LicenseCommercial use allowed
Package checkPassed

Getly opened the uploaded files and found nothing that would stop them opening. It is not a virus scan or a quality rating.

PublishedNov 12, 2026
File size52.27 KB
File formatZIP
Versionv1.0

Tags

cloud-inituser-dataclouddevopssecurityai agent skill
R
RR HH

Frequently asked questions

Do I get access instantly?

Yes. This is a digital product - you can download it right after checkout, straight from your library.

Can I use it for commercial projects?

Yes. Commercial use is allowed: use it in your own business and in things you sell. You may not resell or redistribute the file itself.

What's your refund policy?

You can request a refund within 30 days. If something isn't right, request it from your order and the Getly team reviews it.

What file formats and sizes will I get?

You'll download 1 file - ZIP - 52.27 KB in total.

Do I get free updates?

Yes - when the seller ships a new version, you can re-download the latest files from your library at no extra cost. Check the changelog for recent updates.

Price

$5.00