@bookedsolid/rea 0.22.0 → 0.23.1
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.
- package/README.md +15 -0
- package/THREAT_MODEL.md +753 -0
- package/dist/audit/append.js +1 -1
- package/dist/cli/doctor.js +11 -12
- package/dist/cli/hook.d.ts +37 -3
- package/dist/cli/hook.js +167 -5
- package/dist/cli/init.js +14 -26
- package/dist/cli/install/canonical.js +18 -3
- package/dist/cli/install/commit-msg.js +1 -2
- package/dist/cli/install/copy.js +4 -13
- package/dist/cli/install/fs-safe.js +5 -16
- package/dist/cli/install/gitignore.js +1 -5
- package/dist/cli/install/pre-push.js +3 -8
- package/dist/cli/install/settings-merge.js +79 -16
- package/dist/cli/upgrade.js +14 -10
- package/dist/gateway/downstream.js +1 -2
- package/dist/gateway/live-state.js +3 -1
- package/dist/gateway/log.js +1 -3
- package/dist/gateway/middleware/audit.js +1 -1
- package/dist/gateway/middleware/injection.js +3 -9
- package/dist/gateway/middleware/policy.js +3 -1
- package/dist/gateway/middleware/redact.js +1 -1
- package/dist/gateway/observability/codex-telemetry.js +1 -2
- package/dist/gateway/reviewers/claude-self.js +10 -6
- package/dist/hooks/bash-scanner/blocked-scan.d.ts +26 -0
- package/dist/hooks/bash-scanner/blocked-scan.js +467 -0
- package/dist/hooks/bash-scanner/index.d.ts +41 -0
- package/dist/hooks/bash-scanner/index.js +62 -0
- package/dist/hooks/bash-scanner/parse-fail-closed.d.ts +31 -0
- package/dist/hooks/bash-scanner/parse-fail-closed.js +27 -0
- package/dist/hooks/bash-scanner/parser.d.ts +42 -0
- package/dist/hooks/bash-scanner/parser.js +92 -0
- package/dist/hooks/bash-scanner/protected-scan.d.ts +76 -0
- package/dist/hooks/bash-scanner/protected-scan.js +868 -0
- package/dist/hooks/bash-scanner/verdict.d.ts +80 -0
- package/dist/hooks/bash-scanner/verdict.js +49 -0
- package/dist/hooks/bash-scanner/walker.d.ts +165 -0
- package/dist/hooks/bash-scanner/walker.js +9087 -0
- package/dist/hooks/push-gate/base.js +2 -6
- package/dist/hooks/push-gate/codex-runner.js +3 -1
- package/dist/hooks/push-gate/index.js +9 -10
- package/dist/policy/loader.js +4 -1
- package/dist/registry/tofu-gate.js +2 -2
- package/hooks/blocked-paths-bash-gate.sh +142 -272
- package/hooks/protected-paths-bash-gate.sh +227 -511
- package/package.json +3 -2
- package/profiles/bst-internal-no-codex.yaml +1 -1
- package/profiles/bst-internal.yaml +1 -1
- package/profiles/client-engagement.yaml +1 -1
- package/profiles/lit-wc.yaml +1 -1
- package/profiles/minimal.yaml +1 -1
- package/profiles/open-source-no-codex.yaml +1 -1
- package/profiles/open-source.yaml +1 -1
- package/scripts/postinstall.mjs +1 -2
- package/scripts/run-vitest.mjs +117 -0
package/README.md
CHANGED
|
@@ -152,6 +152,21 @@ PR-issue-link advisory, architecture advisory). Each hook uses
|
|
|
152
152
|
runs a HALT check near the top. See [Hooks shipped](#hooks-shipped) for
|
|
153
153
|
the full inventory.
|
|
154
154
|
|
|
155
|
+
**Bash-tier scanner (parser-backed since 0.23.0).** Two hooks —
|
|
156
|
+
`protected-paths-bash-gate.sh` and `blocked-paths-bash-gate.sh` — are
|
|
157
|
+
shims that forward stdin to `rea hook scan-bash`, a CLI subcommand
|
|
158
|
+
that parses the Bash command via `mvdan-sh@0.10.1`, walks the AST,
|
|
159
|
+
and emits a verdict JSON. Pre-0.23.0 these were 500-line bash regex
|
|
160
|
+
pipelines; the rewrite closes 24 known-bypass classes
|
|
161
|
+
(helix-021..023 + discord-ops Round 13 + codex round 1) by replacing
|
|
162
|
+
re-tokenization heuristics with structural matches against the parsed
|
|
163
|
+
argv tree. The other nine hooks remain regex-based bash. The shim
|
|
164
|
+
re-verifies the verdict JSON shape on return so a tampered
|
|
165
|
+
`REA_NODE_CLI` env var cannot bypass. See
|
|
166
|
+
[`docs/architecture/bash-scanner.md`](docs/architecture/bash-scanner.md)
|
|
167
|
+
for the AST-walker design and [`docs/migration/0.23.0.md`](docs/migration/0.23.0.md)
|
|
168
|
+
for consumer migration notes.
|
|
169
|
+
|
|
155
170
|
The hook layer runs independently of the MCP gateway — bypassing one does
|
|
156
171
|
not disable the other. That redundancy is intentional.
|
|
157
172
|
|