Repository navigation
feat: tamper-evident audit, agent controls, and demo tooling - #1
Closed
tanmayyyyayyy wants to merge 9 commits into
Closed
tanmayyyyayyy wants to merge 9 commits into
tanmayyyyayyy wants to merge 9 commits into
Conversation
Maintained, extended fork of Adirdabush1/cerberus (Apache-2.0). Adds MCP tool-poisoning/rug-pull scan, egress proxy + opt-in MITM with outbound prompt-secret redaction, supply-chain deps audit, offline IOC feed, and command-chaining de-obfuscation hardening. See NOTICE for attribution and the stated list of changes. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Install-from-source steps (npm publish pending), init/engine flow, npm link and dashboard-build notes, and the optional scan/deps/proxy/feeds commands. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
A fresh clone has no dist/ (gitignored) and no node_modules until `npm install`. Running `node bin/cerberus.mjs` before install crashed with a raw ERR_MODULE_NOT_FOUND for 'tsx'. Now the launcher detects missing deps and prints setup instructions, and the README marks `npm install` as a required first step. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
…hooting Rewrites Setup into prerequisites → install → wire → run → verify → dashboard → troubleshooting, with the gotchas fresh users actually hit (npm install first, fail-closed when engine down, separate dashboard install, port override). Ships the start-engine.bat / start-engine.command launchers the README references. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
…nd/.sh/.mjs, CRLF for .bat) Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
…ify step Windows PowerShell aliases curl to Invoke-WebRequest, which rejects -s/-X/-H/-d. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Approval fatigue makes a gateway useless (users rubber-stamp everything). Three precise fixes, each adversarially checked to keep real threat coverage: - content taint (FP1a): arm the generic exfil HITL only on STRUCTURED secrets, not generic high-entropy. Reading lockfile digests / base64 / UUIDs no longer poisons the session. Entropy values are still kept for the exact-match path; SRI/hex-digest/UUID shapes excluded from the entropy heuristic only. - content.isEgress (FP1c): a purely-local git command (commit/add/log/…) is no longer treated as egress just because its message contains words like 'ssh'/'fetch'. Evaluated PER SEGMENT so a chained/substituted real curl still fires; push/fetch/pull/clone/remote/config stay egress-eligible. - allow-dev-workflow: the everyday build/test/install loop (npm/pnpm/yarn/bun, pip/uv, cargo/go build+test, docker build, make, tsc/eslint/jest…) auto-ALLOWs. RCE-capable verbs excluded (docker run, *exec/npx/*dlx, cargo/go run); chained egress still HITL/BLOCKed via per-segment strictest-wins. New scripts/fp.test.ts (37 assertions). Full suite green incl. redteam 0/81, attack-sim + malware-sim 0 leaks. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
- hash-chain the JSONL audit log (prevHash/hash, SHA-256, canonical serialization) with verify() that reports the first modified, reordered, deleted, or unchained record; never reports a missing log as valid - add cerberus audit verify + GET /audit/verify + live dashboard status badge - add server-side pause/resume/quarantine (AgentControlStore) enforced at the /intercept boundary; CLI agents|pause|resume|quarantine + dashboard controls - add deterministic cerberus demo seed fixture (records events only) - add one-command npm run demo launcher and hydrate dashboard from history - add audit-chain + controls test suites and wire them into CI
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds the governance-hardening capabilities that were missing from the Warden gateway, without touching working code paths.
prevHash+hash, SHA-256 over a canonical encoding,GENESISanchor).AuditLog.verify()recomputes the chain and reports the first modified, reordered, deleted, or unchained record; a missing log is never reported valid.pause/resume/quarantine(AgentControlStore) enforced at the top of/intercept, so neither client-supplied claims nor a previously pending approval can bypass them.cerberus demo seedwrites an allow / block / human-review-and-denied fixture through the realAuditLog(records events only; runs no tool) and keeps the chain valid.npm run demochecks Node/deps, installs/builds if needed, seeds, then starts the gateway.hellonow carries recent audit history so the Live counters reflect seeded/historical state.No bugs were found in the existing enforcement; the baseline suites were already green. One authored test expectation was corrected (an absent audit file must be invalid, not valid).
Security
/intercept; the new pause/quarantine gate runs before the signal pipeline, the pending queue, and tool execution.AgentControlStore), exposed viaGET /agentsandPOST /agents/status(origin-gated); CLIcerberus agents|pause|resume|quarantine.cerberus audit verify/GET /audit/verify. Explicitly tamper-evident, not tamper-proof — a locally editable file makes modification detectable, not impossible.Testing
Executed locally (Node v25.9.0):
npm run typecheck— PASSnpm run build(enginetsc+ dashboardtsc --noEmit && vite build) — PASStest:audit-chain(11) andtest:controls(11); all 22 pre-existing suites green (behavioral 9, content 31, injection 9, bypass 138, fp 37, hook 3, store 11, mcp-scan 32, proxy 8, deps 21, ioc 19, risk 15, init 20, projector 21, audit 14, notify 6, security 7, policy 31, adapters 22, validate 13).scripts/smoke.mjsengine smoke — 11/11 PASS.test:mitmfails on Node v25 (ERR_INVALID_ARG_VALUE: TLSservernamemust not be an IP) — pre-existing and environmental; CI pins Node 20. Unrelated to these changes.Both new suites are wired into
.github/workflows/ci.yml.Demo
.cerberus/audit.jsonl, thennode bin/cerberus.mjs audit verify(exits non-zero, names the first bad record).node bin/cerberus.mjs pause <sessionId>then re-issue a governed call; it is blocked.Limitations
transfer_money, currency thresholds) do not exist in this repository and were intentionally not fabricated.