Linux Security Audit Project
Supported Operating Systems
| Distribution Family |
Versions |
Package Manager |
MAC Framework |
Status |
| Ubuntu |
24.04, 22.04, 20.04 |
APT |
AppArmor |
[x] Tested |
| Debian |
12 (Bookworm), 11 (Bullseye) |
APT |
AppArmor |
[x] Tested |
| Linux Mint |
21.x, 22.x |
APT |
AppArmor |
[x] Compatible |
| RHEL |
9, 8 |
DNF/YUM |
SELinux |
[x] Tested |
| Fedora |
41, 40, 39 |
DNF |
SELinux |
[x] Tested |
| Rocky Linux |
9, 8 |
DNF/YUM |
SELinux |
[x] Compatible |
| AlmaLinux |
9, 8 |
DNF/YUM |
SELinux |
[x] Compatible |
| CentOS Stream |
9, 8 |
DNF/YUM |
SELinux |
[x] Compatible |
| openSUSE |
Leap 15.x, Tumbleweed |
Zypper |
AppArmor |
[x] Compatible |
| SLES |
15 SP5+ |
Zypper |
AppArmor |
[x] Compatible |
| Arch Linux |
Rolling |
Pacman |
AppArmor |
[x] Compatible |
| Manjaro |
Rolling |
Pacman |
AppArmor |
[x] Compatible |
| Kali Linux |
2024.x+ |
APT |
AppArmor |
[x] Compatible |
Requirements: Root/sudo privileges - Python 3.7+ - 50 MB free disk space - No internet access required
Overview
The Linux Security Audit Project is a Python-based security compliance auditing tool that evaluates Linux systems against multiple industry-standard security frameworks. The current release performs 2,297 automated security checks across 16 compliance frameworks, generating interactive reports in HTML, JSON, CSV, XML, and Console formats with actionable remediation guidance.
Every check includes a severity rating (Critical/High/Medium/Low/Informational) and categorization by security domain, enabling compliance scoring from a single audit run. The tool is fully self-contained - zero external dependencies, pure Python stdlib - and supports parallel execution, intelligent caching, compliance scoring with configurable thresholds, and OS-aware checks across Debian, Red Hat, SUSE, and Arch distribution families.
Whether you're conducting compliance audits, hardening systems, maintaining security baselines, or generating evidence for assessors, this tool provides the depth and automation you need.
Key Features
Security Assessment
- 2,297 Security Checks across 16 compliance frameworks
- Multi-Framework Coverage - Core Baseline, CIS Benchmarks, CISA Best Practices, ENISA Cybersecurity, ISO 27001:2022, NIST SP 800-53/CSF 2.0/800-171, NSA Cybersecurity, DISA STIG
- Modular Architecture - run all frameworks or select specific modules
- Severity Classification - every check rated Critical/High/Medium/Low/Informational
- OS-Aware Checks - distribution-specific optimizations for Debian, Red Hat, SUSE, and Arch families
- Standalone Module Execution - any module can run independently without the orchestrator
- No External Dependencies - pure Python 3.7+ stdlib; zero pip/conda/external network calls
Performance Architecture
- Shared Components Library - multi-module caching and utility infrastructure
- Intelligent Caching - ~50% cache hit rate across modules via shared data
- Parallel Execution -
--parallel with configurable --workers count
- Direct /proc Reads - kernel parameter reads without subprocess overhead
- Dynamic Module Discovery - automatic detection and validation from
modules/ directory
- Performance Profiling -
--perf-profile flag for execution timing analysis (renamed from --profile in v3.7)
- Helper Caching Layer (v3.6) - per-process cache on
command_available, systemd_active, run_command, read_sysctl, read_file_safe, file_exists, directory_exists for 5-30x speedup on multi-module runs
- Cross-Module Correlation (v3.7) -
HostFacts registry computes ~80 derived host facts (FIM presence, FIPS state, MAC enforcement, firewall tool, container runtime, K8s indicators, tool inventories) once at audit start; modules consume from shared_data["host_facts"] instead of re-deriving
Per-Framework Split Reports
-
--split-reports - one focused report per framework in reports/by-framework/, alongside the combined report
-
--split-only - generate only the per-framework reports
- Audience-targeted - the PCI team gets a PCI report, the HIPAA team a HIPAA report, each with its own dashboard and score
- All formats - HTML, CSV, JSON, XML
Attack Surface Assessment
The --attack-surface flag generates a dedicated assessment report that
re-frames findings around exposure rather than pass/fail compliance. It is
produced from the same audit run and the host-facts registry, so it introduces
no duplicate checks.
-
--attack-surface - generate the attack-surface report (HTML + JSON)
- Ten exposure domains - Network Exposure, Authentication, Privilege
Escalation, Filesystem, Service Exposure, Kernel, Container, Credentials,
Cryptography, and Detection Coverage
- Severity-weighted scoring - each domain and the host receive an
exposure score (0-100) with a Minimal / Low / Moderate / High rating
- Host summary panel - distribution, firewall posture (each installed
tool with its active/inactive state), external TCP listener count, MAC
framework, auditd state, FIM tool, and container runtime
- Interactive HTML - dark/light theme, collapsible domains, per-column
filters, global search, sortable/resizable columns, and CSV/JSON/XML export
- CORE attack-surface checks (
CORE - Attack Surface):
- External TCP/UDP listeners and exposed services
- Legacy/insecure services (telnet, rsh, ftp, and similar)
- SUID/SGID inventory and world-writable files
- Container socket exposure (Docker/Podman) and kernel module-loading lockdown
- AS-008 Firewall posture - installed vs active vs configured across
ufw / firewalld / nftables / iptables (a host with a firewall package that
is installed but disabled is reported distinctly from one with none)
- AS-009 Executable PATH - world-writable or insecure directories on the
executable search path
- AS-010 Shared objects / linker - insecure
ld.so configuration and
writable library paths
Distribution Profiles
- Eight Built-in Profiles -
generic, rhel9, rhel8, ubuntu24, ubuntu22, debian12, alpine, suse15
- Subtractive-Only Filtering - profiles exclude inapplicable categories; never add or modify checks
- Strict Input Validation - profile names validated against
^[a-z][a-z0-9_-]{0,30}$; injection attempts rejected
- Hardcoded Profile Data - no external file loads, no
eval, no JSON/YAML parsing; profiles are auditable Python source
- CLI Integration -
--profile NAME and --list-profiles; --list-profiles shows applicable distros and excluded category prefixes per profile
Advanced Reporting
- Interactive HTML Reports with:
- Dark/Light theme toggle
- SVG donut chart executive dashboard with clickable segments
- Module Summary tiles (v3.7) - color-banded grid (green/yellow/orange/red by health) with score, pass/fail/warn/info/error counts, top severity badge, and anchor links to module sections
- Top Priority Findings (v3.7) - top 10 non-Pass results sorted by severity then status, displayed above the per-module tables
- In-column filtering and global search (include/exclude)
- Column resizing and column visibility toggles
- Multi-format export (CSV, Excel, JSON, XML, TXT)
- Checkbox-based row selection for targeted export
- Per-module and global export options
- Compliance matrix and remediation priority ranking
- Print CSS and Table of Contents
- Garamond typography, full-width header
- Compliance Scoring - simple, weighted, severity-adjusted methods with configurable pass/fail thresholds
- Host Identification - hostname, IP addresses, OS in every report format
- Multiple Output Formats - HTML, JSON, CSV, XML, Console, plus companion JSON metadata
- Structured Logging - dual console/file output, configurable levels, JSON format for SIEMs
Intelligent Remediation
- Interactive Remediation - review and apply fixes individually
- Automated Remediation - batch fix with safety confirmations
- Selective Remediation - target specific status types (Fail, Warning, Info)
- Targeted Remediation - fix only selected issues from JSON export
- Remediation Logging - full audit trail of all changes
- Safety Mechanisms - double-confirmation and countdown timers
v3.0 Foundation Capabilities (April 2026)
- Cross-Framework Correlation Registry - 135 mapped controls bridging CIS, NIST, STIG, ISO 27001, NSA, CISA, ENISA, PCI DSS, HIPAA, GDPR, CMMC, ACSC. Each finding automatically enriched with equivalents in every applicable framework.
- Risk Priority Scoring (1-100) - Combines severity, exploitability, exposure, and asset criticality into a single ranked score for prioritised remediation queues.
- Baseline Drift Detection -
--baseline compares against previous audit JSON to identify new failures, resolved findings, regressions, and improvements with compliance-score delta.
- Remediation Bundles - 8 production bundles (HardenSSH, HardenKernel, EnableAuditLogging, HardenAuthentication, LockDownNetwork, SecureBootChain, HardenSystemd, DisableLegacyProtocols) with documented impact profiles.
- Rollback Script Generation - Capture-before-modify pattern produces atomic bash rollback scripts for every remediation operation.
- OS Detection - 30+ Linux distributions across Debian, Red Hat, SUSE, Arch, Alpine, Gentoo, Slackware, Void, NixOS families. Detects kernel version, init system, MAC framework, firewall, container runtime, and cloud provider.
- Three-Method Compliance Scoring - Simple, weighted, and severity-adjusted methods for different reporting contexts.
v3.4-v3.5 Quality & Correctness Hardening (April 2026)
- Distro-Aware Remediation Library (
shared_components/remediation_library.py) - 49 registered tools with per-family install commands, supporting packages, post-install configuration steps, service enable/start commands, and verification commands. AIDE on Debian correctly includes aide-common; ClamAV service name routes per family (clamav-daemon on Debian vs clamd on RHEL); chrony service is chrony on Debian, chronyd elsewhere.
-
OSInfo.pretty_name - accurate human-readable distribution display (e.g. "Ubuntu 24.04.4 LTS", "Rocky Linux 9.3 (Blue Onyx)") with multi-tier fallback chain. Replaces the Linux X.Y.Z-generic string previously rendered by platform.system()/platform.release().
- Mock-based test suite (
tests/test_os_detection.py, tests/test_remediation_library.py) - 25 OS-detection tests covering Ubuntu 22.04/24.04/26.04, Debian 12, Mint, Pop!_OS, Kali, Parrot, RHEL 9, CentOS Stream, Rocky, AlmaLinux, Fedora 40, Oracle 9, Amazon 2023, openSUSE Leap/Tumbleweed, SLES, Arch, Manjaro, EndeavourOS, Alpine 3.19, Gentoo + universal invariants. 12 remediation library tests verify per-family parity, correct package manager syntax, and registered references.
- Mermaid architecture diagrams in
wiki/Architecture-and-Design.md - 6 rendered diagrams: system architecture, module execution lifecycle (sequence), cache hierarchy, remediation library flow, OS detection decision tree, audit pipeline phases.
- Runtime error fixes - DistBaseline
int(mode, 8) corrected (file_mode returns int, not string); NIST AU-9(2) audisp_set coerced to bool to prevent TypeError("unsupported operand type(s) for +: 'int' and 'str'").
Quality Assurance
- Status Normalization - consistent categorization (Pass/Fail/Warning/Info/Error)
- Execution Metadata - complete audit trail preservation
- Error Handling - graceful degradation on check failures
- Privilege-Aware - works with or without root (graceful degradation)
- Mock-based regression tests -
tests/ directory with stdlib-only test runner; no pytest required
Supported Frameworks
| Module |
Framework |
Checks |
Focus Areas |