agentleFS
wintermeyerwintermeyer/heinzel/.claude/skills/heinzel-security/SKILL.md

heinzel-security

Skill94 starsChanged 2 months agoMITView on GitHub

Run a heinzel security audit on a server — SSH

The file

We split this skill into the rules it gives an agent

4 rules. About 0 are common, 2 are distinctive, and 2 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈2

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 2

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Very specific:

    Load overrides: Before running any check, apply the full heinzel rule-override chain (later wins):

    line 24
  2. Distinctive:

    Put commands with complex quoting (awk, sed) in their own batch so a quoting mistake does not cancel simple commands.

    line 38
  3. Very specific:

    Probe shape: no taboo word as data (the guard denies the whole batch), no !

    line 40
  4. Distinctive:

    Read on demand, only when the relevant section applies:

    line 78

≈ “Common” is an estimate: at least 1 in 5 of the 213,897 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

heinzel-security

Security configuration audit for a server or the local machine. Never run automatically — only on explicit user request. The whole of the heinzel first-connection onboarding pipeline still applies before any of this runs.

Workflow

  1. Load overrides. Before running any check, apply the full heinzel rule-override chain (later wins):
    • memory/custom-rules/heinzel-security.md if present (global custom overrides for this skill — ## Add:, ## Replace:, ## Remove: prefixes per CLAUDE.md).
    • memory/servers/<hostname>/memory.md for context (services, legitimate external bindings, VPN role).
    • memory/servers/<hostname>/rules.md if present (per-server rule overrides — same prefixes as above, highest precedence). Note: memory/custom-rules/all.md is already loaded by the CLAUDE.md session-start preflight — do not re-read it.
  2. Run checks in 2–3 parallel batches for speed — not one massive batch. If a single parallel tool call errors, Claude Code cancels sibling calls, so grouping limits blast radius. Put commands with complex quoting (awk, sed) in their own batch so a quoting mistake does not cancel simple commands.
  3. Probe shape: no taboo word as data (the guard denies the whole batch), no ! (zsh mangles it over SSH), and report what you do not recognize instead of printing only what you expect. The System Accounts check in references/user-accounts.md shows all three.
  4. Select checks per the references below. Use the preferred method when privileges allow; fall back to the unprivileged method otherwise.
  5. Emit the report using the format in references/report-format.md.
  6. Do NOT update memory.md. These are config observations, not state changes. Memory tracks what is installed and running, not security posture details.
  7. Log the summary to the system journal and mirror to the local changelog per rules/changelog.md:

    logger -t heinzel "Security audit: 1 WARN, 1 INFO"

Scope and limits

  • Linux (Debian, Ubuntu, RHEL, CentOS, Fedora, SUSE) and macOS are fully covered by the references below.
  • FreeBSD baselines are not yet covered. On a FreeBSD host, do not silently skip: run the closest equivalent checks manually (pkg audit -F for known-vulnerable packages, pfctl -s info / pfctl -sr for the firewall, sshd -T for SSH hardening, find / -perm -4000 for SUID, sysctl security.* knobs) and state in the report that FreeBSD has no baseline reference yet.

Cross-references

Automatic security updates are checked during housekeeping (see heinzel-housekeeping skill). This audit does not duplicate that check.

References

Read on demand, only when the relevant section applies:

  • references/report-format.md — required output format and severity rules (CRITICAL / WARN / INFO).
  • references/ssh.md — SSH password auth, root login, weak algorithms, MaxAuthTries, X11Forwarding (Linux and macOS).
  • references/firewall.md — Linux (ufw / firewalld) and macOS (Application Firewall).
  • references/firewall-nftables-docker.md — native nftables without ufw or firewalld, iptables-legacy rules next to nf_tables, Docker ports published past the firewall.
  • references/user-accounts.md — empty passwords, multiple UID 0, system accounts with login shells.
  • references/listening-services.md — audit ss / lsof output, flag databases on 0.0.0.0.
  • references/kernel-os.md — sysctl checks: ASLR, IP forwarding, ICMP redirects, SUID core dumps.
  • references/file-permissions.md — world-writable system files, SUID/SGID audit, /tmp mount options, cron perms, unowned files.
  • references/intrusion-prevention.md — fail2ban status.
  • references/macos-security.md — SIP, FileVault, Gatekeeper.
  • references/unprivileged.md — which checks work without root, which need it, and how to report skipped ones.

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.