
bouncer
io.github.nugehsPublished by GitHub account nugehsv0.3.0Updated Oct 28, 2026
Static compliance-controls checker for UK Online Safety Act & ICO Children's Code. CLI + MCP.
Overview
Static compliance checker that verifies regulatory controls (UK Online Safety Act, ICO Children's Code, Nigeria packs) exist in a codebase, exposed as MCP…
- What you can do
- Run compliance rule packs over a repository and get per-control verdicts with file:line evidence
- List the rules the configured packs apply
- Explain a single rule's standard, intent, fix and how it is checked
- List the rule packs shipped with the tool
- Verdicts are pass, fail or unknown, and unknown is never reported as a pass
- When to use it
- Useful when you need an assistant to check whether required controls such as age assurance, report/block on user-generated content or high-privacy defaults for children are actually present in application source, or to explain what a rule requires before fixing it. It complements vulnerability scanners rather than replacing them.
- Requirements
- Runs locally over stdio, typically started with npx from the npm package @nugehs/bouncer; needs Node.js 18 or newer. A bouncer.config.json in the target repository selects the adapter, packs and exclusions. No accounts, API keys or environment variables are declared.
Installation
In SourceWeft
- Open bouncer in the dashboard and add it to a workspace.
- Enable the server for the chats that should use its tools.
Desktop only via STDIO. STDIO servers start a local process, so they need the SourceWeft desktop host.
Other MCP clients
Follow the launch instructions in the repository.
README
bouncer
Static compliance-controls checker — the controls a regulation requires, verified in your code.
[npm] [CI] [license: MIT] [node] [dependencies]
nugehs.github.io/bouncer-web (site)
bouncer verifies that the controls a regulation requires actually exist in your code — UK Online Safety Act, ICO Children's Code (AADC), and Nigeria (NDPC, FCCPC, FIRS) — expressed as deterministic rule packs. It runs in CI, exits non-zero when a required control is missing, and needs no LLM.
It checks IDs at the door so non-compliant code doesn't get in.
bouncer is an engineering aid, not legal advice. A green report means the coded controls a rule looks for were found — it is not a substitute for a compliance / DPO review.
Why
Regulators now expect demonstrable controls: age assurance, high-privacy defaults for children, report/block affordances on user-generated content, a DPIA, a risk assessment. Those are concrete things that either exist in a codebase or don't. bouncer turns a regulation into a set of static checks over your repo, the same way tieline turns an API contract into drift checks — the engine knows nothing about the law; the rule packs do.
bouncer vs semgrep / policy-as-code
Scanners like semgrep, CodeQL, or Snyk answer "is there bad code here?" — they
hunt for vulnerabilities and dangerous patterns that shouldn't exist. bouncer
answers the opposite question: "does the code the regulation requires actually
exist?" — age assurance on sign-up, report/block on UGC surfaces, high-privacy
defaults for children. A repo can be vulnerability-free and still fail every one
of those obligations. Policy-as-code tools (OPA/Rego, Conftest) gate configs and
infrastructure against policy; bouncer gates application source against
regulatory rule packs, with file:line evidence for every control and an honest
unknown when a surface can't be located. In short: semgrep finds
vulnerabilities; bouncer proves required controls exist. They complement each
other — run both.
Install
Or clone and run with plain Node (zero runtime dependencies, Node ≥ 18).
Usage
Verdicts
unknown is deliberate: bouncer never reports a green pass for a surface it could
not find. Missing surface → honest "can't determine".
Configuration
bouncer.config.json:
adapter— how regulation surfaces (sign-up, profile, chat, livestream…) map onto files for your stack.
bouncer is language-agnostic. The default
autoadapter scans TS/JS, Go, Java, Kotlin, Scala, C#, C/C++, Rust, Swift, Dart, PHP, Python, Ruby, Elixir, SQL and HTML templates. Surfaces are found by directory/file names in any naming convention (signup/,sign_up.py,SignUpController.java). Comments and test/fixture files are never counted as evidence.nextandreact-nativeremain as TS/JS-only aliases. Narrow withtarget.languages.
exclude— extra globs to skip (added to built-in test/fixture/mock excludes; set"defaultExcludes": falseto disable those).packs— which rule packs to run. Built-ins:uk-osa,uk-aadc,ng-ndpc,ng-fccpc,ng-firs.packDirs— extra directories of your own*.jsonpacks.ignore— rule ids to skip.failOn— which buckets makecheckexit non-zero (default["fail"]). Regardless offailOn,checkalso exits 1 when every rule isunknown: no surface was located, so nothing was verified.- Keys starting with
_(e.g."_note") are treated as comments and ignored silently.
Rule packs
A pack is JSON. Each rule maps a legal standard to a static assertion over a surface:
Assertion nodes:
{ "find": "<regex>", "in": "<surface|glob>", "expect": "present|absent" }{ "allOf": [ … ] }·{ "anyOf": [ … ] }·{ "not": … }
in accepts a surface alias (resolved by the adapter), an array of aliases/globs,
or a raw glob. expect: "absent" flips the meaning — a match is a violation
(used for nudge patterns, self-declared age checkboxes, etc.).
Surfaces
any, signup, auth, profile, privacy, location, chat, livestream, ugc, moderation, consent, legal, dsr, security, retention, breach, processors, payments, invoice, governance. Unknown surface names are pack-validation errors.
Nigeria packs
For a platform operating in Nigeria, three packs ship built-in:
ng-ndpc— Nigeria Data Protection Act 2023 (NDPC): privacy notice, opt-in & granular consent, data-subject rights, encryption, retention/erasure, NDPA localization, DPO designation, 72-hour breach plan, cross-border safeguards.ng-fccpc— consumer protection (FCCPC): blanket "no refund / all sales final" clauses flagged as void — and high-precision, so a tiered or conditional refund policy doesn't trip it — plus refund-policy present, no drip pricing, explicit terms acceptance, terms of service present.ng-firs— tax (FIRS): 7.5% VAT rate, VAT on commission, WHT on payouts, VAT tax invoice.
Some obligations are process, not code — NDPC registration, signed cross-border
DPAs, the WHT remittance itself. Those rules surface as gaps to track (add
them to ignore with a note), not things a static scan can prove.
MCP
bouncer is also an MCP server (stdio), so an agent can pull the same deterministic results:
CI
Fails the build when a required control goes missing — e.g. someone removes an age-gate or a report button from a UGC surface.
Tests
The suite runs on Node's built-in test runner against throwaway fixture repos:
glob/brace expansion, every assertion probe (find, allOf/anyOf/not,
allInFile + within windows, expect: "absent"), the pass/fail/unknown
verdict semantics, and pack loading. CI runs it on Node 18, 20, 22, and 24.
License
MIT
Part of the toolchain
bouncer is one of four tools that form a deterministic trust layer for AI-assisted development. Each answers a question people keep handing to an LLM — with static analysis instead.
- repoctx — context: what does this change actually touch?
- tieline — contracts: did the front end and back end quietly stop agreeing?
- bouncer (this tool) — compliance: could you defend this to Ofcom?
- aiglare — governance: where can the model do something you can't undo?
More at segunolumbe.com. static analysis, never the model.
Source: README.md at commit 89e5075
Tools
0Version history
2- v0.3.0LatestOct 13, 2026
- v0.2.0Sep 16, 2026
Score
50% of the applicable checks met
How complete this listing is, computed from the registry entry, the endpoint and public sources. Not a rating of the server and not a statement that it is safe or working today: reachability is a dated check, and no installs or reviews go into the score.
- Reached in the last 30 days25 pts
Keep the endpoint answering the MCP handshake; SourceWeft probes it every 30 days.
- Auth declared10 pts
Declare the credential headers in the registry entry, or keep the endpoint answering the probe so its auth can be classified.
- Tools listed15 pts
Answer tools/list without a credential, or ship a package that starts in a sandbox without one.
- DescriptionRequired15 pts
- Logo10 pts
- Documentation15 pts
- License10 pts