Directory Compare FCRS-1.0 /llms.txt
← Back to Directory

Lynis

$ lynis Official Low Risk
CISOfy · Security & Secrets · GPL-3.0 · macos / linux

Lynis (lynis) is a POSIX shell security auditing tool for Linux, macOS, and BSD systems that inspects kernel settings, file permissions, installed packages, SSH/firewall configs, and malware indicators. Use --quick or --cronjob for non-interactive runs; results write to a key-value .dat report file rather than JSON.

FCRS-1.0 Score
72 /100
Usable w/ Caveats
Medium Confidence
Zero-Friction Install
brew install lynis
CLI vs MCP Decision CLI Only

lynis inspects local OS filesystems, sysctl values, and service configs directly on the target host.

Agent-Readiness Checklist

— JSON Output
— Field Filtering
✓ Non-Interactive
— Dry-Run
— Read-Only Mode
✓ NO_COLOR Clean
✓ Self-Describing
— Official SKILL.md

Static evaluation (not yet probed on this host). Run npm run data:probe locally to capture live verification.

FCRS-1.0 6-Dimension Breakdown

Agent-Readiness 16 / 25

Requires --quick or --cronjob to avoid interactive Enter pauses, lacks native JSON output, and writes an INI-style .dat report file.

  • Supports --quick, --cronjob, and --no-colors
  • No native --json output; emits .dat key-value lines
Trust & Safety 20 / 25

Performs non-destructive read-only host checks while writing log and report files locally.

  • Read-only system checks; only writes log/report output
Setup & Portability 10 / 15

POSIX shell script portable across Linux, macOS, and BSD via brew or distro packages, with no Windows support.

  • Unix/Linux/macOS only; no Windows support
Utility & Efficiency 11 / 15

Broad host hardening baseline covering hundreds of OS checks in one pass, though verbose stdout slows agent triage.

  • Hundreds of built-in OS hardening and compliance checks
Maintenance & Lineage 8 / 10

Maintained by CISOfy (CISOfy/lynis) under GPL-3.0 for over a decade.

  • Official CISOfy/lynis upstream
Docs & Verifiability 7 / 10

Solid online documentation, though --help flag coverage is spread across subcommands and profiles.

  • Official documentation at cisofy.com/documentation/lynis/

Security, Auth & Guardrails

Auth Modes
No Auth
Credential Storage

No external credentials needed; root privileges (sudo) unlock deeper kernel and /etc permission checks.

Side Effects
Read-Only Local Write
Cost & Quotas

GPL-3.0 open-source CLI; free for local host auditing (enterprise server management is paid).

Copyable Guardrail for CLAUDE.md / AGENTS.md
# Lynis (lynis) Agent Rules
- Always pass `--quick` (or `--cronjob`) and `--no-colors` so Lynis never pauses for Enter.
- Write reports to an explicit `--report-file` path and parse `warning[]` / `suggestion[]` keys instead of scraping colored stdout.

Agent-Ready Command Recipes

Safe Read-Only Queries

Run a non-interactive host audit
lynis audit system --quick --no-colors --report-file /tmp/lynis-report.dat

Audits the local host without pausing on prompts (--quick), disables ANSI via --no-colors, and writes findings to /tmp/lynis-report.dat.

Run a single test group in cron mode
lynis audit system --cronjob --tests-from-group ssh

Limits checks to the ssh test group under silent --cronjob automation mode.

Strengths for Agents

  • + Comprehensive, battle-tested Unix/Linux/macOS hardening audit with zero compilation needed.
  • + --tests-from-group and --quick allow targeted, non-blocking execution.

Caveats & Pitfalls

  • ! No JSON output—agents must parse warning[] and suggestion[] entries from the .dat report file.
  • ! Omitting --quick or --cronjob causes interactive pauses waiting for user keypresses; Windows is unsupported.

Tested Agent Hosts

Claude Code Codex CLI Gemini CLI