DistroTrust scans a Linux root filesystem and produces structured trust-audit reports. It collects baseline system signals, supply-chain signals, and Tier 3 runtime signals, then scores and renders them for human review or automation.
- Tier 1: distro metadata, users, groups, cron, SUID/SGID binaries, services, repo inventory
- Tier 2: normalized repo config, unsigned packages, PATH shadowing,
/usr/localand/optinspection - Tier 3: live process audit, network listeners, runtime heuristics, kernel module inventory
The report format is JSON-first. Scoring weights live in templates/scoring.yaml, and finding metadata lives in templates/findings.yaml.
git clone https://github.com/keepittechie/dtrust.git
cd dtrust
# Generate a Tier 3 report
python3 dtrust_cli.py --tier 3 --rootfs / --out build/tier3.json
# Score it
python3 score-dtrust-report.py build/tier3.json > build/tier3.score.json
# Render the main HTML report
python3 render_pretty.py --in build/tier3.json --out build/tier3_pretty.html --score build/tier3.score.jsonOpen the report with:
xdg-open build/tier3_pretty.htmlGenerate reports:
python3 dtrust_cli.py --tier 1 --rootfs / --out build/tier1.json
python3 dtrust_cli.py --tier 2 --rootfs / --out build/tier2.json
python3 dtrust_cli.py --tier 3 --rootfs / --out build/tier3.jsonScore reports:
# Full score output
python3 score-dtrust-report.py build/tier3.json
# Findings only
python3 score-dtrust-report.py --findings-only build/tier3.json
# Compact CI-friendly summary
python3 score-dtrust-report.py --json-summary build/tier3.jsonRender reports:
# Main HTML renderer
python3 render_pretty.py --in build/tier3.json --out build/tier3_pretty.html --score build/tier3.score.json
# Lightweight Markdown/HTML fallback
python3 render_report.py --in build/tier3.json --out build/tier3.md
python3 render_report.py --in build/tier3.json --out build/tier3.html- Use
render_pretty.pyfor the main HTML report. - Use
render_report.pyonly if you want a simpler Markdown or HTML export.
make tier1
make tier2
make tier3
make score-json3
make render_pretty3
make regressionmake regression validates, scores, and renders the golden example reports under examples/.
.
├── dtrust_cli.py # Report generator
├── score-dtrust-report.py # Scoring and findings
├── render_pretty.py # Main HTML renderer
├── render_report.py # Minimal fallback renderer
├── examples/ # Golden reports for regression testing
├── scripts/ # Validation and helper scripts
├── templates/ # Schemas, scoring policy, finding policy
└── Makefile # Common tasks
- Tier 3 runtime inspection depends on live
/procand/sysdata. - Known third-party kernel module layouts such as Arch
extramodulesand DKMS paths are categorized separately from true path anomalies. - This tool helps investigate trust signals; it does not prove that a distro is safe.
See CONTRIBUTING.md. Before opening a PR, run:
make regressionLicensed under the Apache License, Version 2.0.