01 The engine
YOUR INFRASTRUCTURE, AUDITED IN PLACE
An on-premise audit engine that reads your tree and reports what it finds: exposed credentials, loose permissions, lost file content, unpinned dependencies, and — only when you ask — which sockets are listening and whether they answer the world or just loopback. It writes a markdown report and a JSON result, and it exits with a code your pipeline can gate on. It never probes the network, never repairs anything, and never prints a secret: every finding carries a masked fingerprint instead.
02 What the audit covers
SECRET LEAKAGE
11 credential patterns — OpenAI, Anthropic, AWS key + secret, Stripe live, GitHub, Slack, private-key blocks, DB URLs, JWTs, generic assignments. Values are masked to a fingerprint; the secret never reaches the report.
DATA PRIVACY
Read-only by construction: the engine opens files to read, writes only the report path you name, and sends no packet. Nothing leaves the machine.
ACCESS CONTROL
World-writable files and directories, key material readable by group or world, .env/.pem/.key posture — measured with stat(), not assumed.
INTEGRITY CHECKS
Zero-filled files (content lost, size retained), zero-byte stubs, unpinned dependencies, missing lockfiles. This check exists because it caught real damage on this very tree.
03 How a run works
BUILD
Baseline
- Initial ScanWalk the tree, classify every file, skip binaries without losing the count.
- Secret Sweep11 patterns, line-accurate, masked evidence.
- Permission Censusworld-write + key-material modes, file and directory level.
EXPAND
Deep analysis
- Integrity SweepNUL-filled and empty files, unpinned deps, missing lockfiles.
- Surface MapListening sockets from /proc/net/tcp{,6} — kernel table read, zero packets, opt-in.
- Remediation PlanEvery finding code maps to one concrete command.
HARDEN
Production grade
- Markdown ReportSeverity-grouped, masked evidence, listening table, ordered plan.
- JSON ResultMachine-readable for CI: summary, by_severity, findings, listeners.
- CI GateExit 0 clean · 4 findings · 6 could-not-audit — wire it into a pipeline.
04 Proof of run · measured, not illustrated
$ python3 -m src.audit --version security-audit 1.0.0 $ python3 -m src.audit --path . --report audit.md --json audit.json ======================================================================== ON-PREMISE SECURITY AUDIT · security-audit 1.0.0 root: Services Products/Security-Audit files scanned: 20 listening sockets: 0 ======================================================================== [CRITICAL] INT-HOLLOW file content is zero-filled (data lost, size retained) at last-run.md evidence: 7643/7643 NUL fix: restore from backup or regenerate from the upstream original [LOW ] INT-EMPTY file is zero bytes at tests/__init__.py ------------------------------------------------------------------------ RESULT: 18 finding(s) {'critical': 15, 'low': 3} · read-only · no packets sent exit 4 $ python3 -m src.audit --path /tmp/clean-fixture --quiet exit 0 # clean tree stays clean — no invented findings $ python3 -m unittest discover -s tests Ran 21 tests in 0.039s OK
The 18 findings above are this repository's real damage — the audit engine's first useful act was auditing the tree it lives in. The high count is not success and not failure: it is the truth of a volume that has been silently zeroing files. The clean-fixture run proves the engine does not manufacture findings to look busy.
05 Install & use
# install (stdlib only — no pip, no venv) ./deploy.sh # → ~/.local/share/security-audit + ~/.local/bin/security-audit # audit a tree, write both report shapes security-audit --path ~/app --report audit.md --json audit.json # include the host's listening sockets (opt-in — a tree audit must not mix host state in) security-audit --path ~/app --surface # gate a pipeline on it security-audit --path . --quiet --min-severity high || exit 1
exit 0 = clean
exit 4 = findings
exit 6 = could not audit (stated, never a silent pass)
06 Tree integrity · measured this cycle
| Status | Bytes | SHA-256 | Path |
|---|---|---|---|
| INTACT | 433 | 9bd95be8ba7a | .env.example |
| INTACT | 111 | 283b28856a2d | .gitignore |
| INTACT | 6,349 | 9862ac7b3121 | LICENSE.md |
| INTACT | 1,786 | 1df485d81101 | NOTICE.md |
| INTACT | 2,654 | 6fa72c7ed3d3 | README.md |
| INTACT | 2,525 | 6c8e14eca848 | SECURITY.md |
| INTACT | 1,215 | 534c23cee2c2 | deploy.sh |
| INTACT | 10,064 | 9714dd8609c0 | docs/defensive-publications/E9_PATENT_CLAIM_STRUCTURE.md |
| INTACT | 7,183 | 1862d16a5cd9 | docs/defensive-publications/E9_PROTONIC_RESONANCE_ENGINE_INVENTION_DISCLOSURE.md |
| INTACT | 1,313 | 2a0a72b2be5b | docs/defensive-publications/NANODOC_HYBRID_ARCHITECTURE.md |
| INTACT | 13,215 | 1c2bbff04048 | docs/defensive-publications/QUAD_LAYER_IDENTITY_DISCLOSURE.md |
| INTACT | 13,272 | 8a94e844df54 | docs/defensive-publications/nOn_STATE_INVENTION_DISCLOSURE.md |
| INTACT | 11,688 | f336f8043dca | docs/ip-inventory/COORDINAMENT_ATTACK_SURFACE.md |
| INTACT | 12,214 | 6475b34b58ab | docs/ip-inventory/TRIANON_UNHACKABLE_VALIDATION.md |
| INTACT | 37 | 95e2990dbf44 | src/__init__.py |
| INTACT | 5,789 | 2c283545db5d | src/audit.py |
| INTACT | 5,223 | e37e88595d99 | src/hardener.py |
| INTACT | 4,574 | 30912b573304 | src/report.py |
| INTACT | 13,762 | 1b7bc0cae889 | src/scanner.py |
| INTACT | 8,211 | 617f4efdfb89 | tests/test_audit.py |
| NUL 100% | 901 | 72b8c37f7304 | EXECUTED.md |
| NUL 100% | 3,281 | cf0c3ca744b6 | docs/sales/CSM_SECURITY_LAYER_PITCH.md |
| NUL 100% | 2,892 | 6945629ff7d6 | docs/sales/INTERN_PROGRAM.md |
| NUL 100% | 3,453 | 55c031dfd9f9 | docs/sales/TARGET_CONTACTS.md |
| NUL 100% | 3,542 | ea9be80c9417 | docs/security-embed-specs/BUILD_INTEGRATION_SPECS.md |
| NUL 100% | 7,643 | 546c2eb014f2 | last-run.md |
| 0 B | 0 | e3b0c44298fc | tests/__init__.py |
Byte counts and digests read from disk at build time. The *.nul-destroyed-20261120 originals and
the 2026-11-06/08 .corrupt-nullpad-backup-* relics are preserved on disk but excluded from this
table — they are evidence, not source. tests/__init__.py is intentionally empty (package marker).