AI-powered intelligence layer for the sys-scan-graph security scanner.
Project description
╔══════════════════════════════════╗ ║ MazzLabs ║ ╟──────────────────────────────────╢ ║ Joseph Mazzini ║ ╚══════════════════════════════════╝
sys-scan-graph
System Security Scanner & Intelligence Graph
Sys-Scan-Graph is a high-speed security analysis tool that transforms raw data from multiple security surfaces into a unified, actionable report.
It combines a high-performance C++20 scanning engine with a Python-based intelligence layer featuring an embedded, fine-tuned Mistral-7B LLM with LoRA adapters. The core engine uses modern dependency injection patterns and type-safe enums to gather security data across 16 specialized scanners, outputting canonical JSON, NDJSON, SARIF, or HTML. The intelligence layer uses LangGraph state machines for cyclical reasoning, baseline learning via SQLite, and 32-dimensional process embeddings for novelty detection—all running locally with zero external API calls.
Key Features
- Blazing-fast scanning built in C++20 with deterministic, reproducible results
- Zero-trust AI intelligence powered by embedded fine-tuned Mistral-7B with LoRA adapters (NO external APIs)
- 16 specialized scanners covering processes, network, kernel modules, SUID/SGID, IOC detection, and compliance
- Multiple output formats including canonical JSON, NDJSON, SARIF, and self-contained HTML
- LangGraph-orchestrated analysis with cyclical reasoning and baseline learning
- Risk scoring and compliance with PCI DSS, HIPAA, and NIST CSF assessment
- Fleet-wide rarity analysis using SQLite baseline database with process novelty detection
- MITRE ATT&CK integration with native technique mapping and coverage analysis
Quick Start
Installation
Option 1: Install from Debian Package (Recommended)
# Add the Mazzlabs repository
echo "deb [signed-by=/etc/apt/trusted.gpg.d/mazzlabs-archive-keyring.gpg] https://apt.mazzlabs.works testing main" | sudo tee /etc/apt/sources.list.d/mazzlabs.list
# Import the GPG key
curl -fsSL https://apt.mazzlabs.works/mazzlabs-archive-keyring.gpg | gpg --dearmor | sudo tee /etc/apt/trusted.gpg.d/mazzlabs-archive-keyring.gpg > /dev/null
# Verify the key fingerprint (optional but recommended)
gpg --show-keys /etc/apt/trusted.gpg.d/mazzlabs-archive-keyring.gpg
# Update package lists and install
sudo apt update
sudo apt install sys-scan-graph
Option 2: Build from Source
# Clone the repository
git clone https://github.com/J-mazz/sys-scan-graph.git
cd sys-scan-graph
# Build the core scanner
cmake -B build -S . -DCMAKE_BUILD_TYPE=Release
cmake --build build -j$(nproc)
# Install Python dependencies for intelligence layer
cd agent
python3 -m venv .venv
source .venv/bin/activate
pip install -r requirements.txt
pip install -e .
Basic Usage
Using Installed Package
# Run a basic scan with canonical JSON output
sys-scan --canonical --output report.json
# Run with intelligence layer for AI-powered analysis
sys-scan-graph analyze --report report.json --out enriched_report.json
# Generate HTML report with visualizations
sys-scan-graph analyze --report report.json --out enriched_report.json --prev baseline.json
Using Source Build
# Run a basic scan with canonical JSON output
./build/sys-scan --canonical --output report.json
# Run with intelligence layer for AI-powered analysis
cd agent
sys-scan-graph analyze --report report.json --out enriched_report.json
Generate HTML Report
# Enable HTML generation in config.yaml, then run:
sys-scan-graph analyze --report report.json --out enriched_v2.json --prev enriched_report.json
Documentation
For detailed documentation, see our comprehensive wiki:
- Architecture Overview - High-level system architecture, core vs intelligence layer responsibilities
- Core Scanners - Scanner implementations, signals, output formats, and schemas
- Intelligence Layer - Pipeline stages, LangGraph orchestration, LLM providers, data governance
Additional Resources
- Rules Engine - Rule file formats, MITRE aggregation, severity overrides, validation
- CLI Guide - Complete command reference
- Extensibility - Adding custom scanners and rules
Repository Structure
This repository contains:
- Core Scanner (
src/,CMakeLists.txt) - High-performance C++ scanning engine - Intelligence Layer (
agent/) - Python-based analysis and enrichment - Rules (
rules/) - Security rules and MITRE ATT&CK mappings - Documentation (
docs/wiki/) - Comprehensive project documentation - Tests (
tests/,agent/tests/) - Test suites for both components
Key Design Principles
- Type-safe architecture with C++20 enums and dependency injection via ScanContext
- Deterministic, reproducible results with canonical JSON (RFC 8785 JCS) and stable ordering
- Zero-trust security with embedded LLM, capability dropping, and seccomp sandboxing
- Thread-safe parallelization with mutex-protected report aggregation
- Extensible plugin system supporting custom scanners, rules, and LLM providers
- Comprehensive testing with 919 test cases (698 C++, 221 Python)
Licensing
This project is licensed under the Apache License 2.0. See LICENSE for complete licensing details.
Support & Community
- Documentation: Wiki | GitHub Wiki
- Issues: GitHub Issues
- Discussions: GitHub Discussions
- Security: See
SECURITY.mdfor vulnerability disclosure
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 sys_scan_agent-5.0.3.dev0.tar.gz.
File metadata
- Download URL: sys_scan_agent-5.0.3.dev0.tar.gz
- Upload date:
- Size: 2.8 MB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
50e5eaf8732bee06e02cf5d5c778bea0a9b4e24730261a60ab9d71a7e407968a
|
|
| MD5 |
a833ab9e11da02ffdb2eb1eb92697e76
|
|
| BLAKE2b-256 |
f746ec1b61167fda2120b21c6f7548018147388a1108454abc4585ef469578c3
|
Provenance
The following attestation bundles were made for sys_scan_agent-5.0.3.dev0.tar.gz:
Publisher:
publish-pypi.yml on J-mazz/sys-scan-graph
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
sys_scan_agent-5.0.3.dev0.tar.gz -
Subject digest:
50e5eaf8732bee06e02cf5d5c778bea0a9b4e24730261a60ab9d71a7e407968a - Sigstore transparency entry: 606976377
- Sigstore integration time:
-
Permalink:
J-mazz/sys-scan-graph@cb55ba408d8fd88dd7a32e932f13e92cf82f6eb8 -
Branch / Tag:
refs/heads/main - Owner: https://github.com/J-mazz
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish-pypi.yml@cb55ba408d8fd88dd7a32e932f13e92cf82f6eb8 -
Trigger Event:
push
-
Statement type:
File details
Details for the file sys_scan_agent-5.0.3.dev0-py3-none-any.whl.
File metadata
- Download URL: sys_scan_agent-5.0.3.dev0-py3-none-any.whl
- Upload date:
- Size: 2.9 MB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
8274cf09ca951644d714297fef78087d35d07fc8dd7d8e2748c7c1ae8b2c3cc7
|
|
| MD5 |
914568728358c947ca7ef0e69c6b27fe
|
|
| BLAKE2b-256 |
5286302bdc10b33f719baf82c1965aac57a8fdab4979b7d641b5295a6b82aaed
|
Provenance
The following attestation bundles were made for sys_scan_agent-5.0.3.dev0-py3-none-any.whl:
Publisher:
publish-pypi.yml on J-mazz/sys-scan-graph
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
sys_scan_agent-5.0.3.dev0-py3-none-any.whl -
Subject digest:
8274cf09ca951644d714297fef78087d35d07fc8dd7d8e2748c7c1ae8b2c3cc7 - Sigstore transparency entry: 606976384
- Sigstore integration time:
-
Permalink:
J-mazz/sys-scan-graph@cb55ba408d8fd88dd7a32e932f13e92cf82f6eb8 -
Branch / Tag:
refs/heads/main - Owner: https://github.com/J-mazz
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish-pypi.yml@cb55ba408d8fd88dd7a32e932f13e92cf82f6eb8 -
Trigger Event:
push
-
Statement type: