@nugehs/bouncer 0.1.0 → 0.1.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (3) hide show
  1. package/CHANGELOG.md +20 -0
  2. package/README.md +59 -6
  3. package/package.json +1 -1
package/CHANGELOG.md CHANGED
@@ -5,6 +5,26 @@ All notable changes to `@nugehs/bouncer` are documented here.
5
5
  The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
6
6
  and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
7
7
 
8
+ ## [0.1.1] - 2026-06-09
9
+ ### Added
10
+
11
+ - Brand alignment: toolchain footer/badges.
12
+ - README: badge row (npm version, CI, license, node, zero dependencies).
13
+ - README: "bouncer vs semgrep / policy-as-code" positioning section.
14
+ - README: prominent note that the shipped adapters today are `next` and
15
+ `react-native`, with an invitation for adapter PRs (nuxt, sveltekit, remix,
16
+ flutter, django).
17
+ - README: Tests section documenting the Node built-in test suite and CI matrix.
18
+ - Tag-triggered release workflow (`.github/workflows/release.yml`): runs tests,
19
+ creates a GitHub Release with notes extracted from this changelog, publishes
20
+ to npm.
21
+
22
+ ### Changed
23
+
24
+ - Replaced a personal example target path with a generic `./my-app` in the
25
+ README and the repo-root `bouncer.config.json`.
26
+ - README link to tieline now points at its npm package page.
27
+
8
28
  ## [0.1.0] - 2026-06-07
9
29
 
10
30
  Initial release.
package/README.md CHANGED
@@ -1,6 +1,14 @@
1
1
  # bouncer
2
2
 
3
- **Static compliance-controls checker.** bouncer verifies that the controls a
3
+ **Static compliance-controls checker the controls a regulation requires, verified in your code.**
4
+
5
+ [![npm](https://img.shields.io/npm/v/@nugehs/bouncer?style=flat-square)](https://www.npmjs.com/package/@nugehs/bouncer) [![CI](https://img.shields.io/github/actions/workflow/status/nugehs/bouncer/ci.yml?style=flat-square&label=CI)](https://github.com/nugehs/bouncer/actions/workflows/ci.yml) [![license: MIT](https://img.shields.io/badge/license-MIT-blue?style=flat-square)](LICENSE) [![node](https://img.shields.io/badge/node-%3E%3D18-blue?style=flat-square)](#) [![dependencies](https://img.shields.io/badge/dependencies-0-brightgreen?style=flat-square)](#)
6
+
7
+ **[nugehs.github.io/bouncer-web](https://nugehs.github.io/bouncer-web/)** (site)
8
+
9
+ ![bouncer demo](bouncer-demo.gif)
10
+
11
+ bouncer verifies that the controls a
4
12
  regulation *requires* actually exist in your code — UK Online Safety Act, ICO
5
13
  Children's Code (AADC) — expressed as deterministic **rule packs**. It runs in CI,
6
14
  exits non-zero when a required control is missing, and needs **no LLM**.
@@ -19,8 +27,23 @@ Regulators now expect *demonstrable* controls: age assurance, high-privacy
19
27
  defaults for children, report/block affordances on user-generated content, a DPIA,
20
28
  a risk assessment. Those are concrete things that either exist in a codebase or
21
29
  don't. bouncer turns a regulation into a set of static checks over your repo, the
22
- same way [tieline](https://github.com/nugehs/tieline) turns an API contract into
23
- drift checks — the engine knows nothing about the law; the **rule packs** do.
30
+ same way [tieline](https://www.npmjs.com/package/@nugehs/tieline) turns an API
31
+ contract into drift checks — the engine knows nothing about the law; the
32
+ **rule packs** do.
33
+
34
+ ### bouncer vs semgrep / policy-as-code
35
+
36
+ Scanners like semgrep, CodeQL, or Snyk answer *"is there bad code here?"* — they
37
+ hunt for vulnerabilities and dangerous patterns that **shouldn't exist**. bouncer
38
+ answers the opposite question: *"does the code the regulation requires actually
39
+ exist?"* — age assurance on sign-up, report/block on UGC surfaces, high-privacy
40
+ defaults for children. A repo can be vulnerability-free and still fail every one
41
+ of those obligations. Policy-as-code tools (OPA/Rego, Conftest) gate *configs and
42
+ infrastructure* against policy; bouncer gates *application source* against
43
+ regulatory rule packs, with `file:line` evidence for every control and an honest
44
+ `unknown` when a surface can't be located. In short: **semgrep finds
45
+ vulnerabilities; bouncer proves required controls exist.** They complement each
46
+ other — run both.
24
47
 
25
48
  ## Install
26
49
 
@@ -65,8 +88,8 @@ not find. Missing surface → honest "can't determine".
65
88
  {
66
89
  "target": {
67
90
  "adapter": "next",
68
- "repo": "../bashbop-event-web",
69
- "roots": ["app", "src", "components", "redux"]
91
+ "repo": "./my-app",
92
+ "roots": ["app", "src", "components"]
70
93
  },
71
94
  "packs": ["uk-osa", "uk-aadc"],
72
95
  "packDirs": [],
@@ -76,7 +99,13 @@ not find. Missing surface → honest "can't determine".
76
99
  ```
77
100
 
78
101
  - `adapter` — how regulation *surfaces* (sign-up, profile, chat, livestream…) map
79
- onto files for your stack. Ships with `next` (App Router).
102
+ onto files for your stack.
103
+
104
+ > **Adapters shipped today: `next` (App Router) and `react-native`.** That's it —
105
+ > if your stack isn't covered, an adapter is a single small file mapping surface
106
+ > aliases to file globs (see `src/lib/adapters/next.js`). **Adapter PRs are very
107
+ > welcome** — `nuxt`, `sveltekit`, `remix`, `flutter`, `django` are all natural
108
+ > candidates.
80
109
  - `packs` — which rule packs to run. Built-ins: `uk-osa`, `uk-aadc`.
81
110
  - `packDirs` — extra directories of your own `*.json` packs.
82
111
  - `ignore` — rule ids to skip.
@@ -142,6 +171,30 @@ results:
142
171
  Fails the build when a required control goes missing — e.g. someone removes an
143
172
  age-gate or a report button from a UGC surface.
144
173
 
174
+ ## Tests
175
+
176
+ ```bash
177
+ npm test # node --test — zero dependencies, nothing to install
178
+ ```
179
+
180
+ The suite runs on Node's built-in test runner against throwaway fixture repos:
181
+ glob/brace expansion, every assertion probe (`find`, `allOf`/`anyOf`/`not`,
182
+ `allInFile` + `within` windows, `expect: "absent"`), the pass/fail/`unknown`
183
+ verdict semantics, and pack loading. CI runs it on Node 18, 20, and 22.
184
+
145
185
  ## License
146
186
 
147
187
  MIT
188
+
189
+ ---
190
+
191
+ ## Part of the toolchain
192
+
193
+ **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.
194
+
195
+ - [repoctx](https://www.npmjs.com/package/@nugehs/repoctx) — context: what does this change actually touch?
196
+ - [tieline](https://www.npmjs.com/package/@nugehs/tieline) — contracts: did the front end and back end quietly stop agreeing?
197
+ - **bouncer** (this tool) — compliance: could you defend this to Ofcom?
198
+ - [aiglare](https://www.npmjs.com/package/@nugehs/aiglare) — governance: where can the model do something you can't undo?
199
+
200
+ More at [segunolumbe.com](https://segunolumbe.com). *static analysis, never the model.*
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nugehs/bouncer",
3
- "version": "0.1.0",
3
+ "version": "0.1.2",
4
4
  "mcpName": "io.github.nugehs/bouncer",
5
5
  "description": "bouncer — static compliance-controls checker. Verifies the controls a regulation requires actually exist in your code (UK Online Safety Act, ICO Children's Code), as deterministic rule packs. No LLM required.",
6
6
  "type": "module",