heinzel-security
Skill94 starsChanged 2 months agoMITView on GitHub
Run a heinzel security audit on a server — SSH
In this repository5 other files it gives its agents.
- CLAUDE.mdCLAUDE.md
- heinzel-emailSkill
- heinzel-fleet-auditSkill
- heinzel-housekeepingSkill
- heinzel-macos-cleanupSkill
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
- Very specific: line 24
Load overrides: Before running any check, apply the full heinzel rule-override chain (later wins):
- Distinctive: line 38
Put commands with complex quoting (awk, sed) in their own batch so a quoting mistake does not cancel simple commands.
- Very specific: line 40
Probe shape: no taboo word as data (the guard denies the whole batch), no !
- Distinctive: line 78
Read on demand, only when the relevant section applies:
≈ “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.
Files
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
- Load overrides. Before running any check, apply the full
heinzel rule-override chain (later wins):
memory/custom-rules/heinzel-security.mdif present (global custom overrides for this skill —## Add:,## Replace:,## Remove:prefixes perCLAUDE.md).memory/servers/<hostname>/memory.mdfor context (services, legitimate external bindings, VPN role).memory/servers/<hostname>/rules.mdif present (per-server rule overrides — same prefixes as above, highest precedence). Note:memory/custom-rules/all.mdis already loaded by the CLAUDE.md session-start preflight — do not re-read it.
- 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.
- 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 inreferences/user-accounts.mdshows all three. - Select checks per the references below. Use the preferred method when privileges allow; fall back to the unprivileged method otherwise.
- Emit the report using the format in
references/report-format.md. - Do NOT update
memory.md. These are config observations, not state changes. Memory tracks what is installed and running, not security posture details. 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 -Ffor known-vulnerable packages,pfctl -s info/pfctl -srfor the firewall,sshd -Tfor SSH hardening,find / -perm -4000for SUID, sysctlsecurity.*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— auditss/lsofoutput, 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.
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
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.

