{"id":47589863,"url":"https://github.com/janitor-security/the-janitor","last_synced_at":"2026-05-24T09:04:30.894Z","repository":{"id":337005129,"uuid":"1151945582","full_name":"janitor-security/the-janitor","owner":"janitor-security","description":"A deterministic, zero-copy structural firewall. Mathematically neutralize Agentic Swarms, supply-chain injections, and architectural necrosis.","archived":false,"fork":false,"pushed_at":"2026-04-22T03:16:30.000Z","size":99648,"stargazers_count":4,"open_issues_count":9,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-04-22T05:44:45.917Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"https://thejanitor.app","language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/janitor-security.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":"SECURITY.md","support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2026-02-07T05:43:57.000Z","updated_at":"2026-04-22T03:14:12.000Z","dependencies_parsed_at":"2026-03-03T06:04:26.740Z","dependency_job_id":null,"html_url":"https://github.com/janitor-security/the-janitor","commit_stats":null,"previous_names":["ghrammr/the-janitor","janitor-security/the-janitor"],"tags_count":237,"template":false,"template_full_name":null,"purl":"pkg:github/janitor-security/the-janitor","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/janitor-security%2Fthe-janitor","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/janitor-security%2Fthe-janitor/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/janitor-security%2Fthe-janitor/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/janitor-security%2Fthe-janitor/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/janitor-security","download_url":"https://codeload.github.com/janitor-security/the-janitor/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/janitor-security%2Fthe-janitor/sbom","scorecard":{"id":1243731,"data":{"date":"2026-02-21T09:14:22Z","repo":{"name":"github.com/GhrammR/the-janitor","commit":"7f197a395e797321dcb99cf313d3e44d9c12aee5"},"scorecard":{"version":"v5.0.0","commit":"ea7e27ed41b76ab879c862fa0ca4cc9c61764ee4"},"score":3.9,"checks":[{"name":"Binary-Artifacts","score":10,"reason":"no binaries found in the repo","details":null,"documentation":{"short":"Determines if the project has generated executable (binary) artifacts in the source repository.","url":"https://github.com/ossf/scorecard/blob/ea7e27ed41b76ab879c862fa0ca4cc9c61764ee4/docs/checks.md#binary-artifacts"}},{"name":"Branch-Protection","score":0,"reason":"branch protection not enabled on development/release branches","details":["Warn: branch protection not enabled for branch 'main'"],"documentation":{"short":"Determines if the default and release branches are protected with GitHub's branch protection settings.","url":"https://github.com/ossf/scorecard/blob/ea7e27ed41b76ab879c862fa0ca4cc9c61764ee4/docs/checks.md#branch-protection"}},{"name":"CI-Tests","score":-1,"reason":"no pull request found","details":null,"documentation":{"short":"Determines if the project runs tests before pull requests are merged.","url":"https://github.com/ossf/scorecard/blob/ea7e27ed41b76ab879c862fa0ca4cc9c61764ee4/docs/checks.md#ci-tests"}},{"name":"CII-Best-Practices","score":0,"reason":"no effort to earn an OpenSSF best practices badge detected","details":null,"documentation":{"short":"Determines if the project has an OpenSSF (formerly CII) Best Practices Badge.","url":"https://github.com/ossf/scorecard/blob/ea7e27ed41b76ab879c862fa0ca4cc9c61764ee4/docs/checks.md#cii-best-practices"}},{"name":"Code-Review","score":0,"reason":"Found 0/30 approved changesets -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project requires human code review before pull requests (aka merge requests) are merged.","url":"https://github.com/ossf/scorecard/blob/ea7e27ed41b76ab879c862fa0ca4cc9c61764ee4/docs/checks.md#code-review"}},{"name":"Contributors","score":0,"reason":"project has 0 contributing companies or organizations -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project has a set of contributors from multiple organizations (e.g., companies).","url":"https://github.com/ossf/scorecard/blob/ea7e27ed41b76ab879c862fa0ca4cc9c61764ee4/docs/checks.md#contributors"}},{"name":"Dangerous-Workflow","score":10,"reason":"no dangerous workflow patterns detected","details":null,"documentation":{"short":"Determines if the project's GitHub Action workflows avoid dangerous patterns.","url":"https://github.com/ossf/scorecard/blob/ea7e27ed41b76ab879c862fa0ca4cc9c61764ee4/docs/checks.md#dangerous-workflow"}},{"name":"Dependency-Update-Tool","score":10,"reason":"update tool detected","details":["Info: detected update tool: Dependabot: .github/dependabot.yml:1"],"documentation":{"short":"Determines if the project uses a dependency update tool.","url":"https://github.com/ossf/scorecard/blob/ea7e27ed41b76ab879c862fa0ca4cc9c61764ee4/docs/checks.md#dependency-update-tool"}},{"name":"Fuzzing","score":0,"reason":"project is not fuzzed","details":["Warn: no fuzzer integrations found"],"documentation":{"short":"Determines if the project uses fuzzing.","url":"https://github.com/ossf/scorecard/blob/ea7e27ed41b76ab879c862fa0ca4cc9c61764ee4/docs/checks.md#fuzzing"}},{"name":"License","score":9,"reason":"license file detected","details":["Info: project has a license file: LICENSE:0","Warn: project license file does not contain an FSF or OSI license."],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/ea7e27ed41b76ab879c862fa0ca4cc9c61764ee4/docs/checks.md#license"}},{"name":"Maintained","score":0,"reason":"project was created in last 90 days. please review its contents carefully","details":["Warn: Repository was created in last 90 days."],"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/ea7e27ed41b76ab879c862fa0ca4cc9c61764ee4/docs/checks.md#maintained"}},{"name":"Packaging","score":-1,"reason":"packaging workflow not detected","details":["Warn: no GitHub/GitLab publishing workflow detected."],"documentation":{"short":"Determines if the project is published as a package that others can easily download, install, easily update, and uninstall.","url":"https://github.com/ossf/scorecard/blob/ea7e27ed41b76ab879c862fa0ca4cc9c61764ee4/docs/checks.md#packaging"}},{"name":"Pinned-Dependencies","score":8,"reason":"dependency not pinned by hash detected -- score normalized to 8","details":["Info: Possibly incomplete results: error parsing shell code: unclosed here-document 'EOF': tools/issue-token.sh:0","Warn: pipCommand not pinned by hash: .github/workflows/deploy_docs.yml:37","Info:   7 out of   7 GitHub-owned GitHubAction dependencies pinned","Info:   4 out of   4 third-party GitHubAction dependencies pinned","Info:   2 out of   2 containerImage dependencies pinned","Info:   0 out of   1 pipCommand dependencies pinned"],"documentation":{"short":"Determines if the project has declared and pinned the dependencies of its build process.","url":"https://github.com/ossf/scorecard/blob/ea7e27ed41b76ab879c862fa0ca4cc9c61764ee4/docs/checks.md#pinned-dependencies"}},{"name":"SAST","score":0,"reason":"no SAST tool detected","details":["Warn: no pull requests merged into dev branch"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/ea7e27ed41b76ab879c862fa0ca4cc9c61764ee4/docs/checks.md#sast"}},{"name":"Security-Policy","score":0,"reason":"security policy file not detected","details":["Warn: no security policy file detected","Warn: no security file to analyze","Warn: no security file to analyze","Warn: no security file to analyze"],"documentation":{"short":"Determines if the project has published a security policy.","url":"https://github.com/ossf/scorecard/blob/ea7e27ed41b76ab879c862fa0ca4cc9c61764ee4/docs/checks.md#security-policy"}},{"name":"Signed-Releases","score":0,"reason":"Project has not signed or included provenance with any releases.","details":["Warn: release artifact v6.1.8 not signed: https://api.github.com/repos/GhrammR/the-janitor/releases/288971376","Warn: release artifact v6.1.7 not signed: https://api.github.com/repos/GhrammR/the-janitor/releases/288655740","Warn: release artifact v6.1.6 not signed: https://api.github.com/repos/GhrammR/the-janitor/releases/288651187","Warn: release artifact v6.1.5 not signed: https://api.github.com/repos/GhrammR/the-janitor/releases/288630643","Warn: release artifact v6.1.4 not signed: https://api.github.com/repos/GhrammR/the-janitor/releases/288616222","Warn: release artifact v6.1.8 does not have provenance: https://api.github.com/repos/GhrammR/the-janitor/releases/288971376","Warn: release artifact v6.1.7 does not have provenance: https://api.github.com/repos/GhrammR/the-janitor/releases/288655740","Warn: release artifact v6.1.6 does not have provenance: https://api.github.com/repos/GhrammR/the-janitor/releases/288651187","Warn: release artifact v6.1.5 does not have provenance: https://api.github.com/repos/GhrammR/the-janitor/releases/288630643","Warn: release artifact v6.1.4 does not have provenance: https://api.github.com/repos/GhrammR/the-janitor/releases/288616222"],"documentation":{"short":"Determines if the project cryptographically signs release artifacts.","url":"https://github.com/ossf/scorecard/blob/ea7e27ed41b76ab879c862fa0ca4cc9c61764ee4/docs/checks.md#signed-releases"}},{"name":"Token-Permissions","score":0,"reason":"detected GitHub workflow tokens with excessive permissions","details":["Info: jobLevel 'contents' permission set to 'read': .github/workflows/scorecard.yml:20","Info: jobLevel 'actions' permission set to 'read': .github/workflows/scorecard.yml:21","Info: topLevel 'contents' permission set to 'read': .github/workflows/dependency-review.yml:9","Warn: topLevel 'contents' permission set to 'write': .github/workflows/deploy_docs.yml:10","Info: topLevel permissions set to 'read-all': .github/workflows/scorecard.yml:11","Info: no jobLevel write permissions found"],"documentation":{"short":"Determines if the project's workflows follow the principle of least privilege.","url":"https://github.com/ossf/scorecard/blob/ea7e27ed41b76ab879c862fa0ca4cc9c61764ee4/docs/checks.md#token-permissions"}},{"name":"Vulnerabilities","score":9,"reason":"1 existing vulnerabilities detected","details":["Warn: Project is vulnerable to: RUSTSEC-2025-0119"],"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/ea7e27ed41b76ab879c862fa0ca4cc9c61764ee4/docs/checks.md#vulnerabilities"}}]},"last_synced_at":"2026-02-21T16:37:23.482Z","repository_id":337005129,"created_at":"2026-02-21T16:37:23.482Z","updated_at":"2026-02-21T16:37:23.482Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32358509,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-27T20:07:02.737Z","status":"ssl_error","status_checked_at":"2026-04-27T20:07:00.910Z","response_time":128,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2026-04-01T17:13:07.535Z","updated_at":"2026-05-04T12:01:45.616Z","avatar_url":"https://github.com/janitor-security.png","language":"Rust","funding_links":[],"categories":["Static Checkers"],"sub_categories":[],"readme":"# The Janitor: The Mathematical Firewall Against Autonomous AI\n**v10.2.0-rc.1\r — Rust-Native. Zero-Copy. Dual-PQC Attestation. SLSA Level 4 Reproducible Builds.**\n\n![Integrity Status](.janitor/janitor_badge.svg)\n\n*Attested by The Janitor v10.2.0-rc.1\r\r\r\r\r\r\r\r\r\r: Zero-Upload, FIPS 204 + FIPS 205 Compliant.*\n\n---\n\n\u003e **Sonar finds style violations.**\n\u003e **The Janitor enforces structural integrity.**\n\n\u003e *82% of open Godot Engine pull requests contain no issue link. 20% introduce language antipatterns. Zero comment scanners caught it. The Janitor did — across 50 live PRs, in under 90 seconds.*\n\n---\n\n## The Problem: Mythos-Class Autonomous Injection\n\nThe Veracode 2025 State of Software Security report established the baseline: AI-assisted code contains **36% more high-severity vulnerabilities** than human-written equivalents. But the threat has evolved from Copilot assistance to 'Mythos-class' autonomous AI agents that inject vulnerabilities and orchestrate attack chains across microservices. Your linter passes agentic output. Your SAST tool uploads it to a cloud pipeline. By the time the report arrives, the PR is merged.\n\nThe threat model has changed. Your enforcement layer has not. The Janitor is the only deterministic defense against 'Mythos-class' AI agents, mathematically verifying intent before code enters the repository. Looking ahead, our decadal roadmap pioneers Zero-Knowledge AST proofs and Labyrinth Deception to neutralize adversarial agents at the structural level.\n\n## Zero-Friction GitHub Integration\n\n![Janitor Sentinel Demo](docs/assets/sentinel_demo.webp)\n\n*Janitor Sentinel automatically downgrades vetoes when it detects safe patterns (e.g., Dependabot).*\n\n## The Enforcement Layer\n\nThe Janitor is not a linter. It is a **structural firewall** that runs on your hardware, on every pull request — before the merge button is available.\n\n### Actuarial Risk Matrix\n\nThe Janitor doesn't just find vulnerabilities — it generates a financial ledger. Every intercepted threat is categorized and billed:\n\n- **Critical Threat** (security antipattern or Swarm collision): **$150/incident** — CI pipeline poisoned, supply-chain injection vector, or coordinated Agentic Swarm clone.\n- **Necrotic GC** (dead-code ghost, bot-closeable): **$20/PR** — automated garbage collection, no human triage required.\n- **Total Economic Impact** = sum of all categorical billings across the audit window.\n\nAudited **33,000 PRs across 22 enterprise repositories on an 8 GB laptop.** The ledger is machine-generated, per-PR, and appended to `.janitor/bounce_log.ndjson` atomically on every merge event.\n\n### Integrity Dashboard (WOPR)\n\n```\njanitor dashboard \u003crepo\u003e\n```\n\nVisualize C/C++ compile-time blast radius and track structural Swarm clones in real-time. The WOPR (War Operations Plan Response) dashboard renders the top-10 `#include` dependency silos ranked by transitive reach — the files whose modification ripples furthest through the compile graph. Built from in-memory libgit2 tree walks; no filesystem checkout required.\n\n### The Vibe-Check Gate\n\nThe Vibe-Check Gate compresses every patch blob via `zstd` and measures `compressed_len / raw_len`. Vibe-coded PRs — generated by prompting an AI without authoring the implementation — are statistically self-similar: the same scaffolding, the same docstring patterns, the same structural repetition. They compress below ratio `0.15`. Any blob crossing that threshold triggers `antipattern:ncd_anomaly` (+10 points) before tree-sitter parses a single node.\n\nTwo complementary shields eliminate false positives on legitimate non-application content:\n\n- **Null-Vector Collision Shield** — IaC bypass (`.nix`, `.lock`, `.json`, `.toml`, `.yaml`, `.yml`, `.csv`) + 256-byte size guard + `DOMAIN_VENDORED` router. CVE vendor patches touching `thirdparty/` score zero by construction. No legitimate infrastructure change can produce a spurious non-zero score.\n- **Net-Negative Exemption** — All score multipliers act exclusively on *newly introduced* symbols and patterns. Deletion-dominant patches — boilerplate purges, dead API removal, deprecated-code cleanup — mathematically cannot trigger any scoring signal. Score=0 is a proof, not a heuristic.\n\n### Zero-Copy Execution\n\nEvery analysis executes via **memory-mapped file access**. No network call is made during the dead-symbol pipeline.\n\n**Zero-Upload Guarantee — both deployment models:**\n\n| Model | Where analysis runs | Source code leaves your environment? |\n|---|---|---|\n| **CLI + GitHub Action** (`action.yml`) | Your GitHub Actions runner | **Never** |\n| **Janitor Sentinel** (GitHub App) | Your GitHub Actions runner | **Never** — Governor receives only the score |\n\nThe Janitor engine runs entirely inside your own runner in both modes. The Governor (Sentinel's backend) receives a signed analysis result — not your source code. No server-side clone. No SAST upload.\n\n**Benchmark:** Sustained **6.7 seconds per Pull Request** on the 3.5M-line Godot Engine codebase (C++, C#, GDScript, Python) — featuring full Cross-File Taint Analysis and Wasm Governance. 58 MB peak RAM. On a standard CI runner. Zero panics.\n\n### Zombie Dependency Detection\n\nAI generators hallucinate package imports. The Janitor scans `package.json`, `Cargo.toml`, `requirements.txt`, `spin.toml`, and `wrangler.toml` against the live symbol reference graph. A package that appears in your manifest but never appears in a reachable import path is a zombie dependency — flagged before merge.\n\n### Cryptographic Integrity Bonds\n\nWhen a pull request clears the slop gate, **Janitor Sentinel** — our GitHub App — automatically issues a **CycloneDX v1.6 CBOM** (Cryptography Bill of Materials) for the merge event. The CBOM records every cryptographic operation performed during the scan: the **Dual-PQC** attestation signature (ML-DSA-65 NIST FIPS 204 + SLH-DSA NIST FIPS 205), the SHA-384 structural hashes, and the per-symbol audit entries covering `{timestamp}{file_path}{sha256_pre_cleanup}`. No token flag. No manual step. The proof is issued on a clean merge — a chain of custody for every line of code removed from production.\n\n### SLSA Level 4 Reproducible Builds\n\nEvery release binary is built with deterministic compiler flags (`--build-id=none`, LTO, single codegen unit) and verified via Docker-based dual-build comparison. The `verify-reproducible` recipe proves bit-for-bit identity across independent build environments — satisfying SLSA Build Level 4 for supply chain integrity.\n\n### Jira ASPM Deduplication\n\nThe Janitor integrates natively with Jira for Application Security Posture Management. Findings are synced as Jira issues with automatic deduplication — the first bounce creates a ticket; subsequent bounces with the same fingerprint skip creation. Credential preflight validates `JANITOR_JIRA_USER` and `JANITOR_JIRA_TOKEN` before attempting sync, gracefully degrading to local-only mode when credentials are absent.\n\n### Native SCM Support\n\nCommit-status publishing works out of the box for **GitHub**, **GitLab**, and **Azure DevOps**. The Janitor auto-detects your CI environment and publishes pass/fail verdicts to the correct API — no additional configuration beyond standard CI tokens.\n\n---\n\n## Competitive Moat\n\n### On-Device vs. Cloud Fabric\n\nThe market is filling with \"AI Security Fabrics\" — cloud-hosted LLM pipelines that ingest your source code, run probabilistic analysis, and return a verdict four minutes later. They are slow. They exfiltrate your code to a third-party inference cluster. Your diffs become training data.\n\nThe Janitor is the opposite architecture: an **on-device structural firewall** — a Rust binary that memory-maps your diffs, applies deterministic analysis, and exits. No network call during the analysis path. Proven at **6.7 seconds per Pull Request on a 3.5M-line C++ codebase, on an 8 GB laptop**. Code never leaves your runner in either deployment model.\n\n### Deterministic vs. Heuristic\n\nLLM-based code review tools cannot *prove* anything. They emit confidence scores against training distributions. A novel adversarial input — well-structured but semantically dangerous — is invisible to a heuristic system trained on pre-AI codebases.\n\nThe Janitor does not guess. It uses **tree-sitter ASTs to prove structural identity**, **SHA-384 hashing to prove audit integrity**, **BLAKE3 to prove clone equivalence**, and **Dual-PQC (ML-DSA-65 FIPS 204 + SLH-DSA FIPS 205) to prove chain of custody**. The gate passes or it blocks. There is no confidence interval. There is no false-positive budget. When a PR clears the gate, Janitor Sentinel issues a CycloneDX v1.6 CBOM: a cryptographically signed bond you can present to a SOC 2 auditor — not a report, a proof.\n\n### Air-Gap and Sovereign Deployment\n\nVeracode, Checkmarx, and SonarQube require cloud connectivity. Their analysis pipelines send your source to remote clusters. For IL5/IL6 environments — classified networks, air-gapped DoD infrastructure, sovereign cloud mandates — this is a hard disqualifier.\n\nThe Janitor ships **Air-Gap Intel Transfer Capsules**: SHA-384-hashed, Ed25519-signed wisdom bundles that can be physically transported and cryptographically verified offline. Import a capsule, verify the signature chain, and the engine is operational with full threat intelligence — no network ever required.\n\n### Private Governance Modules (Wasm BYOR)\n\nVeracode and Checkmarx enforce their rule sets. You cannot mount your own.\n\nThe Janitor supports **Wasm BYOR (Bring Your Own Rules)**: private governance modules compiled to WebAssembly, fuel-bounded, memory-limited, and executed with deterministic provenance receipts. Every Wasm rule is pinned with BLAKE3 (`janitor wasm-pin`) and verified at load time. Every execution is sealed into the CBOM — auditable, reproducible, offline-verifiable.\n\n### Hallucinated Package Detection (Slopsquatting)\n\nAI code generators hallucinate package names. `py-react-vsc`, `django-tailwind-fast`, `node-express-secure-template` — packages that do not exist in any registry but sound plausible enough to install if a threat actor registers them first.\n\nThe Janitor maintains a **BLAKE3-seeded Bloom filter** (`SlopsquatFilter`) seeded from the wisdom feed. Every package import in a PR is checked against the filter before it can reach the merge gate. Slopsquatting is stopped before it reaches production.\n\n### Replayable Decision Capsules\n\nNo tool in the SAST market can prove, offline and without network access, exactly why a PR was blocked. The Janitor can.\n\nEvery bounce decision is sealed into a **`DecisionCapsule`** — a tamper-evident record of the exact CST mutation roots, Wasm rule receipts, and analysis score that produced the verdict. A CISO can replay the capsule 18 months later, on an air-gapped machine, and cryptographically verify the chain of custody to the original diff.\n\n### Agentic-Ready\n\nAI coding assistants are becoming autonomous agents — systems that open PRs without human authorship, coordinate across accounts, and submit structurally identical changes at a rate no human review queue can absorb. Current toolchains have no concept of a non-human contributor operating at machine velocity and no mechanism to detect coordinated structural injection.\n\n**The Janitor is the deterministic enforcement gate that applies your architectural rules to non-human developers.** The same rules, at the same threshold, whether the author is a human engineer, a Copilot agent, or an autonomous Swarm. The `janitor.toml` governance manifest is version-controlled policy-as-code: your rules, enforced at the diff level, before the merge button is available.\n\nWhen your team deploys AI engineers, the gate does not move.\n\n### Decadal Roadmap: The Next Frontier\n\nThe current engine intercepts threats at the static structural level — provably, at machine speed, offline. The decadal horizon pushes the frontier into mathematically certified territory that no competitor can reach without rebuilding the entire stack:\n\n- **Zero-Knowledge AST Enclaves** — Proving that a codebase satisfies all 200 governance rules without revealing a single line of source. A zk-SNARK attests the engine's verdict; the auditor verifies the proof in milliseconds. No code exfiltration. No trust boundary. The compliance answer exists on-chain without the source ever leaving your environment.\n- **The Labyrinth Deception Plane** — A runtime honeypot layer that presents adversarial agents with a structurally valid but semantically poisoned codebase, trapping autonomous attackers mid-campaign and extracting their full attack graph before they know they have been detected.\n\nThese are not roadmap promises — they are the logical next tier of a deterministic engine that already proves reachability via IFDS and path-feasibility via Z3. The mathematical foundation is live today.\n\n---\n\n## PR Gate: Live Results\n\n```\nRepos audited         : 22 enterprise repositories (godot, nixpkgs, vscode,\n                        k8s, pytorch, kafka, rust-lang/rust, tauri, redis,\n                        next.js, home-assistant, ansible, workers-sdk,\n                        langchain, deno, rails, laravel, apple/swift,\n                        aspnetcore, okhttp, terraform, neovim)\nPRs analyzed          : 33,000+  (live production PRs — no synthetic benchmarks)\nHardware              : 8 GB laptop\nEngine panics         : 0\nOOM events            : 0\n```\n\n*Godot Engine alone (50 PRs, Feb 2026): 82% unlinked, 20% antipatterns. Zero false positives.*\n\n---\n\n## How It Works\n\n1. **Scan** — Static reference graph + 6-stage heuristic pipeline identifies every dead symbol.\n2. **Simulate** — Shadow Tree overlays links to dead files. Your test suite runs against simulated deletion.\n3. **Remove** — Tests pass? Byte-precise surgical removal, bottom-to-top. Tests fail? Full rollback, zero corruption.\n\n## Quick Start\n\n**[→ 30-Second Sentinel Setup (copy-paste guide)](docs/onboarding.md)**\n\n```bash\n# Detect dead code (free)\njanitor scan ./src\n\n# Find duplicate functions (free)\njanitor dedup ./src\n\n# PR enforcement gate — score a diff (free)\njanitor bounce ./src --patch diff.patch\n\n# Shadow-simulate + remove dead code (free)\njanitor clean ./src --force-purge\n```\n\n## Language Support\n\n| Language | Dead Functions | Dead Classes | Dead Files | Duplicate Logic |\n|----------|:---:|:---:|:---:|:---:|\n| Python | ✓ | ✓ | ✓ | ✓ |\n| Rust | ✓ | ✓ | ✓ | ✓ |\n| JavaScript / TypeScript | ✓ | ✓ | ✓ | ✓ |\n| C++ | ✓ | ✓ | ✓ | ✓ |\n| Go | ✓ | ✓ | ✓ | ✓ |\n| C# / Java | ✓ | ✓ | ✓ | ✓ |\n\n## Runtime Architecture\n\n| Subsystem | Technology | Property |\n|-----------|-----------|---------|\n| **AST Engine** | Tree-sitter (23 grammars) | O(n) CST construction; byte-range precision per token |\n| **Reference Graph** | Petgraph directed digraph | Topological dead-symbol filter; in-degree = 0 → candidate |\n| **Pattern Matching** | Aho-Corasick (single automaton per group) | O(n+m) multi-pattern scan; zero allocation in hot path |\n| **Registry Persistence** | rkyv + memmap2 | mmap-direct deserialization; no heap allocation for reads |\n| **Structural Hashing** | BLAKE3 (alpha-normalized AST) | Logic-clone detection across identifier rename boundaries |\n| **Audit Integrity** | SHA-384 (FIPS 180-4) | HMAC-SHA-384 ledger proving; release asset hashing |\n| **Fuzzy Dedup** | AstSimHasher (SimHash over CST tokens) | Classified as `Refactor`, `Zombie`, or `NewCode` |\n| **Vibe-Check Gate** | zstd level-3 compression ratio | O(N) vibe-code detector; fires before AST parse; ratio \u003c 0.15 → `antipattern:ncd_anomaly` (+10 pts) |\n| **PR Quality Gate** | MinHash LSH (64 hashes, 8-band index) | Lock-free ArcSwap index; sub-linear collision detection |\n| **Deletion Engine** | Bottom-to-top byte-range splice | UTF-8 char-boundary hardened; zero re-parse overhead |\n| **Simulation Layer** | Symlink overlay (Shadow Tree) | Zero additional disk usage; tests run against simulated state |\n| **Audit Attestation** | Dual-PQC: ML-DSA-65 (FIPS 204) + SLH-DSA (FIPS 205) | CycloneDX v1.6 CBOMs — quantum-safe chain-of-custody provenance |\n| **Air-Gap Intel Transfer** | `IntelTransferCapsule` — SHA-384 + Ed25519 offline verify | Signed wisdom feed bundles for IL5/IL6 environments |\n| **Wasm BYOR Rules** | Wasmtime (fuel + memory bounded) | BLAKE3-pinned private governance modules; deterministic provenance receipts |\n| **Slopsquatting Filter** | BLAKE3-seeded Bloom filter (`SlopsquatFilter`) | Flags hallucinated package names; seeded from `update-wisdom` |\n| **Replayable Decision Capsules** | `DecisionCapsule` + `WasmPolicyReceipt` | Offline audit replay — CBOM-sealed, Ed25519 signed |\n| **Reproducible Builds** | SLSA Level 4 (lld + `--build-id=none` + LTO) | Bit-for-bit deterministic release binaries |\n| **ASPM Integration** | Jira dedup sync + credential preflight | Fingerprint-based dedup; graceful degradation without credentials |\n| **SCM Publishing** | GitHub + GitLab + Azure DevOps | Native commit-status verdicts; auto-detected from CI environment |\n\n## Enterprise Integrations\n\nEvery `critical_threat` bounce fires an outbound webhook — HMAC-SHA256 signed, with `X-Janitor-Signature-256` and `X-Janitor-Event` headers. Wire to Slack, Microsoft Teams, Datadog, Splunk, or any HTTPS endpoint:\n\n```toml\n# janitor.toml\n[webhook]\nurl    = \"https://hooks.slack.com/services/...\"\nsecret = \"env:JANITOR_WEBHOOK_SECRET\"\nevents = [\"critical_threat\", \"necrotic_flag\"]\n```\n\nTest without a live PR:\n\n```sh\njanitor webhook-test --repo .\n```\n\n## Commercial Utility\n\n### Bug Bounty Utility\nThe Janitor accelerates offensive operations with Automated Exploit Generation (AEG). It synthesizes actionable, working Proof-of-Concepts—from AEG HTML harnesses to Z3 SMT minimal strings—empowering security researchers to prove impact without violating Terms of Service via automated network requests.\n\n### Enterprise Tiers\n\n**The enforcement is free. The attestation is the product.**\n\n| Tier | Cost | What You Get |\n|:-----|:-----|:-------------|\n| **Free (Community)** | $0 | Unlimited scan, clean, dedup, bounce, dashboard, report. 23 grammar spine. IFDS taint solver. Z3 SMT path feasibility. AEG curl synthesis. No signed logs. |\n| **Team Tier** | **$499/yr** | Unlimited Seats. All free features + Dual-PQC Integrity Bonds (ML-DSA-65 FIPS 204 + SLH-DSA FIPS 205) + CycloneDX v1.6 CBOMs + CI/CD Compliance Attestation + Janitor Sentinel GitHub App + Financial PII taint guard with regulatory regime annotations (GLBA, EU AI Act Art. 10, NYDFS 500.11). |\n| **Sovereign / Air-Gap Tier** | **Custom (Starting at $49,900/yr)** | SLSA L4 reproducible build verification, Offline PQC validation, Governor Control Plane, Wasm BYOR rule mounting, Air-Gap Intel Transfer Capsules, Mesh Topology Discovery (docker-compose + K8s service graph). |\n| **Industrial Tier** | **Custom** | OT/ICS/SCADA pack. On-Premises Token Server + Keypair Rotation Protocol + SOC 2 Audit Support + Enterprise SLA + Dedicated threat intelligence briefings. |\n\n### [→ Get Janitor Sentinel — $499/yr](https://thejanitor.lemonsqueezy.com/checkout/buy/cf4f5dbd-1354-4e97-8b55-0d4375ec9be7?enabled=1361348)\n\n*API token delivered by email within seconds of payment. No per-seat limits.*\n\n## CI Integration\n\n```yaml\n# PR slop gate — runs on every pull request (free)\n- id: janitor\n  uses: janitor-security/the-janitor@v10\n  with:\n    token: ${{ secrets.GITHUB_TOKEN }}\n\n# Outputs available downstream:\n# steps.janitor.outputs.slop_score\n# steps.janitor.outputs.antipatterns\n```\n\n## Commands\n\n```sh\n# Structural dead symbol audit\njanitor scan \u003cpath\u003e [--library] [--format json]\n\n# PR enforcement gate\njanitor bounce \u003cpath\u003e --patch \u003cfile\u003e --pr-number \u003cn\u003e --author \u003chandle\u003e --pr-body \"$BODY\"\n\n# Zombie dependency detection (output includes zombie_deps)\njanitor scan \u003cpath\u003e --format json\n\n# Structural clone detection\njanitor dedup \u003cpath\u003e\n\n# Shadow-simulate → test → remove dead code\njanitor clean \u003cpath\u003e --force-purge\n\n# Historical slop / clone / zombie intelligence report\njanitor report [--repo \u003cpath\u003e] [--top \u003cn\u003e] [--format markdown|json]\n\n# Long-lived daemon (Unix socket, Physarum backpressure)\njanitor serve [--socket \u003cpath\u003e] [--registry \u003cfile\u003e]\n\n# Ratatui TUI dashboard\njanitor dashboard \u003cpath\u003e\n```\n\n## Installation\n\n**From source (Rust 1.91+, `just` required):**\n\n```sh\ngit clone https://github.com/janitor-security/the-janitor\ncd the-janitor\njust build\n# Binary: target/release/janitor\n```\n\n**Pre-built binary:**\n\n```sh\n# Download from Releases, then:\nchmod +x janitor \u0026\u0026 sudo mv janitor /usr/local/bin/\n```\n\n## The Proof\n\n\u003e **3.5 million lines. 6.7 seconds per PR. 58 megabytes. Zero panics.**\n\u003e\n\u003e [Read the Godot Engine Autopsy →](https://thejanitor.app/case-studies/godot/)\n\n## License\n\n**Business Source License 1.1 (BUSL-1.1)** — Source Available. Converts to MIT on 2030-02-15.\n\nScan, cleanup, dedup, bounce, and dashboard are permanently free. Integrity attestation is issued by [Janitor Sentinel](https://thejanitor.lemonsqueezy.com/checkout/buy/cf4f5dbd-1354-4e97-8b55-0d4375ec9be7) (Team tier).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjanitor-security%2Fthe-janitor","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjanitor-security%2Fthe-janitor","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjanitor-security%2Fthe-janitor/lists"}