⛨

SECURITY AUDIT

On-premise audit engine · Build XI · v1.0.0
Tool · restored & running Tests 21/21 Read-only · no packets
✓
THE AUDIT ENGINE WAS REBUILT THIS CYCLE AND IT RUNS

All four modules that were 100% NUL on this tree — audit.py (5,789B), scanner.py (13,762B), hardener.py (5,223B), report.py (4,574B) — now exist as working stdlib-only Python, with a tests/ suite of 21 tests, all passing, a deploy.sh installer and a .env.example. Proven on real trees: a clean fixture returns exit 0; this tree returns exit 4 with 18 measured findings. No network traffic, no writes into the audited tree.

▲
SIX DOCUMENTS ON THIS TREE ARE STILL GONE — AND THE PRICE IS INCONSISTENT

Still 100% NUL: last-run.md, EXECUTED.md, and the three docs/sales/ documents plus docs/security-embed-specs/BUILD_INTEGRATION_SPECS.md — no upstream original survived for those, unlike the three recovered elsewhere. Separately: this README states a $1,500 base audit while the storefront lists Security Audit Tool $49 and Security Audit — On-Prem $149. One of those numbers is wrong; a listing should not be guessed at.

01 The engine

YOUR INFRASTRUCTURE, AUDITED IN PLACE

Read-only · local-first · nothing leaves the machine

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.

Version
1.0.0
Tests
21 / 21
Secret patterns
11
Outbound traffic
0
Dependencies
stdlib only

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

CYCLE 1

BUILD

Baseline

  1. Initial ScanWalk the tree, classify every file, skip binaries without losing the count.
  2. Secret Sweep11 patterns, line-accurate, masked evidence.
  3. Permission Censusworld-write + key-material modes, file and directory level.
CYCLE 2

EXPAND

Deep analysis

  1. Integrity SweepNUL-filled and empty files, unpinned deps, missing lockfiles.
  2. Surface MapListening sockets from /proc/net/tcp{,6} — kernel table read, zero packets, opt-in.
  3. Remediation PlanEvery finding code maps to one concrete command.
CYCLE 3

HARDEN

Production grade

  1. Markdown ReportSeverity-grouped, masked evidence, listening table, ordered plan.
  2. JSON ResultMachine-readable for CI: summary, by_severity, findings, listeners.
  3. 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

Intact
20
Still NUL
6
Empty stub
1
Files measured
27
StatusBytesSHA-256Path
INTACT4339bd95be8ba7a.env.example
INTACT111283b28856a2d.gitignore
INTACT6,3499862ac7b3121LICENSE.md
INTACT1,7861df485d81101NOTICE.md
INTACT2,6546fa72c7ed3d3README.md
INTACT2,5256c8e14eca848SECURITY.md
INTACT1,215534c23cee2c2deploy.sh
INTACT10,0649714dd8609c0docs/defensive-publications/E9_PATENT_CLAIM_STRUCTURE.md
INTACT7,1831862d16a5cd9docs/defensive-publications/E9_PROTONIC_RESONANCE_ENGINE_INVENTION_DISCLOSURE.md
INTACT1,3132a0a72b2be5bdocs/defensive-publications/NANODOC_HYBRID_ARCHITECTURE.md
INTACT13,2151c2bbff04048docs/defensive-publications/QUAD_LAYER_IDENTITY_DISCLOSURE.md
INTACT13,2728a94e844df54docs/defensive-publications/nOn_STATE_INVENTION_DISCLOSURE.md
INTACT11,688f336f8043dcadocs/ip-inventory/COORDINAMENT_ATTACK_SURFACE.md
INTACT12,2146475b34b58abdocs/ip-inventory/TRIANON_UNHACKABLE_VALIDATION.md
INTACT3795e2990dbf44src/__init__.py
INTACT5,7892c283545db5dsrc/audit.py
INTACT5,223e37e88595d99src/hardener.py
INTACT4,57430912b573304src/report.py
INTACT13,7621b7bc0cae889src/scanner.py
INTACT8,211617f4efdfb89tests/test_audit.py
NUL 100%90172b8c37f7304EXECUTED.md
NUL 100%3,281cf0c3ca744b6docs/sales/CSM_SECURITY_LAYER_PITCH.md
NUL 100%2,8926945629ff7d6docs/sales/INTERN_PROGRAM.md
NUL 100%3,45355c031dfd9f9docs/sales/TARGET_CONTACTS.md
NUL 100%3,542ea9be80c9417docs/security-embed-specs/BUILD_INTEGRATION_SPECS.md
NUL 100%7,643546c2eb014f2last-run.md
0 B0e3b0c44298fctests/__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).