MoltAudit Security Scanner
Defensive security audit tool for Moltbot/Clawdbot installations based on @mrnacknack's "10 ways to hack into a vibecoder's clawdbot".
Quick Reference
# Full audit
./molt-security-audit.sh
# Auto-fix safe issues
./molt-security-audit.sh --fix
# JSON output for CI/CD
./molt-security-audit.sh --json
# Quiet mode (failures only)
./molt-security-audit.sh --quiet
# Deep mode (includes live Gateway probe via native moltbot audit)
./molt-security-audit.sh --deep
# STIG mode: all DoD STIG/CIS/NIST hardening controls
./molt-security-audit.sh --stig
# STIG compliance report for CI/CD
./molt-security-audit.sh --stig --json
# STIG with auto-fix suggestions
./molt-security-audit.sh --stig --fix
Exit Codes
| Code |
Meaning |
| 0 |
All checks passed |
| 1 |
Critical failures detected |
| 2 |
Warnings only |
Security Checks Performed
Core Checks (always run)
- SSH Security - Password auth, root login, fail2ban
- Firewall - UFW/iptables/firewalld status
- Gateway Exposure - Clawdbot control gateway binding
- User Allowlist - Discord/Telegram/Slack ID restrictions
- Browser Profile - Isolated vs shared Chrome profile
- Password Manager - 1Password/Bitwarden/LastPass CLI session status
- Docker Security - Privileged mode, root user, host mounts, socket mounts
- File Permissions - .env, SSH keys, AWS credentials
- Exposed Tokens - API keys in configs/logs/history
- Running Processes - Root processes, exposed tokens in process list
- Moltbot Native Audit - DM/group policies, tool blast radius, browser control, plugins, model hygiene, sandbox config (requires
moltbot or clawdbot CLI)
STIG Checks (--stig flag)
- SSH Hardening - Idle timeout, host key perms, ciphers, MACs, PermitUserEnvironment, Protocol 2, RSA key size
- Kernel Hardening - ASLR, SYN cookies, IP forwarding, ICMP redirects (all+default), source routing (all+default), BPF, core dumps
- Audit Logging - auditd running, rules, critical rules (execve/passwd/shadow), log perms, retention, boot audit
- Mandatory Access Control - SELinux enforcing, AppArmor profiles
- Account Controls - Session timeout (value + readonly), account lockout, password complexity, empty passwords, root login
- Service Hardening - Debug shell, Ctrl-Alt-Del, core dumps, service count
- Cryptographic Controls - Crypto policy, FIPS mode, TLS min version (crypto-policies backend)
- File Integrity - AIDE/Tripwire/OSSEC/Samhain, world-writable files, SUID/SGID binaries
- AI Supply Chain - SBOM, model integrity, plugin allowlist, rate limiting, TLS, foreign model origin
- Container Security (extended) - Read-only rootfs, no-new-privileges, memory/CPU limits
- macOS Security - Application Firewall, FW logging, Gatekeeper, SIP
- Network Zero Trust - Exposed services, encrypted DNS, network segmentation
Common Workflows
Initial Server Hardening
# Run audit with auto-fix
./molt-security-audit.sh --fix
# Review remaining manual fixes in output
STIG Compliance Audit
# Full DISA STIG / CIS / NIST compliance check
./molt-security-audit.sh --stig
# JSON compliance report for CI/CD
./molt-security-audit.sh --stig --json > stig-report.json
# STIG with auto-fix suggestions
./molt-security-audit.sh --stig --fix
CI/CD Integration
# Add to pipeline
./molt-security-audit.sh --json > security-report.json
# Fail build on exit code 1
Risk Assessment
Run audit and check the risk score (0-100):
- 0-24: Good
- 25-49: Moderate Risk
- 50-74: High Risk
- 75+: Critical Risk
Manual Fix Commands
When --fix can't auto-remediate, use these:
# SSH hardening
sudo sed -i 's/PasswordAuthentication yes/PasswordAuthentication no/' /etc/ssh/sshd_config
sudo sed -i 's/PermitRootLogin yes/PermitRootLogin no/' /etc/ssh/sshd_config
sudo systemctl restart sshd
# Enable firewall
sudo ufw enable
sudo ufw default deny incoming
sudo ufw allow ssh
# Sign out password manager
op signout --all
# Fix file permissions
chmod 600 ~/.env ~/.aws/credentials ~/.ssh/id_*
Installation
# Clone repository
git clone https://github.com/signalfi/MoltAudit.git
cd MoltAudit
# Make executable
chmod +x molt-security-audit.sh
# Run
./molt-security-audit.sh
Converted and distributed by TomeVault — claim your Tome and manage your conversions.
1---2name: signalfi-moltaudit-moltaudit3description: MoltAudit Security Scanner4---56# MoltAudit Security Scanner78Defensive security audit tool for Moltbot/Clawdbot installations based on [@mrnacknack's "10 ways to hack into a vibecoder's clawdbot"](https://x.com/mrnacknack/status/2016134416897360212).910## Quick Reference1112```bash13# Full audit14./molt-security-audit.sh1516# Auto-fix safe issues17./molt-security-audit.sh --fix1819# JSON output for CI/CD20./molt-security-audit.sh --json2122# Quiet mode (failures only)23./molt-security-audit.sh --quiet2425# Deep mode (includes live Gateway probe via native moltbot audit)26./molt-security-audit.sh --deep2728# STIG mode: all DoD STIG/CIS/NIST hardening controls29./molt-security-audit.sh --stig3031# STIG compliance report for CI/CD32./molt-security-audit.sh --stig --json3334# STIG with auto-fix suggestions35./molt-security-audit.sh --stig --fix36```3738## Exit Codes3940| Code | Meaning |41|------|---------|42| 0 | All checks passed |43| 1 | Critical failures detected |44| 2 | Warnings only |4546## Security Checks Performed4748### Core Checks (always run)49501. **SSH Security** - Password auth, root login, fail2ban512. **Firewall** - UFW/iptables/firewalld status523. **Gateway Exposure** - Clawdbot control gateway binding534. **User Allowlist** - Discord/Telegram/Slack ID restrictions545. **Browser Profile** - Isolated vs shared Chrome profile556. **Password Manager** - 1Password/Bitwarden/LastPass CLI session status567. **Docker Security** - Privileged mode, root user, host mounts, socket mounts578. **File Permissions** - .env, SSH keys, AWS credentials589. **Exposed Tokens** - API keys in configs/logs/history5910. **Running Processes** - Root processes, exposed tokens in process list6011. **Moltbot Native Audit** - DM/group policies, tool blast radius, browser control, plugins, model hygiene, sandbox config (requires `moltbot` or `clawdbot` CLI)6162### STIG Checks (`--stig` flag)636412. **SSH Hardening** - Idle timeout, host key perms, ciphers, MACs, PermitUserEnvironment, Protocol 2, RSA key size6513. **Kernel Hardening** - ASLR, SYN cookies, IP forwarding, ICMP redirects (all+default), source routing (all+default), BPF, core dumps6614. **Audit Logging** - auditd running, rules, critical rules (execve/passwd/shadow), log perms, retention, boot audit6715. **Mandatory Access Control** - SELinux enforcing, AppArmor profiles6816. **Account Controls** - Session timeout (value + readonly), account lockout, password complexity, empty passwords, root login6917. **Service Hardening** - Debug shell, Ctrl-Alt-Del, core dumps, service count7018. **Cryptographic Controls** - Crypto policy, FIPS mode, TLS min version (crypto-policies backend)7119. **File Integrity** - AIDE/Tripwire/OSSEC/Samhain, world-writable files, SUID/SGID binaries7220. **AI Supply Chain** - SBOM, model integrity, plugin allowlist, rate limiting, TLS, foreign model origin7321. **Container Security** (extended) - Read-only rootfs, no-new-privileges, memory/CPU limits7422. **macOS Security** - Application Firewall, FW logging, Gatekeeper, SIP7523. **Network Zero Trust** - Exposed services, encrypted DNS, network segmentation7677## Common Workflows7879### Initial Server Hardening8081```bash82# Run audit with auto-fix83./molt-security-audit.sh --fix8485# Review remaining manual fixes in output86```8788### STIG Compliance Audit8990```bash91# Full DISA STIG / CIS / NIST compliance check92./molt-security-audit.sh --stig9394# JSON compliance report for CI/CD95./molt-security-audit.sh --stig --json > stig-report.json9697# STIG with auto-fix suggestions98./molt-security-audit.sh --stig --fix99```100101### CI/CD Integration102103```bash104# Add to pipeline105./molt-security-audit.sh --json > security-report.json106# Fail build on exit code 1107```108109### Risk Assessment110111Run audit and check the risk score (0-100):112- 0-24: Good113- 25-49: Moderate Risk114- 50-74: High Risk115- 75+: Critical Risk116117## Manual Fix Commands118119When `--fix` can't auto-remediate, use these:120121```bash122# SSH hardening123sudo sed -i 's/PasswordAuthentication yes/PasswordAuthentication no/' /etc/ssh/sshd_config124sudo sed -i 's/PermitRootLogin yes/PermitRootLogin no/' /etc/ssh/sshd_config125sudo systemctl restart sshd126127# Enable firewall128sudo ufw enable129sudo ufw default deny incoming130sudo ufw allow ssh131132# Sign out password manager133op signout --all134135# Fix file permissions136chmod 600 ~/.env ~/.aws/credentials ~/.ssh/id_*137```138139## Installation140141```bash142# Clone repository143git clone https://github.com/signalfi/MoltAudit.git144cd MoltAudit145146# Make executable147chmod +x molt-security-audit.sh148149# Run150./molt-security-audit.sh151```152153---154> Converted and distributed by [TomeVault](https://tomevault.io/claim/signalfi) — claim your Tome and manage your conversions.155<!-- tomevault:4.0:skill_md:2026-04-11 -->