feat: rebrand to @mightyai + SHA256 binary verification + CI fixes - #1
Merged
Merged
Conversation
Tests all 4 HTTP hooks that will be enabled when OpenClaw PR #6405 merges: - http_request_received: Prompt injection detection - http_response_sending: Credential leak detection - http_tool_invoke: Dangerous command detection - http_tool_result: Indirect injection detection Coverage report validates 8 test cases across all hook types. Requires Citadel scanner running for live tests. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Restore the 4 HTTP API security hooks that were removed from main: - http_request_received: Scans inbound HTTP API requests - http_response_sending: Scans outbound API responses - http_tool_invoke: Scans tool arguments before execution - http_tool_result: Scans tool results for indirect injection These hooks will be enabled when OpenClaw PR #6405 merges. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Security Fixes: - Add configurable fail-open/fail-closed behavior per scan type - Add binary path validation for sidecar execution - Add streaming response handling with configurable blocking - Fix health endpoint to not expose internal URLs - Fix logging to not leak content (logs length only) New Files: - plugin/security-fixes.ts: Security fix implementations - tests/security-fixes.test.ts: Unit tests for fixes - tests/security-audit-validation.test.ts: Vulnerability validation - tests/security-audit-live.test.ts: Live tests against plugin - tests/integration-security.test.ts: Integration tests - tests/e2e-messaging-platforms.test.ts: E2E Slack/Discord/Telegram/WhatsApp - tests/mock-citadel-server.ts: Mock server for testing Modified: - plugin/index.ts: Applied all security fixes to hooks - citadel-openai-proxy.ts: Fixed health endpoint and logging - tests/http-hooks.test.ts: Fixed output scan assertions Test Results: 345 pass, 0 fail against real Citadel BERT ML Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Remove local shouldFailOpen() from index.ts, import from security-fixes.ts - Remove local handleScanError(), use handleScanFailure() from security-fixes.ts - Export ScanType from security-fixes.ts for consistent usage - Update handleScanFailure signature to match handleScanError (error, context, scanType) - Fix tests to use new parameter order - Replace sk_test patterns with RSA private key patterns for reliable credential detection - Net reduction: 26 lines removed Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Add 4 test cases for MolBot/OpenClaw 1-click RCE vulnerability - Tests verify Citadel blocks malicious gatewayUrl parameter patterns - Tests verify social engineering and token theft attempts are blocked - All tests pass against real Citadel with BERT ML model Reference: https://github.com/ethiack/moltbot-1click-rce Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Rename npm package from @TryMightyAI to @mightyai/citadel-guard-openclaw - Add SHA256 checksum verification for Go binary postinstall download - Add CITADEL_FORCE_DOWNLOAD env var for binary upgrades - Add CITADEL_REQUIRE_CHECKSUM env var for strict verification mode - Add local CVE-2026-25253 pattern detection (defense-in-depth) - Document CITADEL_AUTO_DOWNLOAD_MODEL and CITADEL_ENABLE_HUGOT env vars - Fix lint errors (import sorting, optional chaining, template literals) - Fix typecheck errors in local pattern detection integration - Bump version to 0.1.1 Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
…e names - Postinstall now runs `citadel scan "test"` after binary download to trigger automatic BERT model download (~685MB, first time only) - Fails gracefully if model download doesn't work (prints manual steps) - CITADEL_SKIP_BINARY=1 skips everything for CI environments - Update LAUNCH-POST.md: @tryMighty → @MightyAI package references Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
…ll model download - Plugin auto-detects BERT model in models/ dir and passes HUGOT_MODEL_PATH to Citadel sidecar, enabling ML detection when model is available - Fix pro-api normalization to derive BLOCK/ALLOW from output scan fields (is_safe, risk_score) when no explicit decision field present - Expand install script with BERT model download logic - Add models/ to .gitignore Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Format pro-api.ts multi-line conditional - Replace Math.pow with ** operator in install script - Use Number.parseInt instead of global parseInt - Sort imports in install script - Format long lines in install script - Exclude models/ dir from biome checks (large tokenizer.json) Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
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
@trymightyai/citadel-guard-openclawto@mightyai/citadel-guard-openclaw(GitHub org staysTryMightyAI)checksums.txtnot yet published)gatewayUrlpattern detection in plugin, catches vague natural-language variants the Go scanner missesCITADEL_FORCE_DOWNLOAD=1to re-download,CITADEL_REQUIRE_CHECKSUM=1for strict modeCITADEL_AUTO_DOWNLOAD_MODELandCITADEL_ENABLE_HUGOTenv vars to README and postinstall outputTest plan
bun run typecheckpassesbun run lintpasses (0 errors)bun testpasses (356 pass, 0 fail)npm pack --dry-runshows@mightyai/citadel-guard-openclaw@0.1.1CITADEL_SKIP_BINARY=1 node scripts/install-citadel-binary.mjsexits cleanly🤖 Generated with Claude Code