Comprehensive Linux Security Audit Tool with Phase 1 & 2 Features
Project description
VigileGuard - Linux Security Audit Tool
๐ก๏ธ VigileGuard is a comprehensive security audit tool designed for developer-focused startups and Linux systems. It performs automated security checks, identifies vulnerabilities, and provides actionable recommendations for system hardening and compliance.
VigileGuard is a comprehensive security audit tool designed specifically for Linux systems. It provides automated security assessments, compliance mapping, and detailed reporting to help system administrators and security professionals identify and remediate security vulnerabilities.
๐ Features
Phase 1 (Core Security Checks)
- File Permission Analysis - Detect world-writable files, incorrect permissions on sensitive files
- User Account Security - Check for weak passwords, duplicate UIDs, sudo misconfigurations
- SSH Configuration Review - Analyze SSH settings for security best practices
- System Information Gathering - Collect OS version, kernel info, running services
Phase 2 (Advanced Security & Reporting)
- Web Server Security - Apache/Nginx configuration analysis, SSL/TLS checks
- Network Security Analysis - Port scanning, firewall configuration review
- Enhanced HTML Reporting - Beautiful, interactive security reports
- Compliance Mapping - PCI DSS, SOC 2, NIST CSF, ISO 27001 alignment
- Notification Integrations - Email, Slack, webhook notifications
- Trend Tracking - Historical analysis and security trend monitoring
- Scheduled Scanning - Automated recurring security audits
๐ Project Structure
VigileGuard/
โโโ vigileguard/ # Main package directory
โ โโโ __init__.py # Package initialization
โ โโโ vigileguard.py # Core Phase 1 + 2 scanner
โ โโโ web_security_checkers.py # Phase 2 web security modules
โ โโโ enhanced_reporting.py # Phase 2 reporting system
โ โโโ phase2_integration.py # Phase 2 integration & config
โโโ scripts/ # Utility scripts
โ โโโ badge_generator.py # Generate status badges
โ โโโ report_analyzer.py # Analyze scan reports
โ โโโ vigileguard-install.sh # Installation script
โโโ tests/ # Test suite
โ โโโ test_vigileguard.py # Core functionality tests
โ โโโ test_web_security.py # Web security tests
โ โโโ test_reporting.py # Reporting tests
โโโ docs/ # Documentation
โโโ examples/ # Example configurations
โโโ config.yaml # Default configuration
โโโ requirements.txt # Python dependencies
โโโ setup.py # Package setup
โโโ pyproject.toml # Modern Python packaging
โโโ Makefile # Development commands
โโโ README.md # This file
๐ง Installation
Quick Install (Recommended)
# Download and run the installer
curl -sSL https://raw.githubusercontent.com/navinnm/VigileGuard/main/install.sh | bash
# Or install from PyPI
pip install vigileguard
Development Installation
# Clone the repository
git clone https://github.com/navinnm/VigileGuard.git
cd VigileGuard
# Install in development mode
make install-dev
# Or manually
pip install -e ".[dev,full]"
Virtual Environment Installation
# Create and activate virtual environment
python3 -m venv vigileguard-env
source vigileguard-env/bin/activate
# Install VigileGuard
pip install vigileguard
# Or from source
pip install -e .
Docker Installation
# Build Docker image
docker build -t vigileguard .
# Run in container
docker run --rm -v $(pwd)/reports:/app/reports vigileguard --format html
๐ Quick Start
Basic Usage
# Run basic console scan
vigileguard
# Generate HTML report
vigileguard --format html --output security-report.html
# Generate JSON report
vigileguard --format json --output security-report.json
# Generate all report formats
vigileguard --format all --output ./reports/
Advanced Usage
# Use custom configuration
vigileguard --config custom-config.yaml --format html
# Specify environment
vigileguard --environment production --format json
# Enable notifications
vigileguard --notifications --format html
# Debug mode
vigileguard --debug --format console
Using Make Commands
# Install and setup
make install-dev
# Run tests
make test
# Format code
make format
# Run security scans
make security
# Build package
make build
# Generate HTML report
make run-html
# Run all formats
make run-all
โ๏ธ Configuration
Create a configuration file at ~/.config/vigileguard/config.yaml:
vigileguard:
# Output settings
output:
directory: "./reports"
timestamp_format: "%Y%m%d_%H%M%S"
# Security checks
checks:
file_permissions: true
user_accounts: true
ssh_configuration: true
web_security: true
network_security: true
# Reporting
reports:
include_compliance: true
severity_threshold: "INFO"
# Phase 2 features
phase2:
enabled: true
web_security_deep_scan: true
enhanced_html_reports: true
# Notifications (Phase 2)
notifications:
enabled: false
email:
smtp_server: "smtp.gmail.com"
smtp_port: 587
username: "your-email@domain.com"
recipients: ["admin@company.com"]
slack:
webhook_url: "https://hooks.slack.com/..."
channel: "#security"
๐ Report Examples
Console Output
๐ก๏ธ VigileGuard Security Audit
==============================
โ
FilePermissionChecker completed - 3 findings
โ
UserAccountChecker completed - 1 findings
โ
SSHConfigChecker completed - 2 findings
โ
WebServerSecurityChecker completed - 4 findings
โ
NetworkSecurityChecker completed - 0 findings
๐ Audit Results
================
CRITICAL: 1
HIGH: 3
MEDIUM: 4
LOW: 2
HTML Report Features
- Interactive Dashboard - Summary cards, charts, and graphs
- Detailed Findings - Expandable cards with recommendations
- Compliance Mapping - Framework alignment visualization
- Trend Analysis - Historical comparison charts
- Export Options - PDF generation, CSV export
JSON Report Structure
{
"scan_info": {
"timestamp": "2025-06-11T20:39:00Z",
"hostname": "web-server-01",
"version": "2.0.0"
},
"summary": {
"total_findings": 10,
"by_severity": {"CRITICAL": 1, "HIGH": 3, "MEDIUM": 4, "LOW": 2}
},
"findings": [...],
"compliance": {...},
"trends": {...}
}
๐ Security Frameworks
VigileGuard maps findings to major compliance frameworks:
- PCI DSS - Payment Card Industry Data Security Standard
- SOC 2 - Service Organization Control 2
- NIST CSF - NIST Cybersecurity Framework
- ISO 27001 - Information Security Management
- CIS Controls - Center for Internet Security
๐ง Development
Setting Up Development Environment
# Clone repository
git clone https://github.com/navinnm/VigileGuard.git
cd VigileGuard
# Setup development environment
make dev-setup
# Run tests
make test
# Run linting
make lint
# Format code
make format
Running Tests
# Unit tests
make test
# All tests with coverage
make test-all
# Specific test file
pytest tests/test_vigileguard.py -v
# Integration tests
pytest tests/ -m integration
Code Quality
# Format code
make format
# Lint code
make lint
# Security checks
make security
# All quality checks
make dev-check
๐ณ Docker Usage
Build and Run
# Build image
make docker-build
# Run scan
make docker-run
# Interactive shell
make docker-shell
# Custom command
docker run --rm -v $(pwd)/reports:/app/reports vigileguard:latest --format json
Docker Compose
version: '3.8'
services:
vigileguard:
build: .
volumes:
- ./reports:/app/reports
- ./config:/app/config
command: ["--format", "html", "--output", "/app/reports/report.html"]
๐ Scheduled Scanning
Cron Setup
# Setup daily scans
./install.sh --setup-cron
# Manual cron entry (daily at 2 AM)
0 2 * * * /usr/local/bin/vigileguard --format json --output /var/log/vigileguard/daily-$(date +\%Y\%m\%d).json
Systemd Timer
# /etc/systemd/system/vigileguard.timer
[Unit]
Description=VigileGuard Security Scan
Requires=vigileguard.service
[Timer]
OnCalendar=daily
Persistent=true
[Install]
WantedBy=timers.target
๐ง API Usage
Python API
import vigileguard
# Create audit engine
engine = vigileguard.create_audit_engine()
# Run audit
findings = engine.run_audit()
# Generate reports
report_manager = vigileguard.ReportManager(findings, scan_info)
report_manager.generate_all_formats("./reports")
# Check Phase 2 availability
if vigileguard.check_phase2_availability():
print("Phase 2 features available")
Command Line Integration
# JSON output for scripting
vigileguard --format json | jq '.summary.total_findings'
# Exit code based on findings
vigileguard --format console
echo "Exit code: $?" # Non-zero if critical/high issues found
# Custom severity threshold
vigileguard --format json | jq '.findings[] | select(.severity=="CRITICAL")'
๐จ Troubleshooting
Common Issues
Phase 2 Components Not Available
# Check if Phase 2 files exist
ls vigileguard/web_security_checkers.py
ls vigileguard/enhanced_reporting.py
ls vigileguard/phase2_integration.py
# Reinstall with Phase 2
pip uninstall vigileguard
pip install vigileguard[full]
Permission Errors
# Run with appropriate privileges
sudo vigileguard --format console
# Or use user installation
pip install --user vigileguard
Missing Dependencies
# Install all dependencies
pip install vigileguard[full]
# Or install manually
pip install rich click PyYAML requests
Debug Mode
# Enable debug output
vigileguard --debug --format console
# Check imports
python -c "import vigileguard; print(vigileguard.get_version())"
# Verbose logging
export VIGILEGUARD_LOG_LEVEL=DEBUG
vigileguard --format console
๐ค Contributing
We welcome contributions! Please see our Contributing Guide for details.
Development Workflow
- Fork the repository
- Create a feature branch
- Make your changes
- Run tests:
make test - Submit a pull request
Code Standards
- Follow PEP 8 style guidelines
- Add tests for new features
- Update documentation
- Run
make dev-checkbefore submitting
๐ License
This project is licensed under the MIT License - see the LICENSE file for details.
๐ก๏ธ Security
For security issues, please email security@vigileguard.dev or see SECURITY.md.
๐ Support
- Documentation: GitHub Wiki
- Issues: GitHub Issues
- Discussions: GitHub Discussions
- Email: support@vigileguard.dev
๐ Acknowledgments
- Security best practices from OWASP, NIST, and CIS
- Linux security community
- Open source security tools ecosystem
Made with โค๏ธ by the VigileGuard Team
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file vigileguard-1.0.6.tar.gz.
File metadata
- Download URL: vigileguard-1.0.6.tar.gz
- Upload date:
- Size: 65.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.8.18
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
dba011c6b563a62c51a2c861f06f13ab46defe98e69f117692b078a6e753c47e
|
|
| MD5 |
6ae90187a41e5a4443f1bb438c6e3813
|
|
| BLAKE2b-256 |
9b1ca8eac6b83ba6a5b6280e669de2a682aa0142815f3e2ab328ced3e6606c3a
|
File details
Details for the file vigileguard-1.0.6-py3-none-any.whl.
File metadata
- Download URL: vigileguard-1.0.6-py3-none-any.whl
- Upload date:
- Size: 44.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.8.18
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
f2a20920d6ddb4e7b8c88af6af224301643b6dd599e0c2c96e2ecb00918c3539
|
|
| MD5 |
e58c8f36b549f5c11875f9c00d0e6674
|
|
| BLAKE2b-256 |
5f798b56706d8900a3a9b276819fba89ee0bb1e3d2084af2cdc5372c5fc69b68
|