|
| 1 | +# Server Audit CLI |
| 2 | + |
| 3 | +Run a security audit on your Linux server in 2 minutes. One command. |
| 4 | + |
| 5 | +```bash |
| 6 | +curl -sSL https://audit.securecodehq.com/run/YOUR_TOKEN | bash |
| 7 | +``` |
| 8 | + |
| 9 | +## What it does |
| 10 | + |
| 11 | +- Scans SSH configuration (root login, port, authentication method, authorized keys) |
| 12 | +- Checks firewall exposure (open ports via ss/netstat) |
| 13 | +- Detects exposed secrets (.env files tracked by git, world-readable permissions, process environment) |
| 14 | +- Analyzes Docker misconfigurations (root containers, exposed ports, API access) |
| 15 | +- Checks database exposure (PostgreSQL, Redis, MongoDB network binding and auth) |
| 16 | +- Verifies system hardening (fail2ban, pending security updates, SSL certificates, swap, sudo users) |
| 17 | +- Reviews authentication logs (failed logins, attacking IPs, active attack detection) |
| 18 | + |
| 19 | +## What it does NOT do |
| 20 | + |
| 21 | +- Does not install anything persistent on your server |
| 22 | +- Does not open remote SSH connections to your server |
| 23 | +- Does not read file contents (only checks paths and permissions) |
| 24 | +- Does not run background processes or daemons |
| 25 | +- Does not modify any file, configuration, or system state |
| 26 | +- Does not store credentials, keys, or secrets |
| 27 | +- Self-deletes after execution |
| 28 | + |
| 29 | +## How the CLI works |
| 30 | + |
| 31 | +The CLI does not contain security logic. It is a generic runner. |
| 32 | + |
| 33 | +1. It asks our backend: "what should I check?" (receives a list of commands) |
| 34 | +2. It runs those commands locally on your server (read-only) |
| 35 | +3. It sends the raw results as JSON to our backend |
| 36 | +4. Our backend analyzes the results and generates your report |
| 37 | + |
| 38 | +The CLI never decides what is secure or insecure. |
| 39 | +It never scores, ranks, or evaluates anything. |
| 40 | +It executes commands and reports back. |
| 41 | + |
| 42 | +## What data leaves your server |
| 43 | + |
| 44 | +Every field transmitted is documented: |
| 45 | + |
| 46 | +- [Human-readable explanation](collector/what-we-send.md) |
| 47 | +- [Anonymized payload example](collector/payload-example.json) |
| 48 | +- [Machine-readable JSON Schema](collector/payload.schema.json) |
| 49 | + |
| 50 | +## Transparency |
| 51 | + |
| 52 | +The source code in [cli/](cli/) is the exact code that runs on your server. Not a simplified version, not a sanitized copy. The same code, byte for byte. |
| 53 | + |
| 54 | +Every security check is documented with the exact command executed on your server: |
| 55 | + |
| 56 | +- [SSH checks](checks/ssh.md) |
| 57 | +- [Firewall checks](checks/firewall.md) |
| 58 | +- [Filesystem checks](checks/filesystem.md) |
| 59 | +- [System checks](checks/system.md) |
| 60 | +- [Docker checks](checks/docker.md) |
| 61 | +- [Database checks](checks/databases.md) |
| 62 | +- [Log analysis checks](checks/logs.md) |
| 63 | + |
| 64 | +## Security model |
| 65 | + |
| 66 | +How the system works, what runs where, and why it cannot harm your server: |
| 67 | + |
| 68 | +- [Security model and threat analysis](security-model.md) |
| 69 | +- [What we collect and what we do not](privacy/what-we-collect.md) |
| 70 | + |
| 71 | +## Example output |
| 72 | + |
| 73 | +See what a security report looks like before running anything: |
| 74 | + |
| 75 | +- [Example report (free analysis)](example-output/report-free.md) |
| 76 | + |
| 77 | +## Install |
| 78 | + |
| 79 | +```bash |
| 80 | +curl -sSL https://audit.securecodehq.com/run/YOUR_TOKEN | bash |
| 81 | +``` |
| 82 | + |
| 83 | +## Dry run (no data sent) |
| 84 | + |
| 85 | +```bash |
| 86 | +curl -sSL https://audit.securecodehq.com/run/YOUR_TOKEN | bash -s -- --dry-run |
| 87 | +``` |
| 88 | + |
| 89 | +This executes all checks locally and prints the full JSON payload to stdout without sending anything. Compare the output with [our documented payload](collector/payload-example.json). |
| 90 | + |
| 91 | +## License |
| 92 | + |
| 93 | +[MIT](LICENSE) |
0 commit comments